2

我在 RoR 网站上工作,并使用carrierwave gem 在 S3 上上传视频,现在我想为视频实现弹性转码,但我知道如何进行。

请问有人可以指导我吗?

谢谢

4

1 回答 1

-1

您可以先观看此视频https://www.youtube.com/watch?v=wSYHdt1TJVQ#t=160

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: 20130114T174952Z
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":"recipes/lasagna.mp4",
      "FrameRate":"auto",
      "Resolution":"auto",
      "AspectRatio":"auto",
      "Interlaced":"auto",
      "Container":"mp4"
   },
   "OutputKeyPrefix":"recipes/",
   "Outputs":[
      {
         "Key":"mp4/lasagna-kindlefirehd.mp4",
         "ThumbnailPattern":"mp4/thumbnails/lasagna-{count}",
         "Rotate":"0",
         "PresetId":"1351620000000-100080",
         "Watermarks":[
            {
               "InputKey":"logo/128x64.png",
               "PresetWatermarkId":"company logo 128x64"
            }
         ]
      },
      {
         "Key":"iphone/lasagna-1024k",
         "ThumbnailPattern":"iphone/th1024k/lasagna-{count}",
         "Rotate":"0",
         "PresetId":"1351620000000-987654",
         "SegmentDuration":"5"
      },
      {
         "Key":"iphone/lasagna-512k",
         "ThumbnailPattern":"iphone/th512k/lasagna-{count}",
         "Rotate":"0",
         "PresetId":"1351620000000-456789",
         "SegmentDuration":"5"
      }
   ],
   "Playlists": [
      {
         "Format": "HLSv3",
         "Name": "playlist-iPhone-lasagna.m3u8",
         "OutputKeys": [
            "iphone/lasagna-1024k",
            "iphone/lasagna-512k"
         ]
      }
   ],
   "PipelineId":"1111111111111-abcde1"
}
于 2013-09-28T22:42:42.227 回答