• 沒有找到結果。

Provide playback URLs

在文檔中 AWS Elemental MediaPackage (頁 42-127)

• (Optional) step 6: Monitor AWS Elemental MediaPackage activity (p. 39)

• Step 7: Clean up (p. 39)

Prerequisites

Before you can use AWS Elemental MediaPackage VOD capability, you must meet the following conditions:

• You have an AWS account and the appropriate permissions to access, view, and edit MediaPackage components. Make sure that your system administrator has completed the steps in Setting up (p. 16), and then return to this tutorial.

• You have file-based source content in one or more Amazon S3 buckets.

Step 1: Access AWS Elemental MediaPackage

For supported VOD inputs and codecs, see VOD supported codecs and input types (p. 6).

Step 1: Access AWS Elemental MediaPackage

Using your IAM credentials, sign in to the AWS Elemental MediaPackage console:

https://<region>.console.aws.amazon.com/mediapackage/home

Step 2: Create a packaging group

A packaging group holds one or more packaging configurations. The packaging configurations enable you to define what kind of VOD outputs you want. To apply these output definitions, associate a packaging group to multiple assets.

Example

You have 15 pieces of source content. You want to serve them all as DASH, HLS, and encrypted HLS outputs. To do this, you define one packaging group with DASH, HLS, and encrypted HLS packaging configurations. You then associate that group to the asset resources that represent these pieces of content. You don't have to create new configurations for each asset.

AWS Elemental MediaPackage does not require that you supply any customer data. There are no fields in packaging groups where there is an expectation that you will provide customer data.

To create a packaging group

1. On the AWS Elemental MediaPackage Packaging groups page, choose Create.

2. For ID, enter a name that describes the group, such as gamehighlights . The ID is the primary identifier for the group, and must be unique for your account in this AWS Region. Supported characters are letters, numbers, underscore (_), and dash (-). You can't use spaces in the ID.

3. Choose Create.

Step 3: Create a packaging configuration

A packaging configuration specifies how the output manifest is configured, such as stream selection limitations and ordering.

AWS Elemental MediaPackage does not require that you supply any customer data. There are no fields in packaging configurations where there is an expectation that you will provide customer data.

To create a packaging configuration

1. On the Packaging groups page, choose the group that you just created.

2. On the details page for the packaging group, choose either Add or remove configuration or Add configuration if there are no existing packaging configurations.

3. On the Add packaging configurations page, choose Add, and then choose New configuration.

4. For ID, enter a name that describes the configuration, such as hls_highlights. The ID is the primary identifier for the configuration, and must be unique for your account in this AWS Region.

Supported characters are letters, numbers, underscore (_), and dash (-). You can't use spaces in the ID.

5. Keep the defaults for the remaining fields, and then choose Save.

Step 4: Create an asset

Step 4: Create an asset

An asset resource is how MediaPackage ingests, packages, and serves VOD content. The asset is associated with one or more packaging configurations. Downstream devices send playback requests to specific packaging configurations on the asset.

AWS Elemental MediaPackage does not require that you supply any customer data. There are no fields in assets where there is an expectation that you will provide customer data.

To create an asset

1. From your Amazon S3 buckets, determine what file you're using as source content. Make note of the following:

• The name of the Amazon S3 bucket where the file is stored

• The full path for the file, such as S3://bucket/path/source-file-name

• The IAM role that allows AWS Elemental MediaPackage to read from Amazon S3

2. On the AWS Elemental MediaPackage console, go to the Assets page, and then choose Ingest asset.

3. For S3 bucket name, select the bucket where your source content is stored.

4. For IAM role, choose Use existing role and select the IAM role that allows AWS Elemental MediaPackage to read from Amazon S3.

5. For Filename, enter the full path to either the .smil manifest (MP4) or the .m3u8 parent playlist (HLS) within your Amazon S3 bucket, including the name of the source content. You don't need to enter the bucket name because you chose it in S3 bucket name field. For example, if your content is called lion_movie.m3u8 and is in a subdirectory called thursday_night in a bucket called movies, you would enter the following in the Filename field:

thursday_night/lion_movie.m3u8

For more information about using .smil manifests with MediaPackage, see Requirements for .smil manifests (p. 7).

6. For Packaging group, select the group that you created in Step 2: Create a packaging group (p. 37).

7. Choose Ingest assets.

Step 5: Provide playback URLs

After creating the asset resource, AWS Elemental MediaPackage prepares to serve the packaged manifests to viewers. This happens in the background and might take some time depending on the size and complexity of the source content, but is usually less than a few minutes. The URLs of the manifests are available immediately on the asset's details page, but content is not yet available for playback.

After the processing for each manifest is complete, MediaPackage sends an Amazon CloudWatch event to your account.

On the asset, MediaPackage provides a URL for each packaging configuration. This URL is how downstream devices (CDN or playback device) request VOD content from MediaPackage.

To get playback URLs

1. On the MediaPackage console, go to the Assets page and choose the ID of the asset that you created in Step 4: Create an asset (p. 38).

2. On the asset's detail page, get the URL for each packaging configuration.

(Optional) step 6: Monitor AWS Elemental MediaPackage activity

3. Provide the URLs to the person in charge of the downstream device (CDN or player). In the downstream device, this person must enter the request destination as the URL from the corresponding packaging configuration.

Each URL is stable. It never changes during the lifetime of the combination of this asset and packaging configuration. Provide the URL to the person in charge of the downstream device (CDN or player). In the downstream device, this person must use the asset's URL as the request destination.

(Optional) step 6: Monitor AWS Elemental MediaPackage activity

Use Amazon CloudWatch to track AWS Elemental MediaPackage activity, such as the counts of bytes that MediaPackage has received and sent, response times, and request counts. Metrics are grouped first by the service namespace, and then by the various dimension combinations within each namespace.

To view metrics using the CloudWatch console

1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

2. In the navigation pane, choose Metrics.

3. Under All metrics, choose the AWS/MediaPackage namespace.

4. Select the metric dimension to view the metrics (for example, choose channel to view metrics per channel).

For a list of AWS Elemental MediaPackage metrics, see AWS Elemental MediaPackage VOD content metrics (p. 149).

Step 7: Clean up

To avoid incurring extra charges, delete your VOD resources. If you want to make a specific output unavailable, delete the packaging configuration from the packaging group. If you want to make an asset no longer available for playback from any outputs, delete the asset.

To delete an asset

1. On the AWS Elemental MediaPackage console, go to the Assets page, and then choose the ID of the asset.

2. On the asset's details page, choose Delete.

3. In the confirmation dialog box, choose Delete.

To delete a packaging configuration

1. On the AWS Elemental MediaPackage console, go to the Packaging groups page.

2. Choose the ID of the group that has the configuration that you want to delete.

3. On the packaging group's details page, in the Packaging configurations section, locate the configuration and choose its ID.

4. On the packaging configuration's details page, choose Delete.

5. In the confirmation dialog box, choose Delete.

Working with channels

Delivering live content from AWS Elemental MediaPackage

AWS Elemental MediaPackage uses the following resources for live content:

• Channels are the entry point for your live streams from upstream encoders.

For supported live inputs and codecs, see Live supported codecs and input types (p. 3).

• Endpoints tell AWS Elemental MediaPackage how to package outbound content. Endpoints are associated with channels and hold encryption, stream, and packaging settings.

The following sections describe how to use these resources to manage live content in AWS Elemental MediaPackage.

Topics

• Working with channels in AWS Elemental MediaPackage (p. 40)

• Working with endpoints in AWS Elemental MediaPackage (p. 44)

Working with channels in AWS Elemental MediaPackage

A channel holds all the information that AWS Elemental MediaPackage requires to receive a live content stream from a source such as AWS Elemental MediaLive or another encoder. The channel receives content, and after packaging it, outputs it through an endpoint to downstream devices (such as video players or CDNs) that request the content.

After you create a channel, AWS Elemental MediaPackage provides a pair of input URLs that are fixed for the lifetime of the channel, regardless of any failures or upgrades that might happen over time. The output of the upstream encoder points to the URLs for stream delivery to MediaPackage.

For supported live inputs and codecs, see Live supported codecs and input types (p. 3).

Topics

• Creating a channel (p. 40)

• Viewing channel details (p. 41)

• Editing a channel (p. 42)

• Rotating credentials on an input URL (p. 42)

• Deleting a channel (p. 43)

• Adding an endpoint to a channel (p. 43)

Creating a channel

Create a channel to start receiving content streams. Later, you add an endpoint to the channel. This endpoint is the access point for content playback requests.

Viewing channel details

You can use the AWS Elemental MediaPackage console, the AWS CLI, or the MediaPackage API to create a channel. For information about creating a channel through the AWS CLI or MediaPackage API, see the AWS Elemental MediaPackage API Reference.

When you're creating a channel, do not put sensitive identifying information like customer account numbers into free-form fields such as the Name field. This includes when you work with AWS Elemental MediaPackage using the console, REST API, AWS CLI, or AWS SDKs. Any data that you enter into

MediaPackage might get picked up for inclusion in diagnostic logs or Amazon CloudWatch Events.

To create a channel (console)

1. Open the MediaPackage console at https://console.aws.amazon.com/mediapackage/.

2. On the Channels page, choose Create channel.

3. For ID, type a name that describes the channel. The ID is the primary identifier for the channel, and must be unique for your account in the region.

4. (Optional) For Description, type any descriptive text that helps you to identify the channel.

5. For Input type, choose Apple HLS.

6. Choose Create channel.

AWS Elemental MediaPackage displays the new channel's details page.

The channel is active and can start receiving content as soon as it's created. AWS Elemental MediaPackage scales resources up and down to allow the right amount of capacity for your traffic.

If you're using input redundancy and one of the inputs stops sending content, then MediaPackage automatically switches to the other input for the source content. For more information about how input redundancy works, see Live input redundancy AWS Elemental MediaPackage processing flow (p. 10).

When you're creating a channel, you will receive an error if you exceed the quotas on the account.

An error similar to Too many requests, please try again. Resource limit exceeded means that either you have exceeded the API request quotas, or you have already reached the maximum number of channels allowed on your account. If this is your first channel, or if you think you received this error wrongfully, use the Service Quotas console to request quota increases. For more information about quotas in AWS Elemental MediaPackage, see Quotas in AWS Elemental MediaPackage (p. 175).

Viewing channel details

View all channels that are configured in AWS Elemental MediaPackage, or view the details of a specific channel, including the endpoints that are associated with it.

You can use the AWS Elemental MediaPackage console, the AWS CLI, or the MediaPackage API to view channel details. For information about viewing details about a channel through the AWS CLI or MediaPackage API, see the AWS Elemental MediaPackage API Reference.

To view channels (console)

1. Open the MediaPackage console at https://console.aws.amazon.com/mediapackage/.

2. If the Channels page doesn't appear, on the AWS Elemental MediaPackage home page, choose Skip and go to console.

All existing channels are displayed on the console.

3. (Optional) To adjust your viewing preferences (such as page size and properties that are displayed), choose Preferences.

4. To view more information about a specific channel, choose the name of the channel that you want to view.

Editing a channel

AWS Elemental MediaPackage displays important information such as the values for Input URL and the WebDAV Username and Password for each input URL. Provide this information for the upstream encoder stream destination settings. If you're using input redundancy, provide the information for both input URLs. If you're sending only one stream to the channel, you can provide the information for either input URL. For information about how input redundancy works, see Live input redundancy AWS Elemental MediaPackage processing flow (p. 10).

NoteAll channels have two input URLs. For channels that existed before input redundancy, AWS Elemental MediaPackage created two new input URLs. You can use either the old or new URLs for inputs to the channel.

If you created an Amazon CloudFront distribution from the AWS Elemental MediaPackage console, you will also see the high-level distribution information (such as status and ID) from the channel.

When you add an endpoint in MediaPackage, an origin is also added to the distribution, and you will see the CloudFront CDN URL from the channel's details page as well.

Editing a channel

Edit a channel's description for easier identification later.

You can edit the description on a channel or enable Amazon CloudFront distribution creation from the AWS Elemental MediaPackage console. For information about creating a distribution from AWS Elemental MediaPackage, see Creating a Distribution from AWS Elemental MediaPackage (p. 172).

Note

To make changes to an existing distribution (even if it was created from AWS Elemental MediaPackage), go to the Amazon CloudFront console.

You can use the AWS Elemental MediaPackage console, the AWS CLI, or the MediaPackage API to edit a channel. For information about editing a channel through the AWS CLI or MediaPackage API, see the AWS Elemental MediaPackage API Reference.

When you're editing a channel, do not put sensitive identifying information like customer account numbers into free-form fields such as the Name field. This includes when you work with AWS Elemental MediaPackage using the console, REST API, AWS CLI, or AWS SDKs. Any data that you enter into

MediaPackage might get picked up for inclusion in diagnostic logs or Amazon CloudWatch Events.

To edit a channel (console)

1. Open the MediaPackage console at https://console.aws.amazon.com/mediapackage/.

2. If the Channels page doesn't appear, on the AWS Elemental MediaPackage home page, choose Skip and go to console.

3. On the Channels page, choose the name of the channel that you want to edit.

4. On the channel's details page, choose Edit channel.

5. Make the changes that you want.

6. Choose Save changes.

Rotating credentials on an input URL

Rotate credentials on an input URL to generate a new WebDAV user name and password.

You can use the AWS Elemental MediaPackage console or the MediaPackage API to rotate credentials.

For information about rotating credentials through the MediaPackage API, see the AWS Elemental MediaPackage API Reference.

Deleting a channel

To rotate credentials (console)

1. Open the MediaPackage console at https://console.aws.amazon.com/mediapackage/.

2. If the Channels page doesn't appear, on the AWS Elemental MediaPackage home page, choose Skip and go to console.

3. On the Channels page, choose the name of the channel that holds the input URL that you're rotating the credentials for.

4. On the channel's details page, choose the input URL that you're rotating credentials for, and then choose Rotate credentials.

5. To confirm that you want to generate a new user name and password, choose Rotate.

AWS Elemental MediaPackage displays the new credentials.

Deleting a channel

Delete a channel to stop AWS Elemental MediaPackage from receiving further content. You must delete the channel's endpoints (as described in Deleting an endpoint (p. 64)) before you can delete the

channel.

You can use the AWS Elemental MediaPackage console, the AWS CLI, or the MediaPackage API to delete a channel. For information about deleting a channel through the AWS CLI or MediaPackage API, see the AWS Elemental MediaPackage API Reference.

To delete a channel (console)

1. Open the MediaPackage console at https://console.aws.amazon.com/mediapackage/.

2. If the Channels page doesn't appear, on the AWS Elemental MediaPackage home page, choose Skip and go to console.

3. On the Channels page, choose the channel using one the following methods:

• Choose the channel name

• Select the check box next to the channel name 4. Choose Delete selected or Delete channel.

If there is an Amazon CloudFront distribution associated with the channel, select the CloudFront link in the confirmation dialog box to go to the CloudFront console to delete the distribution. AWS Elemental MediaPackage will not delete the distribution when the channel is deleted. For help deleting in CloudFront, see Deleting a distribution in the Amazon CloudFront Developer Guide.

5. In the confirmation dialog box in AWS Elemental MediaPackage, choose Delete to proceed with the channel deletion.

Adding an endpoint to a channel

Add an endpoint to a channel to allow downstream video players and content distribution networks (CDNs) to start requesting content playback.

You can use the AWS Elemental MediaPackage console, the AWS CLI, or the MediaPackage API to add an endpoint to a channel. For information about adding through the AWS CLI or MediaPackage API, see the AWS Elemental MediaPackage API Reference.

For instructions on adding endpoints to a channel from the AWS Elemental MediaPackage console, see the section called “Working with endpoints” (p. 44).

Working with endpoints

Working with endpoints in AWS Elemental MediaPackage

An endpoint defines a single delivery point of a channel. The endpoint holds all the information that is needed for AWS Elemental MediaPackage to integrate with a player or content distribution network (CDN) such as Amazon CloudFront. Configure the endpoint to output content in one of the available stream formats:

• Apple HLS – packages content to Apple HTTP Live Streaming (HLS)

• Microsoft Smooth – packages content for Microsoft Smooth Streaming players

• CMAF – packages content to devices that support Apple HLS fragmented MP4 (fMP4)

• DASH-ISO – packages content for the DASH-ISO ABR streaming protocol

Additionally, the endpoint holds information about digital rights management (DRM) and encryption integration, stream bitrate presentation order, and more.

Topics

• Creating an endpoint (p. 44)

• Viewing all endpoints associated with a channel (p. 63)

• Viewing a single endpoint (p. 63)

• Editing an endpoint (p. 63)

• Deleting an endpoint (p. 64)

• Previewing an endpoint (p. 64)

Creating an endpoint

Create an endpoint on a channel to define how AWS Elemental MediaPackage prepares content for delivery. Content can't be served from a channel until it has an endpoint. If you're using input redundancy, each endpoint receives content from one input URL at a time. If MediaPackage performs a failover on the inputs for one input URL, the endpoints automatically start receiving content from the other input URL. For more information about input redundancy and failover, see Live input redundancy AWS Elemental MediaPackage processing flow (p. 10).

Create an endpoint on a channel to define how AWS Elemental MediaPackage prepares content for delivery. Content can't be served from a channel until it has an endpoint. If you're using input redundancy, each endpoint receives content from one input URL at a time. If MediaPackage performs a failover on the inputs for one input URL, the endpoints automatically start receiving content from the other input URL. For more information about input redundancy and failover, see Live input redundancy AWS Elemental MediaPackage processing flow (p. 10).

在文檔中 AWS Elemental MediaPackage (頁 42-127)

相關文件