

# What is AWS Elemental MediaPackage?


AWS Elemental MediaPackage (MediaPackage) is a just-in-time video packaging and origination service that runs in the AWS Cloud. With MediaPackage, you can deliver highly secure, scalable, and reliable video streams to a wide variety of playback devices and content delivery networks (CDNs). 

MediaPackage offers a broadcast-grade viewing experience for viewers, while allowing you the flexibility to control and protect your content. Additionally, the built-in resiliency and scalability of MediaPackage means that you have the right amount of resources at the right time, with no manual intervention required.

**Note**  
This user guide is intended for creating MediaPackage resources in MediaPackage Version 2 (v2) starting from May 2023. To get started with MediaPackage v2, create your MediaPackage resources. There isn't an automated process to migrate your resources from MediaPackage v1 to MediaPackage v2.   
The names of the entities that you use to access your MediaPackage resources, like URLs and ARNs, all include "mediapackagev2", to distinguish from the prior version. If you used MediaPackage prior to this release, you can't use the MediaPackage v2 AWS CLI or the MediaPackage v2 API to access any MediaPackage v1 resources.  
If you created resources in MediaPackage v1, use video on demand (VOD) workflows, and aren't looking to migrate to MediaPackage v2 yet, see the [AWS Elemental MediaPackage v1 User Guide](https://docs.aws.amazon.com/mediapackage/latest/ug/what-is.html).

**Topics**
+ [

# Are you a first-time user of MediaPackage?
](first-time-user.md)
+ [Concepts and terminology](what-is-terms.md)
+ [

# Supported inputs and outputs
](supported-inputs.md)
+ [

# How MediaPackage works
](what-is-flow.md)
+ [

# Supported features of AWS Elemental MediaPackage
](what-is-features.md)
+ [Related services](related-services.md)
+ [

# Accessing MediaPackage
](accessing-emp.md)
+ [

# Pricing for MediaPackage
](pricing-for-emp.md)
+ [

# Regions for MediaPackage
](regions-and-endpoints.md)

# Are you a first-time user of MediaPackage?


If you're a first-time user of MediaPackage, we recommend that you begin by reading the following sections:
+ [AWS Elemental MediaPackage concepts and terminology](what-is-terms.md)
+ [How MediaPackage works](what-is-flow.md)
+ [Supported features of AWS Elemental MediaPackage](what-is-features.md)
+ [Getting started with AWS Elemental MediaPackage](getting-started.md)

# AWS Elemental MediaPackage concepts and terminology
Concepts and terminology

The following are AWS Elemental MediaPackage concepts and terms to be familiar with.

**Channel group**  
A *channel group* is the top-level resource that consists of channels and origin endpoints that are associated with it and that provides predictable URLs for stream delivery. All channels and origin endpoints within the channel group are guaranteed to share the DNS.

**Channel**  
A *channel* represents the entry point for a content stream into MediaPackage. Upstream encoders such as AWS Elemental MediaLive send content to the channel. When MediaPackage receives a content stream, it packages the content and outputs the stream from an endpoint that you create on the channel. There's one channel for each incoming set of adaptive bitrate (ABR) streams.

**Endpoint**  
An *endpoint* is part of a channel and represents the packaging aspect of MediaPackage. When you create an endpoint on a channel, you indicate what streaming format, packaging parameters, and features the output stream will use. Downstream devices request content from the endpoint. A channel can have multiple endpoints.

**Just-in-time packaging**  
MediaPackage performs *just-in-time packaging* (JITP). When a playback device requests content, MediaPackage dynamically customizes the live video streams and creates a manifest in a format that's compatible with the requesting device.

**Origination service**  
MediaPackage is considered an *origination service* because it's the point of distribution for media content delivery.

**Packager**  
A *packager* prepares output streams for access by different types of players. The packager type specifies the streaming format that MediaPackage delivers from the endpoint (either Apple HLS, DASH-ISO, Microsoft Smooth Streaming, or Common Media Application Format [CMAF]). Additional packager settings include buffer and update durations and manifest tag handling instructions.   
A packager is a part of an origin endpoint. Each endpoint must have one, and only one, packager. To use different packager types for the same content, create multiple endpoints on the channel.

**Source Content**  
*Source contents* are live streams and video files that MediaPackage ingests.   
+ For live video, source content comes from an upstream encoder, such as AWS Elemental MediaLive. MediaPackage supports HLS source content.

**Stream**  
A *stream* refers to the content input and output of MediaPackage.   
For live workflows, an upstream encoder sends a live stream as an input to MediaPackage to the channel. When a downstream device requests playback of the content, MediaPackage dynamically packages the stream (including specifying the packager type, adding encryption, and configuring track outputs) and delivers it to the requesting device as an output of the endpoint. An endpoint can produce multiple streams.

**Track**  
*Tracks* make up the output content stream. MediaPackage includes selected video, audio, and subtitles or captions tracks in the output stream. The stream delivers the tracks to the player (either directly or through a CDN), and the player plays back the tracks based on player logic or network conditions (such as available bandwidth).

# Supported inputs and outputs
Added support for Dolby Vision 8.1

MediaPackage now supports the video codec Dolby Vision 8.1, which increases the range of colors that can be shown in a video.

This section describes the input types, input codecs, and output codecs that AWS Elemental MediaPackage supports for live content.

**Topics**
+ [

## Supported input types
](#supported-types-live)
+ [

## Supported input codecs
](#suported-inputs-codecs-live)
+ [

## Supported output codecs
](#suported-outputs-codecs-live)

The following sections describe supported input types and codecs for live streaming content.

## Supported input types


Use the following input types to push streams from an external source or encoder (such as AWS Elemental MediaLive) using the HTTPS protocol:
+ HLS
+ CMAF

  For information about CMAF ingest, see [CMAF ingest](cmaf-ingest.md).

The following are additional input requirements:
+ You must define a channel policy to enable content to flow into your channel from sources outside of your account.
+ Media segments must not be encrypted.
+ Streams can contain either muxed video and audio tracks, or unmuxed tracks. 
+ The input must contain at least one video track. MediaPackage doesn't support inputs that contain no video track.

## Supported input codecs


These are the video, audio, and subtitles codecs that MediaPackage supports for source content streams.


| Input type | Media container | Video codecs | Audio codecs | Subtitles/captions format | 
| --- | --- | --- | --- | --- | 
| HLS |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html) | 
| CMAF | CMAF |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  | 

## Supported output codecs


These are the video, audio, and subtitles codecs that MediaPackage supports when delivering live content.

**Note**  
The AV1 video codec is supported only with CMAF endpoint types. If you configure a TS endpoint on a channel with AV1 streams those streams won't show up on the endpoint. 


| Endpoint type | Manifest format | Media container | Video codecs | Audio codecs | Subtitles/captions format | 
| --- | --- | --- | --- | --- | --- | 
| TS | HLS |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  | 
| CMAF | HLS | CMAF |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  | 
| CMAF | DASH | CMAF |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/supported-inputs.html)  | 

# How MediaPackage works


AWS Elemental MediaPackage uses just-in-time format conversion to deliver over-the-top (OTT) video from a single source to a wide variety of playback devices or content delivery networks (CDNs).

In the processing flow for live content, encoders send live HLS streams to MediaPackage. MediaPackage then packages the content, formatting it in response to playback requests from downstream devices. 

The following sections describe the live processing flows.

**Topics**
+ [

# General AWS Elemental MediaPackage live processing flow
](what-is-flow-gen.md)
+ [

# Live input redundancy AWS Elemental MediaPackage processing flow
](what-is-flow-ir.md)

# General AWS Elemental MediaPackage live processing flow
General live processing flow

The following outlines the general flow of live content in MediaPackage:

1. An upstream encoder (such as AWS Elemental MediaLive) sends an HLS live stream using AWS Signature Version 4 to authorize request to your origin and your IAM channel policy. If you're using input redundancy, the encoder sends two identical HLS live streams to MediaPackage, one to each ingest domain on the channel. MediaPackage uses the stream from one ingest URL as the source content. If MediaPackage stops receiving content on the active ingest URL, it automatically switches to the other ingest URL for source content. Additionally, AWS scales resources up and down to handle the incoming traffic.

   For more information, see [Live input redundancy AWS Elemental MediaPackage processing flow](what-is-flow-ir.md).
**Note**  
To permit support for features like time-shifted viewing, MediaPackage stores all received content for a limited time. This stored content is only available for playback if it falls within the **startover window** that's defined on the endpoint. Stored content isn't available for playback if it's outside the startover window, or if you haven't defined a window on the endpoint. For more information, see [Time-shifted viewing with AWS Elemental MediaPackage](time-shifted.md).

1. A downstream device requests content from MediaPackage through the endpoint egress domain. A downstream device is either a video player or a CDN. The egress domain is associated with a channel group and an endpoint for a specific streaming format (either TS or CMAF).

1. When MediaPackage receives the playback request from the downstream device, it dynamically packages the stream according to the settings that you specified on the origin endpoint. Packaging can include adding encryption and configuring audio, video, and subtitles or captions track outputs.

   Be sure to order your inputs so that your preferred audio rendition is listed first in the audio section of the multivariant playlist. Do the same for the subtitles or captions. When packaging audio and subtitles or captions tracks, MediaPackage designates the first audio and captions or subtitles track as `DEFAULT=YES` and `AUTO-SELECT=YES`. This packaging overrides default and auto-select settings from the input.

1. MediaPackage delivers the output stream over HTTPS to the requesting device. As with input, AWS scales resources up and down to handle changes in traffic.

Throughout the content input and output processes, MediaPackage detects and mitigates potential infrastructure failures before they become a problem for viewers. 

The following illustration shows the overall process.

![\[MediaPackage workflow from encoder to MediaPackage packaging content to downstream device.\]](http://docs.aws.amazon.com/mediapackage/latest/userguide/images/bbl flow2-empv2.png)


# Live input redundancy AWS Elemental MediaPackage processing flow
Live input redundancy processing flow

Achieve input redundancy in AWS Elemental MediaPackage by sending two streams to separate ingest domains on a channel in MediaPackage. One of the streams becomes the primary, active source of content for the endpoints, while the other continues to passively receive content. If MediaPackage stops receiving content from the active stream, it switches over to the other ingest stream so that content playback isn't interrupted.

If you use MediaPackage with AWS Elemental MediaLive (for example), here's the flow of input redundancy:

1. You create a channel group in MediaPackage, as described in [Creating a channel group in AWS Elemental MediaPackage](channel-group-create.md). When MediaPackage provisions the channel group, it creates an egress domain for all channels and origin endpoints within the channel group.

1. You create a channel within the channel group as described in [Creating a channel in AWS Elemental MediaPackageCreating a channel](channels-create.md). When MediaPackage provisions the channel, it creates two ingest domains for the channel. If you're not using input redundancy, you can send a stream to either ingest domain. There's no requirement that you send content to both domains.

1. You create an origin endpoint within the channel as described in [Creating an origin endpoint in AWS Elemental MediaPackage](endpoints-create.md). 
**Important**  
If you use short output segments, depending on your playback device, you might see buffering when MediaPackage switches inputs. You can reduce buffering by using the time delay feature on the endpoint. Be aware that using a time delay introduces latency to end-to-end delivery of the content. For information about enabling time delay, see [Creating an origin endpoint in AWS Elemental MediaPackage](endpoints-create.md).

1. You create an input and channel in AWS Elemental MediaLive, and you add a MediaPackage output group to the channel in MediaLive. For more information, see [Creating a Channel from Scratch](https://docs.aws.amazon.com/medialive/latest/ug/creating-channel-scratch.html) in the *AWS Elemental MediaLive User Guide*. 

   If you use an HLS output group in AWS Elemental MediaLive, the input loss action on the HLS group's settings must be set to pause the output if the service doesn't receive input. If MediaLive sends a black frame or some other filler frame when it's missing input, then MediaPackage can't tell when segments are missing, and subsequently can't perform failover. For more information about setting the input loss action in MediaLive, see [Fields for the HLS Group](https://docs.aws.amazon.com/medialive/latest/ug/hls-group-fields.html) in the *AWS Elemental MediaLive User Guide*. 
**Important**  
If you use a different encoder (not AWS Elemental MediaLive) and you send two separate streams to the same channel in MediaPackage, the streams must have identical encoder settings and manifest names. Otherwise, input redundancy might not work correctly and playback could be interrupted if the inputs switch.

1. You start the channel in AWS Elemental MediaLive to send the streams to MediaPackage.

1. MediaPackage receives content on both of the ingest URLs, but only one of the streams is used for source content at a time. If the active stream is missing any segments, then MediaPackage automatically fails over to the other stream. MediaPackage continues to use this stream until failover is needed again.

   The formula that's used to determine if an input is missing segments is based on the segment lengths on the inputs and the endpoints. If an input is missing segments and quickly recovers, an endpoint with longer segment lengths won't switch inputs. This might result in different endpoints on the channel using different inputs (if one endpoint switches and the other doesn't). This is expected behavior and should not affect the content workflow.

# Supported features of AWS Elemental MediaPackage


MediaPackage supports the following features.

**Audio**  
MediaPackage supports multi-language audio inputs and the following audio codecs:  
+ AAC stereo
+ Dolby AC3 and E-AC3 (Dolby Digital and Dolby Digital\$1)
MediaPackage accepts these codecs from the input source and passes them through to the output stream.  
Be sure to order your inputs so that your preferred audio rendition is listed first in the audio section of the multivariant playlist. When packaging audio and subtitles or captions tracks, MediaPackage designates the first audio track as `DEFAULT=YES` and `AUTO-SELECT=YES`. This packaging overrides default and auto-select settings from the input.  
MediaPackage doesn't support audio-only inputs. The stream configuration from the encoder must include at least one video track.

**Captions**  
Your embedded source captions can be CEA-608 captions, CEA-708 captions, or both CEA-608 and CEA-708. MediaPackage will pass through these captions in the media segments on TS and CMAF origin endpoints, and generate the appropriate manifest signaling.  
Be sure to order your inputs so that your preferred captions rendition is listed first in the captions section of the multivariant playlist. When packaging captions tracks, MediaPackage designates the first captions track as `DEFAULT=YES` and `AUTO-SELECT=YES`. This packaging overrides default and auto-select settings from the input.  
Your input HLS playlist must include captions signaling tags. If not present, MediaPackage will not be able to generate the corresponding output manifest signaling.

**DRM**  
MediaPackage supports content protection through digital rights management (DRM), including advanced features like session key exclusion for HLS manifests to improve compatibility with legacy clients and provide granular access control. For information, see [Content encryption and DRM in AWS Elemental MediaPackage](using-encryption.md).

**HLS Rendition Groups**  
MediaPackage supports rendition groups for incoming and outgoing HLS content. For information about output rendition groups, see [AWS Elemental MediaPackage rendition groups reference](rendition-groups.md).

**Input Redundancy**  
Input redundancy is available with only live workflows in MediaPackage.  
MediaPackage creates two ingest URLs on every channel group so that you can create input redundancy by sending two identical streams to the same channel. For information about how input redundancy works, see [Live input redundancy AWS Elemental MediaPackage processing flow](what-is-flow-ir.md).

**Low-latency streaming**  
MediaPackage supports Apple low-latency HLS, which is a technology aimed at reducing the delay between the time content is captured and the time it is displayed on the viewer's screen. The goal is to achieve minimal end-to-end delay (or "glass-to-glass" delay) by using techniques such as parallel delivery and reduced buffering. This technology enables a more seamless and immersive real-time viewing experience for users, particularly in applications such as live video streaming, teleconferencing, and online gaming.

**Subtitles**  
MediaPackage supports input WebVTT text-based subtitles and passes through the subtitles.   
Be sure to order your inputs so that your preferred subtitles rendition is listed first in the subtitles section of the multivariant playlist. When packaging subtitles tracks, MediaPackage designates the first subtitles track as `DEFAULT=YES` and `AUTO-SELECT=YES`. This packaging overrides default and auto-select settings from the input.

**Time-shift Viewing**  
Time-shift viewing is available with only live workflows in MediaPackage.  
MediaPackage supports playback of a stream at a time earlier than the current time. Start-over, catch-up TV, and time delay are all supported. For more information about setting up time-shift capabilities, see [Time-shifted viewing with AWS Elemental MediaPackage](time-shifted.md).

**Video**  
MediaPackage supports the input H.264 video codec and passes it through to the output stream. CMAF endpoints in MediaPackage also support H.265/HEVC and HDR-10, following the Apple specification to applicable playback devices.  
MediaPackage requires at least one video track to be present in the stream configuration from the encoder. The service doesn't support audio-only ingest.

# Services related to AWS Elemental MediaPackage
Related services

You might use the following services when using MediaPackage.
+ **Amazon CloudWatch** is a monitoring service for AWS Cloud resources and the applications that you run on AWS. Use CloudWatch to track metrics such as content input and output request counts. For more information, see [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/).
+ **AWS Elemental MediaLive (MediaLive)** is a live video processing service that encodes high-quality live video streams for broadcast television and multi-screen devices. Use MediaLive to encode content streams and send them to MediaPackage for packaging. For more information about how encoders (such as MediaLive) work with MediaPackage, see [How MediaPackage works](what-is-flow.md).
+ **AWS Elemental MediaTailor (MediaTailor)** is a scalable ad insertion service that runs in the AWS Cloud. Use MediaTailor to serve targeted ads to viewers. For more information, see [AWS Elemental MediaTailor](https://aws.amazon.com/mediatailor/).
+ **AWS Identity and Access Management (IAM)** is a web service that helps you securely control access to AWS resources for your users. Use IAM to control who can use your AWS resources (authentication) and what resources users can use in which ways (authorization). For more information, see [Setting up MediaPackage](setting-up.md).

# Accessing MediaPackage


You can access MediaPackage using any of the following methods.
+ **AWS Management Console** - The procedures throughout this guide explain how to use the AWS Management Console to perform tasks for MediaPackage.

  ```
  https://console.aws.amazon.com/mediapackage/
  ```
+ **AWS Command Line Interface** - For more information, see the [AWS Command Line Interface User Guide](https://docs.aws.amazon.com/cli/latest/userguide/). 

  ```
  aws mediapackagev2
  ```
+ **MediaPackage API** - For information about API actions and about how to make API requests, see the [AWS Elemental MediaConnect API Reference](https://docs.aws.amazon.com/mediaconnect/latest/api/). 

  ```
  https://mediapackagev2.region.amazonaws.com 
  ```
+ **AWS SDKs** - If you're using a programming language that AWS provides an SDK for, you can use an SDK to access MediaPackage. SDKs simplify authentication, integrate easily with your development environment, and provide easy access to MediaPackage commands. For more information, see [Tools for Amazon Web Services](https://aws.amazon.com/tools).
+ **AWS Tools for Windows PowerShell** - For more information, see the [AWS Tools for PowerShell User Guide](https://docs.aws.amazon.com/powershell/latest/userguide/).

# Pricing for MediaPackage


As with other AWS products, there are no contracts or minimum commitments for using MediaPackage. You're charged only for AWS resources that your account uses. Pricing is pay-as-you-go and consists of the following:
+ A per GB charge for received content
+ A per GB charge for content that's streamed out of MediaPackage

  Content that's cached and served from a content delivery network (CDN) doesn't incur this per GB charge.

For detailed pricing information, see [MediaPackage Pricing](https://aws.amazon.com/mediapackage/pricing/).

# Regions for MediaPackage


To reduce latency in your applications, MediaPackage offers a regional endpoint for your requests. To view the list of AWS Regions where MediaPackage is available, see [MediaPackage Regions](https://docs.aws.amazon.com/general/latest/gr/mediapackage.html).

MediaPackage V2 control plane APIs support IPv6 in all supported regions. For more information, see [IPv6 support for AWS Elemental MediaPackage V2 control plane](mediapackagev2-ipv6-support.md).

## AWS opt-in Regions


Although most AWS Regions are active by default for your AWS account, certain Regions are activated only when you manually select them. This document refers to those Regions as *opt-in Regions*. In contrast, Regions that are active by default, as soon as your AWS account is created, are referred to as *commercial Regions*, or simply, *Regions*.

The term *opt-in* has a historical basis. Any AWS Regions introduced after March 20, 2019 are considered to be opt-in Regions. Opt-in Regions have higher security requirements than commercial Regions, regarding the sharing of IAM data through accounts that are active in opt-in Regions. All of the data managed through the IAM service is considered identity data, including users, groups, roles, policies, identity providers, their associated data (for example, X.509 signing certificates or context-specific credentials), and other account-level settings, such as password policy and the account alias.

You can activate opt-in Regions automatically during channel setup, by selecting them. Your channel becomes active in all selected Regions.

If you choose to select an opt-in Region as for your MediaPackage resources, enable it first by following the steps in [Enabling a Region](https://docs.aws.amazon.com//general/latest/gr/rande-manage.html#rande-manage-enable), when signed in to the AWS Management Console. 

MediaPackage is available in the following AWS opt-in Regions:
+ Middle East (UAE) Region, me-central-1
+ Asia Pacific (Hyderabad) Region, ap-south-2
+ Asia Pacific (Melbourne) Region, ap-southeast-4