弹性转码属性宽度和高度

时间:2015-10-13 14:00:34

标签: php amazon-web-services amazon-s3 amazon-elastic-transcoder

在何处指定需要转码的文件的宽度和高度。这是我的代码。

$job = $elasticTranscoder->createJob(array('PipelineId' => 'xx-nxx','OutputKeyPrefix' => 'output2/'.$folder.'/',

    'Input' => array(
    'Key' => $_GET['name'],
    'FrameRate' => 'auto',
    'Resolution' => 'auto',
    'AspectRatio' => '4:3',
    'Interlaced' => 'auto',
    'Container' => 'auto',
    ),
   'Outputs' => array(
    array(
        'Key' => $out,
        'Rotate' => 'auto',
        'PresetId' =>$p ,
        ),),));

我提到了这个aws document,当我把它包括在内时

'DetectedProperties' => array(
        'Width' => 540,
        'Height' => 720, ),),

它在说

  

“message”:“不要为'Input:DetectedProperties'指定值,

需要帮助!!

1 个答案:

答案 0 :(得分:-1)

请求的结构 - 创建作业:

POST /2012-09-25/jobs HTTP/1.1
Content-Type: application/json; charset=UTF-8
Accept: */*
Host: elastictranscoder.us-east-1.amazonaws.com:443
Content-Length: 300
{
   "Input":{
  "Key":"sample.mp4",
  "FrameRate":"auto",
  "Resolution":"auto",
  "AspectRatio":"auto",
  "Interlaced":"auto",
  "Container":"mp4"
   },
   "OutputKeyPrefix":"family-videos/",
   "Outputs":[
  {
     "Key":"sams-birthday.mp4",
     "ThumbnailPattern":"thumbnails/sams-birthday-{count}",
     "Rotate":"0",
     "PresetId":"1351620000000-100080"
  }
   ],
   "PipelineId":"1111111111111-abcde1"
}

要设置宽度和高度,请从可用的预设中创建自己的配置。