Menu
AWS Elemental MediaLive
User Guide

Getting Started with AWS Elemental MediaLive

This tutorial describes how to ingest a video source from an RTP source and generate one HLS output that contains one H.264 video encode and one audio encode. AWS Elemental MediaLive will send the output to AWS Elemental MediaPackage. The output will consist of the following:

  • One master manifest: channel.m3u8

  • One rendition manifest called channel_1.m3u8.

  • TS files for each output: channel_1.00001.ts, channel_1.00002.ts, channel_1.00003.ts, and so on.

This tutorial uses the default values for most configuration fields in the channel.

Note

All the text marked as an example in this tutorial is just that – a sample that shows what a piece of information typically looks like. You must replace each example with the information that is valid for your situation.

Prerequisites

Before you can use AWS Elemental MediaLive, you need an AWS account and the appropriate permissions to access, create and view AWS Elemental MediaLive components. Complete the steps in Setting Up AWS Elemental MediaLive and then return to this tutorial. You will not be able to use AWS Elemental MediaLive, even as an administrator with full access, until you have performed those steps.

Step 1: Set up the Upstream System

The upstream system is the system that is streaming the video to AWS Elemental MediaLive. A contribution encode "on the ground" is a typical upstream system. You must perform some setup of your upstream system before you start working in AWS Elemental MediaLive. For the purposes of this tutorial, the upstream system must be capable of sending a video stream via RTP.

  1. Set up your upstream system to perform an RTP push from a specific IP address.

    In a typical deployment of AWS Elemental MediaLive, you provide two sources of the video asset you want to encode. But for this tutorial, you have only one source that you will duplicate within AWS Elemental MediaLive. This setup is absolutely not recommended for production usage.

  2. Make a note of the IP address. For example, 192.0.2.0.

  3. Keep in mind that the input will need to be ready when you start the associated channel.

Step 2: Set up the Downstream System

In this tutorial, the downstream system (the destination for the output from AWS Elemental MediaLive) is AWS Elemental MediaPackage.

You must set up a channel in this service and you must set it up now because you need the input URLs that AWS Elemental MediaPackage will generate; you enter these input URLs into AWS Elemental MediaLive. You must create two channels in AWS Elemental MediaPackage because you will create two destinations in AWS Elemental MediaLive.

  1. Go to the AWS Elemental MediaPackage console.

  2. In a new web browser tab or window, display the Getting Started for AWS Elemental MediaPackage and follow steps 1 to 3 to create one channel and its endpoint.

  3. Make a note of the input URL, name, and password that AWS Elemental MediaPackage generates. For example:

    • https://39fuo4.mediapackage.us-east-1.amazonaws.com/in/v1/88dpie/channel

    • ue739wuty

    • due484u

    Your channel may be in a different region from the example.

  4. Follow steps 1 to 3 again to create the second channel and its endpoint.

  5. Make a note of the input URL, name, and password. For example:

    • https://mgu654.mediapackage.us-east-1.amazonaws.com/in/v1/xmm9s/channel

    • 883hdux

    • 634hjik

  6. Do not close this web browser yet.

Step 3: Create an Input

You must create an input; this input describes how the source video asset will be provided to AWS Elemental MediaLive. In this tutorial, you will create an RTP input.

You must also create an input security group for the input. This input security group applies the rule "only this specific IP address (an IP address that you own) can push to this input on AWS Elemental MediaLive". Without the protection of this rule, any third party could push content to an AWS Elemental MediaLive input if they knew the IP address and port of the input.

  1. Using your IAM credentials, sign in to the AWS Elemental MediaLive console at https://console.aws.amazon.com/medialive?region="region".

  2. In the navigation pane, choose Inputs.

  3. On the Inputs page, choose Create input.

  4. In the Input details section, for Input name, type "My RTP push".

  5. For Input type, choose RTP.

  6. In Input security group, choose Create new.

  7. In New security group, type or paste the IP address that you noted in step 1. Enter the address as a CIDR. For example, 192.0.2.0/32.

  8. Choose Create input security group.

  9. Choose Create to create the input.

    AWS Elemental MediaLive adds the input to the list of inputs and automatically creates two destinations (one primary and one redundant). These destinations include the port 5000. For example, rtp://198.51.100.0:5000 and rtp://198.51.100.44:5000. These are the two locations where the upstream system must push the source.

  10. Make a note of these two addresses: you will need them in step 8.

Step 4: Attach the Input

Now you start creating a channel. The first step in creating a channel is to identify the input . The channel contains the details that instruct AWS Elemental MediaLive how to transcode (decode and encode) and package that input into specific outputs.

  1. On the console, choose Channels in the navigation pane.

  2. In the content pane, choose Create channel.

  3. In the Channel and input details pane, in General info, in Channel Name, type "Test channel".

  4. In Role ARN, type the ARN of the role you created when you set up permissions for your AWS account. For example,

    arn:aws:iam::736754895224:role/AllowMediaLiveAccessRole.

  5. Select Remember ARN.

  6. In the Attach input section, in Input, choose "My RTP push" (the input you created). More fields appear.

  7. In Audio selectors, choose Add audio selectors.

  8. In Audio selector name, type "My audio source".

    There is no need to complete any other fields on this panel. Specifically:

    • There is no need to create a video selector: when the channel starts, AWS Elemental MediaLive will automatically select the video (or the first video) in the input.

    • In the audio selector, there is no need to specify the PID or language: when the channel starts, AWS Elemental MediaLive will automatically select the first audio, which is acceptable for this tutorial.

    • There is no need to create a captions selector. Typically you will include captions in the channel configuration, but in this tutorial we are omitting them.

Step 5: Create an HLS Output Group

  1. In the navigation bar, move down to Output groups and choose Add.

  2. Choose HLS and choose Confirm.

  3. In Name, type "MyHLS".

  4. In CDN settings, choose Hls webdav. This is the connection that AWS Elemental MediaPackage (the downstream system for the channel output) uses.

    Leave the defaults for all the other CDN fields.

  5. In HLS group destination A, in URL, type or paste the first input URL that AWS Elemental MediaPackage created for you in step 2. For example, https://39fuo4.mediapackage.us-east-1.amazonaws.com/in/v1/88dpie/channel.

  6. In Credentials, in Username, type or paste the username that corresponds to this URL. For example, ue739wuty.

  7. In Password, choose Create new parameter.

  8. In Name, type "DestinationA_MyHLS".

  9. In Password, type or paste the password that corresponds to the URL. For example, due484u.

  10. Click Create new parameter.

    You have created a parameter that holds the password. The parameter is stored in the Amazon EC2 Systems Manager Parameter Store. For more information, see Access to Amazon EC2 Systems Manager Parameter Store.

  11. In HLS group destination B, in URL, type or paste the second input URL that AWS Elemental MediaPackage created for you in step 2. For example, https://mgu654.mediapackage.us-east-1.amazonaws.com/in/v1/xmm9s/channel.

  12. In Credentials, in Username, type or paste the username that corresponds to this URL. For example, 883hdux.

  13. In Password, choose Create new parameter.

  14. In Name, type "DestinationB_MyHLS".

  15. In Password, type or paste the password that corresponds to the URL. For example, 634hjik.

  16. Click Create new parameter.

    You have created a parameter that holds this second password. This parameter is also stored in the Amazon EC2 Systems Manager Parameter Store.

  17. Leave the default values in all other fields on this pane.

Step 6: Set up the Output and Encodes

  1. In the navigation pane, choose Output 1. This output was automatically added when you created the output group. In addition, the output was automatically set up with one video and one audio, as shown in Stream settings.

  2. In Stream settings choose Video.

  3. In Video description name, change the default name to "H264 video".

    Leave the remaining fields with the default values. Specifically, leave Width and Height empty in order to use the same width as the input.

  4. In Stream settings choose Audio.

  5. In Audio description name, change the default name to "AAC audio".

  6. In Audio selector name, type the audio selector you created in step 4, that is "My audio source"

    Leave the remaining fields with the default values. Specifically, leave Codec settings as AAC.

Step 7: Save

  1. At the bottom of the navigation pane, choose Create channel.

    The channel section reappears and shows the newly created channel, named "MyHLS". The State changes to Creating, then Ready.

  2. Stay on this pane for now.

Step 8: Start the Upstream System and the Channel

  1. In your upstream system, start streaming the video sources that you set up in step 1. Set them up to push to the two destinations you noted in step 3. For example, rtp://198.51.100.0:5000 and rtp://198.51.100.44:5000.

  2. On the channels list, select the channel.

  3. Choose Start. The channel State changes to Starting, then to Running.

  4. Switch to the web browser tab or window where the AWS Elemental MediaPackage is displayed.

  5. Choose the channel link (not the radio button). On the details page, under Endpoints, choose Play. A preview window appears. Start the video. The output from AWS Elemental MediaLive starts playing.

Step 9: Clean up

To avoid extraneous charges, delete this input and channel when you have finished working with it.

  1. On the Channels page, select the channel.

  2. If needed, choose Stop.

  3. Choose Delete.