'default', 'version' => '2012-09-25', 'region' => $region, 'default_caching_config' => $tmp_path, ]); // This will generate a 480p 16:9 mp4 output. $preset_id = '1351620000001-000020'; $pipeline_id = '1234567890112-abcdefg'; $S3_file = 'folder/filename.txt'; // All outputs will have this prefix prepended to their output key. $output_key_prefix = 'elastic-transcoder-samples/output/'; $outputs = [ [ 'Key' => $S3_file, 'PresetId' => $preset_id ] ]; // Create the job. try { $create_job_result = $transcoder_client->createJob([ 'PipelineId' => $pipeline_id, 'Input' => ['Key' => $S3_file], 'Outputs' => $outputs, 'OutputKeyPrefix' => $output_key_prefix ]); var_dump($create_job_result["Job"]); } catch (AwsException $e) { // output error message if fails echo $e->getMessage() . "\n"; } // snippet-end:[elastictranscoder.php.create_job.main] // snippet-end:[elastictranscoder.php.create_job.complete]