AWS for M&E Blog

Deploying virtual linear OTT channels using AWS Media Services

This blog post details how to create virtual linear OTT channels that can sequentially deliver both video on demand (VOD) and live streaming video by defining a channel schedule in AWS Elemental MediaTailor using Channel Assembly. This stems from an increased customer need to provide free ad-supported television (FAST), which is rapidly gaining traction with consumers and, in some cases, is used as a remedy for subscription overload. When delivered with scalable services from Amazon Web Services (AWS), FAST provides an opportunity to deliver more value with targeted ads and predictable costs. This post describes how to build and monetize a 24/7 FAST linear over-the-top (OTT) channel using VOD assets and live video streams, and how to incorporate server-side ad insertion.


The setup consists of three primary components:

  1. A live video source using an AWS Elemental MediaLive channel that writes just-in time transcoded video segments to an AWS Elemental MediaPackage channel for origination.
  2. Amazon Simple Storage Service (S3) buckets to store VOD sources, filler slates, and ad break slates.
  3. A linear OTT channel to assemble individual sources of content and declare the upcoming program schedule to exactly predict the sequence of content and ad-breaks using the Channel Assembly feature of MediaTailor.


End-to-end media workflow for delivering both VOD and live streaming video sequentially by defining a channel schedule in AWS Elemental MediaTailor using Channel Assembly

Create a live source using MediaLive and MediaPackage

You can quickly create a live streaming endpoint from the AWS Management Console by using the MediaLive Workflow Wizard. Simply follow the steps described in the blog post entitled

Quickly create a live streaming channel with AWS Elemental MediaLive Workflow Wizard.

Once you create a live channel, you will verify in MediaPackage → Channels → <your channel> → Manage endpoints → < your HLS endpoint>  → Package settings → Additional configuration → Program date/time interval (sec.) is set to “1” as described in the following image.

Packager Settings for a MediaPackage Origin endpoint

Create a VOD source to match the transcode profile of the live source

You will need to upload your VOD assets (which could be in an MP4 container) to an Amazon S3 bucket. Re-transcode the assets using AWS Elemental MediaConvert to match the ABR stack of the MediaLive channel. This will mean that the number of renditions and their respective resolutions are identical for both the re-transcoded VOD assets and the live streaming endpoint.

Configure MediaTailor Channel Assembly

Before setting up Channel Assembly, it is essential to consider the following:

a. Live, VOD, and slate ad sources must include the same number of HLS renditions

b. Live sources must contain HLS #EXT-X-PROGRAM-DATE-TIME tags

c. Live, VOD, and slate sources must be reachable via Internet (e.g. Amazon CloudFront distribution)

From the AWS Management Console→MediaTailor, select “New source location”

MediaTailor Console UI

Fill in “Name” and “Base URL” from the source location menu. “Base URL” refers to the domain where Channel Assembly will look for VOD or live content. This example relates to a MediaPackage endpoint (notice that it does not include the entire path but just the domain name).

From the source location menu, add live source.
Creating source location for a live source in MediaTailor Channel Assembly

You will add a source group that associates a package configuration with an output on a channel. When you create the package configuration on the source, you identify the source group’s name.

When you create the output on the channel, you enter that same name to associate the output with the package configuration. Sources, either live or VOD, that are added to a program on a channel must belong to the source group that’s identified in the output, i.e. source-group-1 in this example.

Fill in “Name” and “Relative path” from the live source menu. Notice that the last parameter refers to the path that complements the domain (set before) to retrieve the live content.

Associating a source group with a packaging configuration of a MediaPackage endpoint for a Live source in the MediaTailor Channel Assembly

A similar process is performed for VOD and slate sources.

Creating a VOD source location in the MediaTailor Channel Assembly

Associating a source group with a packaging configuration of a VOD source in the MediaTailor Channel Assembly

If an ad break is required within a specific duration (e.g., 30 sec), you need to add a VOD source of the same duration. In this example, a 30-second color bar is added.

Associating a source group with a packaging configuration of a Slate Ad source which is 30 second color-bar in the MediaTailor Channel Assembly

Fill in “Name”, select Tier to “Standard”, and specify “Source location” and “VOD Source name” to be used as filler slate in case the live channel does not have live or VOD programming available.

Setting the channel details such as name, tier, Filler slate ad name and source for the MediaTailor Channel Assembly

Next, fill in “Manifest Name” with a convenient value. In most cases, “index” would be fine, and the manifest perceived by end-user video players would be “index.m3u8”.

Defining the properties of the channel output such as manifest name, format type and source group

In the next section, select the most appropriate option for access control. In this example, you will choose “Attach public policy” because we want to enable internet users to retrieve our virtual live OTT channel.

Refer to to add more conditions.

Attaching an access control policy to the channel

Once the MediaTailor channel is ready, you can add VOD and live programs.

Adding programs in a linear schedule for the MediaTailor Channel Assembly

Each VOD program can include single or multiple ad breaks. The parameters “Source location” and “VOD Source” need to be filled in to set up an ad break. The duration of content referenced by those fields must match exactly the ad break duration. In the case of multiple ad breaks, the parameter “Offset in millisecond” must be defined. This value indicates the time in the future, considering the “zero” reference at the beginning of the VOD content. In this sense, a single VOD source can contain multiple ad breaks of distinct duration over time. From more technical perspective, the action of the breaks would be SCTE-35 markers into the HLS manifest following DATERANGE format.  For more detail, visit

Introducing an ad break in the linear channel schedule by declaring the offset time and other details

For live sources, specify the date and time of the beginning of the program. It is essential the start time be at least 15 minutes after the current time. The “Relative Position” setting in the playback configuration does not apply to the first program in a linear schedule. The next program requires that value to be set to “After Program”.

Specifying the beginning date and time of the live program in the channel schedule

Once the programs are successfully created, start the channel. To test your channel, copy the URL displayed in the Channel “Output” section and play it using a HLS.js video player (a demo player is available here:

This URL can also be used to feed the “Ad-insertion” component of MediaTailor, acting as server-side ad insertion (SSAI) to perform an interaction with an ad decision server of a static VAST file located in an Amazon S3 bucket. The integration with a MediaTailor configuration and an ad decision server will be described in part 2 of this post.

Finding the playback URL for the linear channel in the MediaTailor Channel Assembly console

To test playback of the virtual linear OTT channel, go to,  introduce the URL copied in the previous step, and press “Apply”.

Using hls.js as the test HLS player by supplying the playback URL as the input to the web player

If the channel does not have programming available at playback, the slate video will display.

Testing the successful playback of ad break with the HLS web player


In this blog post, we created an HLS endpoint for distributing a virtual linear OTT channel, which we can also refer to as free ad-supported TV (FAST). We walked through the chronological steps to schedule programming for live and VOD content using MediaTailor Channel Assembly and to insert ad breaks to display slate ads. After deriving the endpoint URL, we verified the successful playback of the channel in a web-based test HLS video player. You can now switch smoothly between live events, such as news or sports, to VOD sources as well introduce ad-breaks to create a wide range of personalized live playlists for enhanced end-user experiences.

Devendra Sharma

Devendra Sharma

Devendra Sharma is a Solutions Architect at AWS with a passion for delivering cloud based live video transcoding and server side ad insertion solutions. He has more than 7 years of experience working with the Media & Entertainment Direct-To-Consumer vertical. In his past time, he likes to integrate open source IoT devices with low latency video streaming web applications and evangelize the benefits of creating and distributing creative content over AWS Cloud

Carlos Salazar

Carlos Salazar

Carlos Salazar is a senior solutions architect at AWS.