AWS News Blog

The New Amazon Elastic Transcoder

Transcoding is the process of converting a media file (audio or video) from one format, size, or quality to another. Implementing a transcoding system on your own can be fairly complex. You might need to use a combination of open source and commercial code, and you’ll need to deal with scaling and storage. You’ll probably need to implement a workload management system using message queues or the like. You’ll probably need to license audio and video codecs. In short, it isn’t as easy as it could be.

The new Amazon Elastic Transcoder makes it easy for you to transcode video files in a scalable and cost-effective fashion. With no start-up costs, your costs are determined by the duration (in minutes) of your transcoded videos. Transcoding of Standard Definition (SD) video (less than 720p) costs $0.015 (one and a half cents) per minute in US East (Northern Virginia). High Definition (HD) video (720p or greater) costs $0.03 (three cents) per minute, also in US East. As part of the AWS Free Usage Tier, the first 20 minutes of SD transcoding or 10 minutes of HD transcoding are provided at no charge.

You can initiate transcoding jobs from the AWS Management Console or through the APIs. You can also arrange to receive notification at various points in the transcoding process.

Transcoding Model
The Amazon Elastic Transcoder takes input from an Amazon S3 bucket, transcodes it, and writes the resulting file to another S3 bucket. You can use the same bucket for input and output, and the buckets can be in any Region. If your transcoding jobs run in a particular Region and retrieve or place content in a different Region, you’ll pay the usual AWS data transfer charges.

You will create or reference objects of five distinct types each time you transcode a file. You’ll start with one or more Input Files, and create Transcoding Jobs in a Transcoding Pipeline for each file. Each job must reference a particular Transcoding Preset, and will result in the generation of a single Output File.

The Elastic Transcoder accepts Input Files in a wide variety of web, consumer, and professional formats. If the file contains multi-track audio, the first two will be passed through to the output, since they’re commonly used as the left and right channels.

The Elastic Transcoder generates Output Files. For the first release we are supporting the MP4 container type, the H.264 video codec, and the AAC (Advanced Audio Coding) audio codec.

You’ll need to create and named one or more Transcoding Pipelines. When you create the Pipeline you’ll specify Input and Output Buckets, an IAM role, and four SNS topics. Notifications will be sent when the Elastic Transcoder starts and finishes each Job, and when it needs to tell you that it has detected an error or warning condition. You can use the same topic for all of the notifications or you can use distinct topics for each one. You can create up to four Transcoding Pipelines per account by default; if you need more just contact us.

After you have created a Pipeline, you need to choose a Transcoding Preset (we’ve created them for a number of common output formats) or create a custom one. A Preset tells the Elastic Transcoder what settings to use when processing a particular Input File. Presets are named, and can reference another Preset as a base. You can specify many settings when you create a Preset including the sample rate, bit rate, resolution (output height and width), the number of reference and keyframes, a video bit rate, some thumbnail creation options, and more.

The next step is to create a Job (or lots of them, this is a highly scalable service). Each Job must specify a Pipeline, a Preset, and a pair of S3 keys (file names for Input and Output). The Elastic Transcoder can automatically detect the input frame rate, resolution, interlacing, and container type. You have the option to override the automatically detected values by specifying them in the Job, and you can also tell the Elastic Transcoder to rotate the video as needed, in increments of 90 degrees.

Jobs submitted to a Pipeline will be processed in submission order, but one Pipeline may process several of your Jobs simultaneously if resources are available. The amount of clock time needed to process a Job will vary depending on the particulars of the input file and of the settings in the Preset, but will typically be about one third (1/3) of the playing time of the file for a Standard Definition video. For example, a three minute video is generally transcoded in about one minute. You can pause and resume any of your Pipelines if necessary.

Your application can monitor the status of each Job by subscribing to the SNS topics associated with the Pipeline. It can also use the ListJobsByStatus function to find all of the Jobs with a given status (e.g. “Completed”) or the GetJob function to retrieve detailed information about a particular job.

Elastic Transcoder in Action
I transcoded a video using the AWS Management Console. Here are some screen shots. I start by creating a Pipeline and setting up SNS notifications:

I can see my Pipelines and their status::

Then I select a good Preset:

And create the Job:

I can monitor the Job’s status and await completion:

I created an email subscription to an SNS topic to ensure that I would receive a message after each of my videos had been transcoded successfully. Here’s what the notification looked like:

Get Started Now
Amazon Elastic Transcoder is available now in the following AWS Regions:

  • US East (Northern Virginia).
  • US West (Oregon)
  • US West (Northern California)
  • Europe (Ireland)
  • Asia Pacific (Japan)
  • Asia Pacific (Singapore

The following AWS tools and SDKs now include support for the Amazon Elastic Transcoder:

Learn more about Elastic Transcoder Pricing, read the Developer Guide and you’ll be good to go!

— Jeff;

Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.