AWS Media Blog
Creating virtual linear channels using AWS Elemental MediaTailor
Media companies continuously look for opportunities to increase revenue from content they already own, either by scheduling older content during nonpeak hours or by delivering premium content as video on demand (VOD). Although both methods bring revenue for high-demand content, they do not give companies the option to make the most of low-demand content—specifically, content stored away in archives. That’s where Amazon Web Services (AWS) offers a solution.
AWS Elemental MediaTailor is a channel assembly and personalized ad insertion service you can use to create linear over-the-top (OTT) channels with existing video content and monetize those channels, other live streams, or VOD content with personalized advertising. Using MediaTailor, you can launch a virtual streaming channel with cost-efficient OTT delivery, without using broadcast resources or expensive software.
Content distributors using MediaTailor can choose to launch virtual OTT channels or pop-up channels that run similarly categorized content: for example, a channel dedicated to documentaries, action or drama movies, previous seasons of a reality show, or the most recent sports seasons. Sections of this content can be already available for viewers in your on-demand library, but viewers must usually search for content or get recommendations before they can begin watching. Virtual channels require fewer decisions from viewers before they can begin watching a program, and they can continue to watch the channel after a program finishes. Channels can run for a few days, weeks, or even years depending on the content catalog, viewership, and demand. With this setup, content distributors can adapt to their users’ interests and needs.
Using MediaTailor channel assembly, you can create channels in two modes. “Linear mode” provides fine-grained control of when individual sources are played and which sources follow on a channel output. This is similar to traditional channel playout. “Looping mode” permits programs to be set in a specific order following a loosely defined wall clock time so that there is content always playing on a channel output.
MediaTailor channel assembly makes it simple to monetize your channel by inserting ad breaks into your stream without having to condition it with Society of Cable Telecommunications Engineers (SCTE)–35 markers. You can use channel assembly with MediaTailor ad insertion, or you can use another server-side ad insertion (SSAI) service.
Channel assembly: how it works
At a high level, you prepare content to serve by transcoding it into multi-bitrate HTTP Live Streaming (HLS), Dynamic Adaptive Streaming over HTTP (DASH), or both formats. Next, you provide MediaTailor with details of your source location (you can simply think of this as your origin) and your manifest files. And finally, you create a channel, include the assets, and create a program. Now, you have a virtual channel ready for viewing.
If you already have your assets in a VOD library, you can easily get started using MediaTailor channel assembly. If you intend to do ad insertion (which many customers may want to do), you will need to make sure you also have an ad slate. The ad slate should be a brief clip that is encoded and packaged in the same format as the rest of your library.
Let’s walk through the steps required for customers who do not currently have assets packaged in a VOD library and have possibly stored their assets in a mezzanine format in Amazon Simple Storage Service (Amazon S3) Glacier storage classes (which are purpose built for data archiving) or Linear Tape-Open (LTO) tapes.
Prepare the assets (optional)
If source assets are stored in mezzanine format, they must be transcoded to HLS or to an HLS and DASH multibitrate output using AWS Elemental MediaConvert—a file-based video transcoding service—or a similar encoding service. Customers with mezzanine assets in Amazon S3 Glacier storage classes can build a simple workflow to restore the assets. Upon restoration, a Lambda function can initiate a transcoding job using MediaConvert. The output from the MediaConvert job is later made available to MediaTailor.
Set up a source location
A source location represents the origin server where your content is stored. It can be Amazon S3, a standard web server, a content delivery network (CDN), or a packaging origin, such as AWS Elemental MediaPackage, which reliably prepares and protects video for delivery over the internet. MediaTailor fetches the content manifests from your source location and uses them to assemble a live sliding manifest window that references the underlying content segments.
For Create source location, we recommend that you use a CDN like Amazon CloudFront—which is built for high performance, security, and developer convenience—to deliver your segments and manifest. You can benefit by using a CDN to lower your content delivery costs and improve performance. Using MediaTailor, you can configure your content segments’ source within the Segment delivery server configuration. Here, you specify the Base URL of your CDN, and MediaTailor includes this as part of the manifest.
If Amazon S3 is your source location, be sure to use the Amazon S3 virtual hosted-style request URL format. For example,
https://bucket-name.s3.Region.amazonaws.com. You can then apply an Amazon S3 bucket policy to allow
s3: GetObject permissions to read all top-level manifests referenced by your VOD source package. If you use a custom origin that will serve both manifest and segments, you can skip this. We recommend that you activate authentication for custom origins. You can read more about configuring AWS Secrets Manager access token authentication here. (AWS Secrets Manager helps you protect secrets needed to access your applications, services, and IT resources.)
If your assets are already in HLS format and you wish to use a packaging service to deliver content in multiple bitrates and formats, you can use MediaPackage as your source location. Using MediaPackage, you can perform just-in-time packaging for both live and VOD content. MediaPackage integrates with other AWS Media Services, including MediaTailor.
Add a VOD source
Now that you have specified the source location, the next step is to add individual sources. You are asked to provide a Source group name, the Type (HLS or DASH), and the Relative path of the manifest file. It’s important to group like-packaged formats into the same source group. Source groups can also be used together—for example, high-definition (HD) and standard-definition (SD) versions of the content if you wish to provide discrete playback URLs for HD or SD.
In this example, I have my manifest files stored in an Amazon S3 bucket and served through Amazon CloudFront, so I simply select the Source Location that I created and click Add VOD Source. Here, I provide a meaningful name for the VOD source and each source group. I will create source groups for HLS and DASH, respectively.
I continue to add other sources to include in my channel, including the ad slate. If you receive any alerts, go back and review your source location and permissions to make sure that MediaTailor has access to the manifest files.
Once you have added all the VOD sources, the next step is to create your channel.
Set up your channel
Here you are asked to provide a name and choose the playback mode. The playback mode determines the type of transitions that should occur between programs. It also determines the transition after the last program has played. As the name suggests, loop mode resumes at the first program in the schedule after finishing the final program.
In linear mode, each program in the schedule plays only once, back to back. If you choose linear mode, you are asked to provide details for your filler slate. You must configure the filler slate if your channel uses linear playback mode. MediaTailor uses the slate to fill gaps between programs in the schedule during playback.
I created my channel in loop mode. Next, I am asked to configure my outputs. I intend to deliver both HLS and DASH, so I will add outputs to my configuration. I select the appropriate format for each output and enter the Source group name that I created before. To keep it simple, I will leave the Manifest name as “index” for both HLS and DASH.
Next, I choose a Channel Policy that I wish to assign. I want to serve the content to anyone, so I choose Attach a public policy to create the channel. I can always come back and edit the policy if I want to restrict access to this channel.
So far, we have configured the source location (my Amazon CloudFront CDN), added individual sources, and created a channel. The next step is to build a program.
Add a program
You can start by providing a name for the program and then define the program list. This determines the order in which content appears on your channel. When you create a program, you are given the option to insert ad breaks. I created my program to play a 15-second ad at the start and a 15-second ad at the midway point of my sources. I have also configured it to play “NextHLSDemo” right after “HLSDemo,” which makes my timeline look like this:
Start and test your channel
Now that I have my program created, it’s time to start the channel and test it. I can get the channel manifest details by clicking on Channel and then Outputs. From here, I can copy the manifest URI and test it. You can configure MediaTailor as the origin to your CDN as well.
The Channel schedule tab shows how my program looks. You can add new programs here, view the scheduled ad breaks, or even delete a particular program as necessary.
You can replace the ad slates with dynamic ads by integrating with MediaTailor SSAI. To do so, create a MediaTailor configuration. Get the HLS playback URL from the Channel outputs tab—you will use it when creating the configuration. You will also need the details for your Ad decision server. For demonstration, I am using my ad decision server hosted here: https://channelassembly.videocloud.live/vast/ads-response.xml
Once your configuration is created, you will see playback endpoint prefixes listed at the top of the page. Copy the HLS or DASH playback prefix (for example, “index. m3u8”), and append the manifest name and player parameters.
Your final URL should look similar to this:
I now have a channel that runs in loop mode. This lets viewers watch their favorite content, and increases my revenue by serving ads or promoting my other content.
Channel assembly comes with a fixed running cost. It is easy to implement and integrate with your existing workflows, and it lets you spin up new channels to meet different viewing demands at low cost.
For example, if you assemble and start a linear channel running in the AWS US East (N. Virginia) Region and run scheduled programming in a loop on the channel 24/7 for one month, your cost for the month would be $73.00.
Read how one of our customers has amplified audience engagement using channel assembly in AWS Elemental MediaTailor.
We have also created a simple-to-follow workshop where you can learn how to create your first virtual channel. You can access the workshop details here: https://channel-assembly.workshop.aws/