AWS for M&E Blog

Schedule live linear channel playout using AWS Elemental MediaTailor

Introduction

Scheduling live linear TV playout for distribution via over-the-top (OTT) platforms is a common use case for media customers around the globe. This approach provides an opportunity to monetize content in multiple ways. For example, some OTT platforms provide a “before-TV experience” as a premium feature where viewers can watch their favorite content before it’s aired on broadcast TV. To achieve “before-TV” functionality, OTT platforms acquire content prior to actual broadcast and make videos available on demand. In this blog post, we look at how customers can make use of existing content by converting it to a live channel.

In addition to the distribution of linear TV programming via OTT platforms, customers may also have a requirement for temporary live channels, such as:

  1. Creating live pop-up channels
  2. Running a live channel for e-commerce and online ticketing platforms
  3. Creating a live class schedule for an educational platform or online school

Many customers schedule live linear channels by running costly live encoders or by using complex third-party playout systems. Traditional live linear channel playout systems can be expensive and complex, and may eat into the profit margins of operating these channels. Ensuring high availability of traditional live linear channels is another challenge because content availability and quality depends on the incoming live stream from third-party providers.

In this blog post, we demonstrate how to seamlessly and cost-effectively create live linear channels within minutes using existing content and schedules.

Overview

This post walks through a sample utility to automate linear content scheduling using the Channel Assembly feature of AWS Elemental MediaTailor, which leverages an electronic program guide (EPG) for automation. AWS Elemental MediaTailor from Amazon Web Services (AWS) is a channel assembly and personalized ad-insertion service for video providers to create linear over-the-top (OTT) channels using existing video content. The Channel Assembly feature uses manifest manipulation technology to allow for cost-effective linear channel creation and operation at scale.

An EPG is a system providing scheduling information for broadcast programming. It offers users of television or radio with continuously updated menus that display information for current and upcoming programs. This walk-through uses the XMLTV format to create the schedule. XMLTV is an XML-based file format designed to store scheduling information.

Channel Assembly benefits

  1. Highly cost efficient even for low viewership channels
  2. Platforms can reuse existing multi-bitrate content like HLS or DASH for creating live channels
  3. Provides monetization capability by inserting ads without conditioning the content for SCTE markers

Implementation

The utility used in this walk-through is called Cloud Playout Scheduler (CPS). CPS acts as a wrapper over MediaTailor Channel Assembly and lets customers take live channels to production in minutes, using existing scheduling information.

CPS is built using the AWS Serverless Application Model (SAM). The utility consists of three main modules:

  1. CPS-UI: This module is the frontend layer of CPS. It enables the channel administrator to create and edit playout schedules for a linear channel. Users can choose to create the schedule manually via UI or by uploading EPG schedule files. Admin users can start and stop channels seamlessly from UI.
  2. CPS-backend: This module is the core API layer of CPS. All actions on the frontend result in API calls to this layer. This component includes all business logic, and is responsible for parsing/validating uploaded EPG files. All schedules persist in the database. Schedule information is then communicated to the next layer for scheduling.
  3. CPS-scheduler: This module is responsible for creating channels and scheduling programs in MediaTailor Channel Assembly. The backend shares the scheduling information with this layer in the form of a simplified XMLTV file. This layer is responsible for converting all scheduling information into respective API calls to MediaTailor.

Architecture

Architecture diagram explaining the user flow of cloud playout scheduler. Same is explained in detail under user flow section

User flow

  1. Channel Admin connects to frontend from a browser and authenticates using credentials
  2. Admin uploads EPG schedule using the UI
  3. CPS-backend parses the uploaded EPG and creates a timeline
  4. Admin updates program URLs for each program in timeline and saves it
  5. When Admin clicks to create channel, CPS-scheduler will create the channel
  6. CPS-scheduler gets the parsed EPG from backend and makes request to MediaTailor
  7. CPS-scheduler is responsible for creating, starting, and stopping the channel in MediaTailor
  8. End viewers can then watch content as per schedule created by this channel

Prerequisites

To deploy this sample application, you need:

  1. The AWS SAM CLI, Nodejs, and AWS CLI installed.
  2. Access to the GitHub repository.
  3. AWS credentials with necessary permissions to create the resources configured on the machine.

Note: We recommend using the AWS Cloud9 IDE. This will have all CLIs pre-deployed.

Deploying the application

  1. Clone code from the GitHub repository.
  1. In the GitHub repository, deployment instructions for each section of the example application are available. The repo contains three directories for the frontend (cps-ui), core layer (cps-backend), and scheduler layer (cps-scheduler) as per the solution shown in the reference architecture.

Note: Readme.md files contain all commands and sample parameters.

Creating admin user in Amazon Cognito

  1. Open AWS Console and go to Amazon Cognito
  2. Click on “Manage User Pool”
  3. Click on user pool name that was created by SAM. (By default, the template will use “cps-cognito-userpool”.) If you have changed it while deploying cps-backend, select appropriately
  4. Under “General Settings” open “Users and Groups”
  5. Click on “Create User”
    • Provide username and temporary password. Username must be an email address
    • Uncheck “Mark phone number as verified”?
    • Uncheck “Mark email as verified”?
    • Click on “Create User” button
  6. New User will be validated and activated automatically after first login

Create a live channel from front-end

1. Open URL “WebsiteURL” located in the output-parameters of cps-ui template in a web browser

2. Log-in with Cognito user credentials created previously in step 5

Steps to create a simple Live channel using user Interface. Same is explained under section "Create a Live Channel from front-end"

3. Enter a channel name (e.g. my promo channel) and click on the + icon to create the channel

4. Wait for the page to reload

5. Click on “Add Program” and add the following details.

    • Select a program Sequence (e.g.: 01 00)

Note: As of today this is used only to sequence the program. The channel will adhere to the actual content length and not the specified time

Note: This is a sample URL from the internet. You can choose to use your own asset.

    • Save the schedule by clicking on the green Save icon

6. Add one more schedule by clicking the Add Program button and provide details similar to step 5

7. Click the “Create Channel” button. Once the channel is created, this button will change to “Start Channel”

8. Next, click on “Start Channel”. Once the channel is started, the status of the channel will change to “Now Playing”

Steps explaining how to start a channel playout from user interface. Same is explained in step 8 of this section

9. Click on the “Copy URL” button and the URL of your channel will be copied to your clipboard, which you can use in your application or video player

You can now create a live pop-up channel seamlessly within minutes using CPS. You can choose to upload an EPG to create the schedule. Note that it may take a few minutes for the schedule to populate.

Steps to upload an EPG from User Interface. Click on upload EPG Button on user interface and select your EPG. Your schedule with be created as per EPG

Note: CPS supports EPG upload only in xmltv format.

We have successfully set up an application that can schedule and launch live channels in an easy and cost-efficient way from existing VOD content.

Clean up

    • Stop channels from front-end when they are no longer needed to avoid unnecessary costs
    • To clean up the entire infrastructure, follow the clean-up steps mentioned in Readme.md files
    • If Cloud9 was launched for deployment, remember to delete that as well

Resources

To learn more about Channel Assembly and server-side ad insertion (SSAI) using AWS Elemental MediaTailor, visit the MediaTailor product page. Refer to our Channel Assembly Workshop to gain some hands-on experience using Channel Assembly. Finally, refer to this blog post for creating a live channel from existing VOD content.

Girish Nair

Girish Nair

Girish Nair is the Media & Entertainment Solution Architect, focused on helping customers to move production control rooms to cloud using AWS services.

Maheshwaran G

Maheshwaran G

Maheshwaran G is a Specialist Solution Architect working with Media and Entertainment supporting Media companies in India to accelerate growth in an innovative fashion leveraging the power of cloud technologies. He is passionate about innovation and currently holds 8 USPTO and 7 IPO granted patents in diversified domains.