The input_asset field reference the input file that needs transcoding. CT supports two sources:

  • S3 Bucket/File
  • HTTP/HTTPS accessible file

S3 File

To reference a file located on AWS S3, use the following format:

"input_asset": {
    "type": "VIDEO",
    "bucket": "cloudtranscode-dev",
    "file": "/input/video1.mp4"
}

Details:

  • type: VIDEO or IMAGE (no other types are yet supported)
  • bucket: S3 bucket name
  • file: S3 key to file in bucket

You must provide this entry to all activities so they know which asset they need to download from S3 and process.

Based on the `type’ the proper Transcoder will be started for you: ImageTranscoder or VideoTranscoder.

HTTP/HTTPS file

To reference a file over HTTP use the following format:

"input_asset": {
   "type": "VIDEO",
   "http": "[URL]"
}

This is a very efficient of transcoding videos. With this method, there is no need to pre-download the asset locally in the /tmp folder. FFmpeg will download the file and transcode on the fly for you. You will save precious time.

This only works for the VIDEO type as FFMpeg supports the HTTP protocol. For IMAGE type, you must specify a bucket and key.