aws-sdk-php を使用して Amazon s3 Elastic Transcoder を統合しています。http://elastictranscoding.blogspot.in/リンクを使用してタスクを完了します。実装中に次のエラーに直面します:
致命的なエラー: Uncaught Aws\ElasticTranscoder\Exception\ResourceNotFoundException: AWS エラー コード: ResourceNotFoundException、ステータス コード: 404、AWS リクエスト ID: 820ccf2d-6fc3-11e3-85a1-cdbd862f75bb、AWS エラー タイプ: クライアント、AWS エラー メッセージ: 指定されたパイプラインが見つかりませんでした: アカウント = 008180918836、パイプライン ID = 1388230727728-l0b712。 modelpeopledemo\amazon_upload\Aws\Common\Exception\NamespaceExceptionFactory.php 行 91
ジョブ コードを作成します。
require 'aws-autoloader.php';
use Aws\ElasticTranscoder\ElasticTranscoderClient;
$aws = Aws\Common\Aws::factory('config.json');
createjob('trailer_480p.mp4'); exit;
function createjob($fname){
$aws = Aws\Common\Aws::factory('config.json');
$client = ElasticTranscoderClient::factory(array(
'key' => 'IAM user's public key',
'secret' => 'IAM user's secret key',
'region' => 'us-east-1'
) );
// Create a new transcoding job
$file_name = $fname;
$file_name_explode = explode( '.', $file_name );
$webm_transcode_request = $client->createJob( array(
'PipelineId' => 'my pipeline id',
'Input' => array(
'Key' => $fname,
'FrameRate' => 'auto',
'Resolution' => 'auto',
'AspectRatio' => 'auto',
'Interlaced' => 'auto',
'Container' => 'auto',
),
'Output' => array(
'Key' => 'trailer_480p.mp4',
'ThumbnailPattern' => $file_name_explode[0] . '-700thumb-{resolution}-{count}',
'Rotate' => '0',
'PresetId' => '1351620000001-000020'
)
) );
return $webm_transcode_request;
}
config.json
{
"includes": ["_aws"],
"services": {
"default_settings": {
"params": {
"key": "AWS public key",
"secret": "AWS secret key",
"region": "us-east-1"
}
}
}
}
私のユーザー ポリシーは次のとおりです。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"elastictranscoder:*",
"s3:*",
"iam:*",
"sns:*"
],
"Resource": "*"
}
]
}
私のユーザーグループのポリシーは次のとおりです。
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Sid",
"Effect": "Allow",
"Action": "*",
"Resource":"*"
}
]
}
エラスティック トランスコーダー サービスにアクセスする権限がないと思います。提案してください。少し早いですがお礼を。