Skip to content

et-nik/elastic-transcoder-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elastic Transcoder PHP Class

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.

githalytics.com alpha

About

Standalone Amazon Elastic Transcoder client for PHP 5.2+

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%