Tried to run the trans.php program from wamp server from the path
C:\wamp\www\sep24\e\trans.php
I have included the AWS folder in
C:\wamp\www\sep24\e\Amazon\
And AWS credential file in wamp/www folder as well user directory for the access
C:\wamp\www\.aws\credentials & C:\Users\username\.aws\credentials
This is my Transcoder program
<?php
require 'Aws/aws-autoloader.php';
use Aws\ElasticTranscoder\ElasticTranscoderClient;
$elasticTranscoder = ElasticTranscoderClient::factory(array(
'version' => 'latest',
'region' => 'ap-southeast-1',
'credentials' => array(
'key' => '',
'secret' => '',
)
));
$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' => '',
),
),
));
$jobData = $job->get('Job');
$jobId = $jobData['Id'];
$elasticTranscoder->readJob(array('Id' => $jobId));
$jobData = $resposne->get('Job');
if ($jobData['Status'] !== 'progressing'
&& $jobData['Status'] !== 'submitted')
{
echo $jobData['Status'];
}
?>
When i'm trying to run the program. I get two different error whenever I change the path used in the USE in the 3rd line.
If I run with use Aws\ElasticTranscoder\ElasticTranscoderClient;
I get this error
Fatal error: Uncaught exception 'Guzzle\Common\Exception\InvalidArgumentException' with message 'Unable to open C:\wamp\www\sep24\e\Aws\Aws\ElasticTranscoder/Resources/elastictranscoder-latest.php for reading' in C:\wamp\www\sep24\e\Aws\Guzzle\Service\AbstractConfigLoader.php on line 120
And when I run it with this path use Amazon\Aws\ElasticTranscoder\ElasticTranscoderClient;
I get error like this
Fatal error: Class 'Amazon\Aws\ElasticTranscoder\ElasticTranscoderClient' not found in C:\wamp\www\sep24\e\trans.php on line 5
I have included all the packages of AWS which I downloaded from the git.
What change should I make ?
Aucun commentaire:
Enregistrer un commentaire