Elastic Transcoder PHP Class
PHP class for interacting with Amazon Elastic Transcoder that does not require PEAR., (*1)
Usage
Object-oriented method:, (*2)
$et = new AWS_ET($awsAccessKey, $awsSecretKey, $awsRegion);
Statically:, (*3)
AWS_ET::setAuth($awsAccessKey, $awsSecretKey, $awsRegion);
Note: us-east-1 is the default AWS region setting. The third parameter is optional for us-east-1 users., (*4)
Job Operations
Creating a transcoding job:, (*5)
$pipelineId = 'pipelineId';
$input = array('Key' => 'inputFile');
$output = array(
'Key' => 'outputFile.mp4',
'PresetId' => 'presetId'
);
$result = AWS_ET::createJob($input, array($output), $pipelineId);
if (!$result) {
echo AWS_ET::getErrorMsg();
} else {
echo 'New job ID: ' . $result['Job']['Id'];
}
List jobs by pipeline:, (*6)
AWS_ET::listJobsByPipeline( string $pipelineId [, boolean $ascending = true ] );
List jobs by status:, (*7)
AWS_ET::listJobsByStatus( string $status );
Get job info:, (*8)
AWS_ET::readJob( string $jobId );
Cancel a job:, (*9)
AWS_ET::cancelJob( string $jobId );
Pipeline Operations
Create a new pipeline:, (*10)
AWS_ET::createPipeline( string $name, string $inputBucket, string $outputBucket, string $role [, array $notifications ] );
Get a list pipelines:, (*11)
AWS_ET::listPipelines();
Get info about a pipeline:, (*12)
AWS_ET::readPipeline( string $pipelineId );
Update pipeline settings:, (*13)
AWS_ET::updatePipeline( string $pipelineId, array $updates );
Change the status of a pipeline (active/paused):, (*14)
AWS_ET::updatePipelineStatus( string $pipelineId, string $status );
Update pipeline notification settings:, (*15)
AWS_ET::updatePipelineNotifications( string $pipelineId [, array $notifications ] );
Delete a pipeline:, (*16)
AWS_ET::deletePipeline( string $pipelineId );
Test the settings for a pipeline:, (*17)
AWS_ET::testRole( string $inputBucket, string $outputBucket, string $role, array $topics );
Preset Operations
Create a preset:, (*18)
AWS_ET::createPreset( array $options );
List all presets:, (*19)
AWS_ET::listPresets();
Get info about a preset:, (*20)
AWS_ET::readPreset( string $presetId );
Delete a preset:, (*21)
AWS_ET::deletePreset( string $presetId );
Misc.
Set AWS authentication credentials:, (*22)
AWS_ET::setAuth( string $awsAccessKey, string $awsSecretKey );
Set AWS region:, (*23)
AWS_ET::setRegion( string $region = 'us-east-1' );
Get HTTP status code of server response:, (*24)
AWS_ET::getStatusCode();
Get server response:, (*25)
AWS_ET::getResponse();
Get error message, if any:, (*26)
AWS_ET::getErrorMsg();
More Information:
Getting Started with Elastic Transcoder, (*27)
License
Released under the MIT license., (*28)
, (*29)