AWSには、ElasticTranscoderと呼ばれる新しいサービスがあります。私はいくつかのPHPを知っていますが、私はこれを噛むことができる以上に噛み砕きました...
変数を受け取り、JSONリクエスト(もちろん適切にフォーマットされたもの)を作成し、AWSでジョブを作成する単純なPHP関数をどのように作成しますか?AWSが提供する構文は次のとおりです。
注:必要なすべてのフィールドを入力できるフォームがすでに作成されています。
To create a job, send a POST request to the
/2012-09-25/jobs
resource.
構文は次のとおりです。
POST /2012-09-25/jobs HTTP/1.1
Content-Type: application/json; charset=UTF-8
Accept: */*
Host: elastictranscoder.Elastic Transcoder endpoint.amazonaws.com:443
x-amz-date: Mon, 14 Jan 2013 17:49:52 GMT
Authorization: AWS4-HMAC-SHA256
Credential=AccessKeyID/request-date/Elastic Transcoder endpoint/ets/aws4_request,
SignedHeaders=host;x-amz-date;x-amz-target,
Signature=calculated-signature
Content-Length: number of characters in the JSON string
{
"Input":{
"Key":"name of the file to transcode",
"FrameRate":"auto"|"10"|"15"|"23.97"|"24"|"25"|"29.97"|"30"|"60",
"Resolution":"auto"|"width in pixelsxheight in pixels",
"AspectRatio":"auto"|"1:1"|"4:3"|"3:2"|"16:9",
"Interlaced":"auto"|"true"|"false",
"Container":"auto"|"3gp"|"asf"|"avi"|"divx"|"flv"|"mkv"|"mov"|"mp4"|
"mpeg"|"mpeg-ps"|"mpeg-ts"|"mxf"|"ogg"|"vob"|"wav"|"webm"
},
"Output":{
"Key":"name of the transcoded file",
"ThumbnailPattern":""|"pattern",
"Rotate":"auto"|"0"|"90"|"180"|"270",
"PresetId":"preset to use for the job"
},
"PipelineId":"pipeline to add the job to"
}
提供する必要がある上記のコードの部分は、構文のこの元の投稿でイタリック体で示されています。