PHP code example of wheredia / elastic-transcoder-aws

1. Go to this page and download the library: Download wheredia/elastic-transcoder-aws library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wheredia / elastic-transcoder-aws example snippets


$et = new AWS_ET($awsAccessKey, $awsSecretKey, $awsRegion);

AWS_ET::setAuth($awsAccessKey, $awsSecretKey, $awsRegion);

$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'];
}

AWS_ET::listJobsByPipeline( string $pipelineId [, boolean $ascending = true ] );

AWS_ET::listJobsByStatus( string $status );

AWS_ET::readJob( string $jobId );

AWS_ET::cancelJob( string $jobId );

AWS_ET::createPipeline( string $name, string $inputBucket, string $outputBucket, string $role [, array $notifications ] );

AWS_ET::listPipelines();

AWS_ET::readPipeline( string $pipelineId );

AWS_ET::updatePipeline( string $pipelineId, array $updates );

AWS_ET::updatePipelineStatus( string $pipelineId, string $status );

AWS_ET::updatePipelineNotifications( string $pipelineId [, array $notifications ] );

AWS_ET::deletePipeline( string $pipelineId );

AWS_ET::testRole( string $inputBucket, string $outputBucket, string $role, array $topics );

AWS_ET::createPreset( array $options );

AWS_ET::listPresets();

AWS_ET::readPreset( string $presetId );

AWS_ET::deletePreset( string $presetId );

AWS_ET::setAuth( string $awsAccessKey, string $awsSecretKey );

AWS_ET::setRegion( string $region = 'us-east-1' );

AWS_ET::getStatusCode();

AWS_ET::getResponse();

AWS_ET::getErrorMsg();