AWS S3 file upload with progress bar, transcoding video with Amazon Elastic Transcoder
- File Upload
- Progress bar
- Create job
- Read job
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.
Creating a transcoding job:
$pipelineId = 'pipelineId';
$input = array('Key' => 'inputFile');
$output = array(
'Key' => 'Sample.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'];
}
Get job info:
AWS_ET::readJob( string $jobId );
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/getting-started.html