knik / elastic-transcoder
Amazon Elastic Transcoder.
Requires
- php: >=5.2
This package is auto-updated.
Last update: 2025-03-08 08:02:30 UTC
README
PHP class for interacting with Amazon Elastic Transcoder that does not require PEAR.
Usage
Object-oriented method:
$et = new ElasticTranscoder($awsAccessKey, $awsSecretKey, $awsRegion);
Statically:
ElasticTranscoder::setAuth($awsAccessKey, $awsSecretKey, $awsRegion);
Note: us-east-1 is the default AWS region setting. The third parameter is optional for us-east-1 users.
Job Operations
Creating a transcoding job:
$pipelineId = 'pipelineId'; $input = array('Key' => 'inputFile'); $output = array( 'Key' => 'outputFile.mp4', 'PresetId' => 'presetId' ); $result = ElasticTranscoder::createJob($input, array($output), $pipelineId); if (!$result) { echo ElasticTranscoder::getErrorMsg(); } else { echo 'New job ID: ' . $result['Job']['Id']; }
List jobs by pipeline:
ElasticTranscoder::listJobsByPipeline( string $pipelineId [, boolean $ascending = true ] );
List jobs by status:
ElasticTranscoder::listJobsByStatus( string $status );
Get job info:
ElasticTranscoder::readJob( string $jobId );
Cancel a job:
ElasticTranscoder::cancelJob( string $jobId );
Pipeline Operations
Create a new pipeline:
ElasticTranscoder::createPipeline( string $name, string $inputBucket, string $outputBucket, string $role [, array $notifications ] );
Get a list pipelines:
ElasticTranscoder::listPipelines();
Get info about a pipeline:
ElasticTranscoder::readPipeline( string $pipelineId );
Update pipeline settings:
ElasticTranscoder::updatePipeline( string $pipelineId, array $updates );
Change the status of a pipeline (active/paused):
ElasticTranscoder::updatePipelineStatus( string $pipelineId, string $status );
Update pipeline notification settings:
ElasticTranscoder::updatePipelineNotifications( string $pipelineId [, array $notifications ] );
Delete a pipeline:
ElasticTranscoder::deletePipeline( string $pipelineId );
Test the settings for a pipeline:
ElasticTranscoder::testRole( string $inputBucket, string $outputBucket, string $role, array $topics );
Preset Operations
Create a preset:
ElasticTranscoder::createPreset( array $options );
List all presets:
ElasticTranscoder::listPresets();
Get info about a preset:
ElasticTranscoder::readPreset( string $presetId );
Delete a preset:
ElasticTranscoder::deletePreset( string $presetId );
Misc.
Set AWS authentication credentials:
ElasticTranscoder::setAuth( string $awsAccessKey, string $awsSecretKey );
Set AWS region:
ElasticTranscoder::setRegion( string $region = 'us-east-1' );
Get HTTP status code of server response:
ElasticTranscoder::getStatusCode();
Get server response:
ElasticTranscoder::getResponse();
Get error message, if any:
ElasticTranscoder::getErrorMsg();
More Information:
Getting Started with Elastic Transcoder
License
Released under the MIT license.