Tried to run the elastic transoder php code from et/s/wr.php. wr.php contains the php transcoder code. Here is my code.
<?php
use Aws\ElasticTranscoder\ElasticTranscoderClient;
$elasticTranscoder = ElasticTranscoderClient::factory(array(
'credentials' => array(
'key' => '',
'secret' => '',
),
'region' => 'ap-southeast-1', // dont forget to set the region
));
$job = $elasticTranscoder->createJob(array(
PipelineId' => '',
'OutputKeyPrefix' => 'video'.time().'.mp4',
'Input' => array(
'Key' => 'video.mp4',
'FrameRate' => 'auto',
'Resolution' => 'auto',
'AspectRatio' => 'auto',
'Interlaced' => 'auto',
'Container' => 'auto',
),
'Outputs' => array(
array(
'Key' => 'myOutput.mp4',
'Rotate' => 'auto',
'PresetId' => '',
),),));
// get the job data as array
$jobData = $job->get('Job');
// you can save the job ID somewhere, so you can check
// the status from time to time.
$jobId = $jobData['Id'];
$elasticTranscoder->readJob(array('Id' => $jobId));
$jobData = $resposne->get('Job');
if ($jobData['Status'] !== 'progressing'
&& $jobData['Status'] !== 'submitted')
{
echo $jobData['Status'];
}
?>
This is the error when I'm running from the loaclhost.
Fatal error: Class 'Aws\ElasticTranscoder\ElasticTranscoderClient' not found in C:\wamp\www\sep24\et\s\wr.php on line 5
So what should be done.. ? Need Help..
Aucun commentaire:
Enregistrer un commentaire