In this article we will discuss the Amazon Elastic Transcoder service from AWS.

Amazon Elastic Transcoder allows users to convert media files into formats required by playback devices. These media files are stored in Amazon S3 buckets. One use case for Elastic Transcoder is converting a high-quality video into formats that can be played on tablets and mobile devices.

VMware Training – Resources (Intense)

There are a few Elastic Transcoder components:

Jobs

With jobs you are doing the actual transcoding work. Transcoding is the media file conversion to a different format. A single job can convert one file into up to 30 formats.

When a job is created, several pieces of information have to be provided: the file that will be transcoded or the input file; the names of the transcoded files produced by Elastic Transcoder; and a template or preset that has to be assigned for each format to which the file is transcoded. The template has specific audio and video settings that will be applied to the transcoded files.

Pipelines

The pipelines are simple queues used to manage the transcoding jobs. When a transcoding job is created, it has to be assigned to a pipeline. The transcoding jobs in a pipeline are executed in the order they are added to the pipeline. Furthermore, if a job has to convert a file into multiple formats, then the file is transcoded into each format in the order the formats are specified in the job.

A best practice approach is to create two pipelines: one for standard priority jobs and where most of the jobs will belong to, and another for high priority jobs where files that need to be transcoded immediately will belong. If a new job is created and the pipeline already has a job, then the new job is queued and it will be processed as soon as resources are available for the pipeline. If all the resources are used, the next job in the pipeline will be processed as soon as one of the currently running jobs finish.

Jobs in the pipeline can be processed simultaneously if resources are available. Because jobs can be different, they can finish in a different order than they were created.

Presets

Presets are templates that describe the settings that will be applied to the transcoded files. Elastic Transcoder provides some default presets for different formats and users can create their own presets. The preset is specified when the job is created.

Notifications

Notifications are used to keep the user informed when a job is started, when a job is finished or when a job encountered an error or warning during processing. Using notifications, the need for constant checking to find out when a job is finished is eliminated. Notifications are implemented with the help of the Simple Notification Service and they are defined when the pipeline is created.

Now let’s look at a few of the settings that are specified when a pipeline is created. This is the wizard page through which a pipeline is created:

As you can see in the “General Settings”, you specify the name of the pipeline, the S3 bucket where the original media file is located and the IAM role that is used by Elastic Transcoder to transcode jobs for this pipeline.

In the “Configure Amazon S3 Bucket for Transcoded Files and Playlists” section, you specify in which S3 buckets the transcoded files and the playlist will be located along with the storage type used.

In the “Configure Amazon S3 Bucket for Thumbnails”, you specify the S3 bucket used as location for the thumbnail files and the storage type.

Now let’s see how the configuration page for a job looks like. We will split the page in sections. Here is the first section:

In this section, you specify to which pipeline the job belongs, the name of the file that will be transcoded, an optional prefix that is prepended by Elastic Transcoder to the output files, the playlist and the thumbnails.

The next section is this:

Here you select the preset that you want to use for this job and the name of the file after the job has completed. Based on the type of the preset chosen, you might split the output file into multiple segments, as we will see in the second part of the series. You can add another transcoding in a different format by using “Add Another Output”.

The last important section is the playlist section:

Here you need to specify the name of the playlist and the format. Also, you need to specify which output files (the transcoded files) will be part of the playlist.

Basically the playlist will contain a list of segments with different formats and the playback device can request segments from different types of transcoded files based on the bandwidth that is available.

We have now reached the end of the first article of the series. In this part we discussed the basic concepts of Amazon Elastic Transcoder, its components and a few of its mandatory settings for pipelines, jobs and presets.

In the next part of the series we will see Amazon Elastic Transcoder in action by converting one video file into three different formats and then stream the content with the help of an Amazon CloudFront distribution. Obviously, the original video and its transcoded forms will be stored in an Amazon S3 bucket.

In case you want to dive deeper into the pipelines, jobs and presets settings, you will find more information presented in the references section below.

References