• 沒有找到結果。

Clean up

在文檔中 AWS Elemental MediaLive (頁 75-84)

Prerequisites

Before you can use MediaLive, you need an AWS account and the appropriate permissions to access, create, and view MediaLive components. Complete the steps in Setting up: IAM permissions (p. 14), and then return to this tutorial. You can't use MediaLive, even as an administrator with full access, until you perform those steps.

Step 1: Set up the upstream system

The upstream system is the system that streams the video to MediaLive. The upstream system can be anything from an on-premises appliance that is serving as a "contribution encoder" to an application running on a smart phone. You must perform some setup of your upstream system before you start working with MediaLive.

For the purposes of this tutorial, the upstream system must be capable of sending a video stream via RTP push.

In a "push" delivery, the upstream system is pushing the stream from two IP addresses on the upstream system (for example, from 203.0.113.111 and from 203.0.113.112). The upstream system will push to two IP addresses on MediaLive (for example, rtp://198.51.100.10:5000 and rtp://192.0.2.131:5000). In the following steps, you will set up MediaLive so that the two from IP addresses are white listed. Furthermore, MediaLive will generate the two to IP addresses. You will set up the upstream system to push to those addresses.

To set up the upstream system

1. Set up your upstream system to perform an RTP push from two different IP addresses. You must push from two addresses because MediaLive always expects redundant inputs.

2. Make a note of the IP addresses. For example, 203.0.113.111 and from 203.0.113.112. You will need these addresses when you set up the input security group in a later step.

Step 2: Set up the downstream system

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

Step 3: Create an input

You must set up a channel in AWS Elemental MediaPackage, and you must set it up now because you need the two input URLs that AWS Elemental MediaPackage generates. You enter these input URLs into MediaLive.

To set up the downstream system

1. Sign in to the AWS Management Console and open the MediaPackage console at https://

console.aws.amazon.com/mediapackage/.

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 data that AWS Elemental MediaPackage has generated: two input URLs and their associated names and passwords. For example, the data for one input URL might be:

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

• ue739wuty

• due484u

Your channel might be in a different Region from the example.

4. Keep the web browser open; don't close it yet.

Step 3: Create an input

You must create an input. the input defines how the upstream system provides the source video stream to MediaLive. in this tutorial, you 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 MediaLive." without the protection of this rule, any third party could push content to an MediaLive input if they know the IP address and port of the input.

To create an input and input security group

1. Sign in to the AWS Management Console and open the MediaLive console at https://

console.aws.amazon.com/medialive/.

2. In the navigation pane, choose Inputs.

3. On the Inputs page, choose Create input.

4. In the Input details section, for Input name, enter my rtp push.

5. For Input type, choose rtp.

6. in the Input security group section, choose Create.

7. In the text box, enter the IP address that you noted in the section called “Step 1: Set up the upstream system” (p. 64) of this tutorial. Enter the address as a CIDR block. for example, 203.0.113.111/32 and 203.0.113.112/32.

8. Choose Create input security group.

9. Choose Create to create the input.

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.10:5000 and rtp://192.0.2.131:5000. these are the two locations where the upstream system must push the source.

10. make a note of these two addresses because you will need them in the section called “Step 10: Start the upstream system and the channel” (p. 68).

Step 4: Set up key information

Step 4: Set up key information

The first step to creating a channel from scratch is to choose the IAM role that MediaLive will use to access the channel when the channel is running (started) and specify key characteristics of the input.

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

The first step to creating a channel from scratch is to choose the IAM role that MediaLive will use to access the channel when the channel is running (started) and specify key characteristics of the input.

To specify key information for the channel

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

2. In the Channels section, choose Create channel.

3. In the Channel and input details pane, in General info, for Channel name, enter Test channel.

4. For IAM role, choose Create role from template and choose Create IAM role. The Use existing role list now shows the role MediaLiveAccessRole.

5. Choose Remember role.

Step 5: Attach the input

Now you are ready to identify the input that the channel will ingest.

To attach the input to the channel

1. On the Create channel page, in the navigation pane, for Input attachments, choose Add.

2. In Attach input , for Input, My RTP push (the input that you created.)

The Attachment name field is automatically populated with the name of the input itself. You can leave this name as is.

3. Choose Confirm. The Input attachment section closes, and the General input settings section appears.

Step 6: Set up input video, audio, captions

You can create "selectors" to identify the specific video, audio, and captions that you want to extract from the input.

In this tutorial, you don't create a video selector. Instead, when the channel starts, MediaLive will automatically select the video (or the first video) in the input. You also don't create a captions selector Typically, you include captions in the channel configuration, but in this tutorial we omit them.

You do create an audio selector.

To identify the content to extract

1. On the Create channel page, in the Input settings pane, for Audio selectors, choose Add audio selectors.

2. For Audio selector name, enter My audio source.

Ignore the Selector settings field. You don't need to specify the PID or language. When the channel starts, MediaLive will automatically select the first audio, which is acceptable for this tutorial.

3. For all other fields in this pane, keep the default values.

Step 7: Create an HLS output group

Step 7: Create an HLS output group

Once you have set up the input, you continue with the channel creation by creating an output group. In this tutorial, you set up an HLS output group.

To create an output group

1. On the Create channel page, in the Output groups section, choose Add.

2. In the Add output group section, choose HLS, and then choose Confirm.

3. In the HLS group destination A section, for URL, enter the first input URL that AWS Elemental MediaPackage created for you in the section called “Step 2: Set up the downstream system” (p. 64). For example, https://39fuo4.mediapackage.us-east-1.amazonaws.com/in/v1/88dpie/channel.

4. For Credentials:

• For Username, enter the user name that corresponds to this URL. For example, ue739wuty.

• For Password, choose Create parameter. For Name, enter DestinationA-MyHLS. For Password, enter the password that corresponds to the URL. For example, due484u.

5. Choose Create parameter.

You have created a parameter called DestinationA-MyHLS that holds the password due484u. The parameter is stored in the AWS Systems Manager Parameter Store. For more information, see the section called “About the feature for creating password parameters” (p. 38).

6. For HLS group destination B, for URL, enter the second input URL that AWS Elemental MediaPackage created for you in the section called “Step 2: Set up the downstream system” (p. 64). For example, https://mgu654.mediapackage.us-east-1.amazonaws.com/in/v1/xmm9s/channel.

7. For Credentials:

• For Username, enter the user name that corresponds to this URL. For example, 883hdux.

• For Password, choose Create parameter. For Name, enter DestinationB-MyHLS. For Password, enter the password that corresponds to the URL. For example, 634hjik.

8. Choose Create parameter.

You have created a parameter called DestinationB-MyHLS that holds the password 634hjik. The parameter is stored in the AWS Systems Manager Parameter Store.

9. In the HLS settings section, for Name, enter MyHLS.

10. For 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 settings fields.

11. For all other fields in this pane, keep the default values.

Step 8: Set up the output and encodes

Now that you have defined one output group in the channel, you can set up an output ins that output group, and specify how you want to encode the video output and the audio output.

To set up the output

1. In the Output groups section, choose Output 1. MediaLive automatically added this output when you created the output group. In addition, MediaLive automatically set up the output with one video and one audio, as shown in the Stream settings section.

Step 9: Create your channel

2. In Stream settings, choose Video.

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

4. For Codec settings, choose H264.

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

5. In Stream settings, choose Audio 1.

6. For Audio description name, change the default name to AAC audio.

7. For Audio selector name, enter My audio source, which is the audio selector that you created inthe section called “Step 6: Set up input video, audio, captions” (p. 66).

8. For Codec settings, choose AAC.

9. Leave the remaining fields with the default values.

Step 9: Create your channel

You have entered the minimum required information, so you are ready to create the channel.

To create the channel

• On the Create channel page, under the Channel section, choose Create channel.

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

Step 10: Start the upstream system and the channel

You can now start the upstream system in order to push the streaming content to MediaLive, encode the content, and send it to AWS Elemental MediaPackage. You can preview the output on MediaPackage.

To start the upstream system

1. In your upstream system, start streaming the video sources that you set up in the section called

“Step 1: Set up the upstream system” (p. 64). Set them up to push to the two destinations that you noted in the section called “Step 3: Create an input” (p. 65). These are two addresses in the input in MediaLive. For example, rtp://198.51.100.10:5000 and rtp://192.0.2.131:5000.

2. On the Channels list, choose 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.

6. Start the video. The output from AWS Elemental MediaLive starts playing.

Step 11: Clean up

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

To delete the channel

1. On the Channels page, choose the channel.

2. If needed, choose Stop.

Step 11: Clean up

3. Choose Delete.

4. On the Inputs page, choose the input.

5. Choose Delete.

Inputs

Components of AWS Elemental MediaLive

The key building blocks of AWS Elemental MediaLive are inputs, channels, and input security groups.

A channel in turn consists of output groups, which contain outputs, which contain video, audio, and captions "encodes."

When a channel is started (run), AWS Elemental MediaLive ingests the input. It then transcodes that video (and the related audio, captions, and metadata) and creates output assets. The information about how to transcode a given input is contained in a channel.

An input security group (p. 246) is a mechanism to prevent unauthorized third parties from pushing content into a channel that is associated with a "push" input.

Inputs

An input is a video asset that is to be transcoded and packaged. It may be associated with an input security group, which provides protection to the input, and with a channel, which provides details about the transcoding and packaging to perform.

AWS Elemental MediaLive supports different types of stream and file inputs (for example, RTP and HLS).

The service also provides two ways to ingest the inputs, either through a push model or a pull model. For more information, see the section called “Supported input formats and protocols” (p. 541).

Channels

In MediaLive, a channel is attached to one or more inputs (video sources). If the channel is attached to more than one input, the inputs are processed one after the other. A channel contains the details that instruct MediaLive how to transcode (decode and encode) and package the inputs into specific outputs.

The key components of a channel are an encode, an output, and an output group.

Encodes

An encode is the smallest component on the output side of a channel. Each encode contains the instructions for one video asset, one audio asset, or one captions asset that will be created by the transcoding process. Different encodes have different characteristics. For example, one video encode produced from the input might be high resolution while another is low resolution. Or one audio encode might use the AAC audio codec while another uses the Dolby Digital audio codec.

A channel can contain multiple video, audio, and captions encodes.

In the following illustration, the red circle represents a video output, the blue circle represents an audio output, and the green circle represents a captions output.

Outputs

Outputs

An output contains the encodes that belong together. For example, one output will contain the combination of video, audio, and captions encodes that make sense for one purpose, while another output will contain a different combination.

The output holds packaging instructions that apply to all the encodes in that output. For example, the packaging instructions for a UDP output are different from those for an Archive output. The encodes inside the outputs might be the same or different. But the packaging instructions are different.

Output groups

An output group contains related outputs. An output group might contain only one output or it might contain several outputs. The output group holds details about the destination for all the outputs in that group.

Input security groups

An input security group is a group that you create and associate with specific input types, to prevent unauthorized third parties from pushing content into a channel. For more information, see Resources:

MediaLive input security groups (p. 246).

How components are associated

The association between inputs and a channel is defined in the channel. In other words, to associate a channel with one or more inputs, you set up the channel to point to those inputs.

After you create this association, you can do the following:

• View the channel details to identify the associated input.

• View the input details to identify the associated channel.

The association between an input and an input security group is defined in the input. In other words, to associate an input with an input security group (or with several groups), you set up the input to point to a specific input security group (or groups).

After you create this association, you can do the following:

• View the channel details to identify the associated input.

• View the input details to identify the associated channel.

Preparing the upstream and downstream systems in the MediaLive workflow

From the point of view of AWS Elemental MediaLive, a live streaming workflow that includes MediaLive involves three systems:

• An upstream system that provides the video content to MediaLive.

• MediaLive, which ingests the content and transcodes the content.

• A downstream system that is the destination for the output that MediaLive produces.

You should plan that workflow before you start to create the channel. As the first stage in that planning, you must set up the upstream and downstream systems. As the second stage, you must plan the channel itself—identify the content to extract from the source content, and plan the outputs to produce.

This chapter deals with preparing the upstream and downstream sections. Setup: Planning the channel (p. 121) deals with planning the channel.

Important

This procedure describes planning the workflow starting from the output and then working back to the input. This is the most effective way to plan a workflow.

To plan the MediaLive workflow

1. Identify the output groups that you need to produce, based on the systems that are downstream of MediaLive. See the section called “Step 1: Identify output group types” (p. 73).

2. Identify the requirements for the video and audio encodes that you will include in each output group. See the section called “Step 2: Identify encode requirements” (p. 75).

3. Decide on the channel class—decide if you want to create a standard channel that supports redundancy or a single-pipeline channel that doesn't support redundancy. See the section called

“Step 3: Identify resiliency requirements” (p. 76).

4. Assess the source content to make sure it's compatible with MediaLive and with the outputs that you need to create. For example, make sure that the source content has a video codec that MediaLive supports. See the section called “Step 4: Assess the upstream system” (p. 78).

After you have performed these four steps, you know whether MediaLive can handle your transcoding request.

5. Collect identifiers for the source content. For example, ask the operator at the upstream system for the identifiers for the different audio languages that you want to extract from the content. See the section called “Step 5: Collect information about the source content” (p. 83).

6. Arrange for setup with the upstream system so that it can connect to MediaLive. Also, create the MediaLive input so that MediaLive can connect to the upstream system. See the section called “Step 6: Coordinate with upstream system and create inputs” (p. 87).

7. Coordinate with the downstream system or systems to provide a destination for the output groups that MediaLive will produce. See the section called “Step 7: Coordinate with downstream systems” (p. 111).

Topics

在文檔中 AWS Elemental MediaLive (頁 75-84)

相關文件