

# Destination fields in an HLS output group
Destination fields

The HLS output group in MediaLive supports several types of destinations. Each type has different configuration requirements.

**Topics**
+ [

# Fields for the output destination – sending to Amazon S3
](hls-destinations-s3.md)
+ [

# Fields for the output destination – sending to MediaStore
](hls-destinations-ems.md)
+ [

# Fields for the output destination – sending to MediaPackage
](hls-destinations-emp.md)
+ [

# Fields for the output destination – sending to an HTTP server
](hls-destinations-http.md)

# Fields for the output destination – sending to Amazon S3
Amazon S3

When you [planned the destinations for the HLS output group](origin-server-hls-s3.md), you might have decided to send the output to Amazon S3. You must design the destination path or paths for the output. You must then enter the different portions of the path into the appropriate fields on the console.

**Topics**
+ [

# Design the path for the output destination
](hls-destinations-s3-design.md)
+ [

# Complete the fields on the Console
](hls-destinations-s3-specify.md)

# Design the path for the output destination
Step 1: Design the path

Perform this step if you haven't yet designed the full destination path or paths. If you've already designed the paths, go to [Complete the fields on the Console](hls-destinations-s3-specify.md).

**To design the path**

1. Collect the bucket names that you [previously obtained](origin-server-hls-s3.md) from the Amazon S3 user. For example:

   `amzn-s3-demo-bucket`

1. Design the portions of the destination paths that follow the bucket or buckets. For details, see the sections that follow.

**Topics**
+ [

## The syntax for the paths for the outputs
](#hls-syntax-s3)
+ [

## Designing the folders and baseFilename
](#hls-path-s3)
+ [

## Designing the nameModifier
](#hls-nameModifier-design-s3)
+ [

## Designing the segmentModifier
](#hls-segmentModifier-design-s3)

## The syntax for the paths for the outputs


An HLS output always includes three categories of files: 
+ The main manifest
+ The child manifests
+ The media files

The following table describes the parts that make up the destination paths for these three categories of files.

The destination paths for these three categories of files are identical up to and including the *baseFilename*, which means that MediaLive sends all these categories of files to the same folder. The modifiers and file extensions are different for each category of file. When sending to Amazon S3, you must send all the files to the same folder. The downstream systems expect all the files to be together.


| File | Syntax of the path | Example | 
| --- | --- | --- | 
| Main manifest files | protocol bucket path baseFilename extension | The path for a main manifest in the bucket *sports*, with the file name *index*:s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index.m3u8 | 
| Child manifest files | protocol bucket path baseFilename nameModifier extension | The path for the child manifest for the high-resolution renditions of the curling output`s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index-high.m3u8` | 
| Media files (segments) | protocol bucket path baseFilename nameModifier optionalSegmentModifier counter extension | The path for the file for the 230th segment might be:s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index-high-00230.ts | 

These destination paths are constructed as follows:
+ The Amazon S3 user should have provided you with the bucket names.
+ You must determine the following: 
  + The folders
  + The baseFilename
  + The modifier
  + The segmentModifier

  See the sections that follow.
+ MediaLive inserts the underscore before the counter.
+ MediaLiveautomatically generates this counter. Initially, this is a five-digit number starting at 00001, and increasing by 1. So 00001, 00002, 00003 and so on. After 99999, the next number is 100000 (six digits), then 100001, 100002, and so on. Then from 999999 to 1000000 (seven digits), and so on.
+ MediaLive inserts the dot before the extension.
+ MediaLive selects the extension:
  + For manifest files – always `.m3u8`
  + For media files – .ts for files in a transport stream, or .mp4 for files in an fMP4 container 

## Designing the folders and baseFilename


Design a folder path and baseFilename that suits your purposes. 

If you have two destinations for each output, the destination paths must be different from each other in some way. Follow these guidelines:
+ At least one of the portions of one path must be different from the other. It is acceptable for all the portions to be different. 

  Therefore, if the buckets are *different*, the folder path and file names for the two destinations can be different from each other, or they can be the same. For example:

  `s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index-high.m3u8`

  `s3ssl://amzn-s3-demo-bucket1/sports/delivery/curling/index-high.m3u8`

  or

  `s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index-high.m3u8`

  `s3ssl://amzn-s3-demo-bucket1/sports/redundant/curling/index-high.m3u8`
+ If the buckets are *the same*, the folder path and file names for the two destinations must be different from each other. For example:

  `s3ssl://amzn-s3-demo-bucket/sports/delivery/curling/index-high.m3u8`

  `s3ssl://amzn-s3-demo-bucket/sports/redundant/curling/index-high.m3u8`

## Designing the nameModifier


Design the `nameModifier` portions of the file name. The child manifests and media files include this modifier in their file names. This `nameModifier` distinguishes each output from the other, so it must be unique in each output. Follow these guidelines:
+ For an output that contains video (and possibly other streams), you typically describe the video. For example, **-high** or **-1920x1080-5500kpbs** (to describe the resolution and the bitrate).
+ For an output that contains only audio or only captions, you typically describe the audio or captions. For example, **-aac** or **-webVTT**.
+ It’s a good idea to start the `nameModifier` with a delimiter, such as a hyphen, in order to separate the` baseFilename` from the `nameModifier`.
+ The `nameModifier` can include [data variables](variable-data-identifiers.md).

## Designing the segmentModifier


Design the segmentModifiers portion of the destination path. The segmentModifier is optional, and if you include it, only the media file names include it. 

A typical use case for this modifier is to use a data variable to create a timestamp, to prevent segments overriding each other if the channel restarts. For example, assume that you include the timestamp **\$1t\$1-**. Segment 00001 might have the name `index-120028-00001`. If the output restarts a few minutes later (which causes the segment counter to restart), the new segment 00001 will have the name `index-120039-00001`. The new file won't overwrite the file for the original segment 00001. Some downstream systems might prefer this behavior.

# Complete the fields on the Console
Step 2: Complete the fields

After you have designed the output names and destination paths, you can set up the HLS output group.

The following fields configure the location and names of the HLS media and manifest files (the destination).
+ **Output group – HLS group destination** section
+ **Output group – HLS settings – CDN** section
+ **Output group – Location – Directory structure **
+ **Output group – Location – Segments per subdirectory**
+ **HLS outputs – Output settings – Name modifier**
+ **HLS outputs – Output settings – Segment modifier**

**To set the destination for most downstream systems**

1. Complete the **URL** fields in the **HLS group destinations** section. Specify two destinations if the channel is set up as a standard channel, or one destination if it is set up as a single-pipeline channel.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-destinations-s3-specify.html)

1. Leave the **Credentials** section blank in both the **HLS group destinations** sections. MediaLive has permission to write to the S3 bucket via the trusted entity. Someone in your organization should have already set up these permissions. For more information, see [Access requirements for the trusted entity](trusted-entity-requirements.md).

1. In the **CDN** settings section, choose `Hls S3`.

1. Complete the **CDN settings** field only if MediaLive must set a canned ACL whenever it sends this output to the Amazon S3 bucket.

   Use of a canned ACL typically only applies if your organization is not the owner of the Amazon S3 bucket. You should have discussed the use of a canned ACL with the bucket owner when you discussed the [destination for the output](origin-server-hls-s3.md#setting-dss-hls-canned-acl).

# Fields for the output destination – sending to MediaStore
MediaStore

When you [planned the destinations for the HLS output group](origin-server-ems.md), you might have decided to send the output to MediaStore. You must design the destination path or paths for the output. You must then enter the different portions of the path into the appropriate fields on the console.

**Topics**
+ [

# Design the path for the output destination
](hls-destinations-ems-design.md)
+ [

# Complete the fields on the console
](hls-specify-destination-ems.md)

# Design the path for the output destination
Step 1: Design the path

Perform this step if you haven't yet designed the full destination path or paths. If you've already designed the paths, go to [Complete the fields on the console](hls-specify-destination-ems.md).

**To design the path**

1. Collect the data endpoint for the container or containers. You [previously obtained](origin-server-ems.md) this information from the MediaStore user. For example:

   `a23f.data.mediastore.us-west-2.amazonaws.com`

1. Design the portions of the destination paths that follow the data endpoint (for MediaStore). 

**Topics**
+ [

## The syntax for the paths for the outputs
](#hls-syntax-ems)
+ [

## How MediaLive constructs the paths
](#hls-how-construct-urls-ems)
+ [

## Designing the folders and baseFilename
](#hls-path-ems)
+ [

## Designing the nameModifier
](#hls-nameModifier-design-ems)
+ [

## Designing the segmentModifier
](#hls-segmentModifier-design-ems)

## The syntax for the paths for the outputs


An HLS output always includes three categories of files: 
+ The main manifest
+ The child manifests
+ The media files

The following table describes the parts that make up the destination paths for these three categories of files.

The destination paths for these three categories of files are identical up to and including the *baseFilename*, which means that MediaLive sends all these categories of files to the same folder. The modifiers and file extensions are different for each category of file. When sending to MediaStore, you must send all the files to the same folder. The downstream systems expect all the files to be together.


| File | Syntax of the path | Example | 
| --- | --- | --- | 
| Main manifest files | protocol dataEndpoint path baseFilename extension | The path for a main manifest in the path *delivery* in the container, and with the file name *index*:mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index.m3u8 | 
| Child manifest files | protocol dataEndpoint path baseFilename nameModifier extension | The path for the child manifest for the high-resolution renditions of the output`mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index-high.m3u8` | 
| Media files (segments) | protocol dataEndpoint path baseFilename nameModifier optionalSegmentModifier counter extension | The path for the file for the 230th segment might be:mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index-high-00230.ts | 

## How MediaLive constructs the paths


These paths are constructed as follows:
+ The user of the AWS service should have provided you with the container names.
+ For MediaStore, you must determine the following: 
  + The folders
  + The baseFilename
  + The modifier
  + The segmentModifier

  See the sections that follow.
+ MediaLive inserts the underscore before the counter.
+ MediaLive generates the counter, which is always five digits starting at 00001.
+ MediaLive inserts the dot before the extension.
+ MediaLive selects the extension:
  + For manifest files – always` .m3u8`
  + For media files – .ts for files in a transport stream, or .mp4 for files in an fMP4 container 

## Designing the folders and baseFilename


Design a folder path and baseFilename that suits your purposes. 

If you have two destinations for each output, the destination paths must be different from each other in some way. Follow these guidelines:
+ At least one of the portions of one path must be different from the other. It is acceptable for all the portions to be different. 

  Therefore, if the buckets or containers are different, the folder path and file names for the two destinations can be different from each other, or they can be the same. For example:

  `mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index.m3u8`

  `mediastoressl://fe30.data.mediastore.us-west-2.amazonaws.com/delivery/index.m3u8`

  or

  `mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index.m3u8`

  `mediastoressl://fe30.data.mediastore.us-west-2.amazonaws.com/redundant/index.m3u8`
+ If the buckets or containers are the same, the folder path and file names for the two destinations must be different from each other. For example:

  `mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/delivery/index.m3u8`

  `mediastoressl://a23f.data.mediastore.us-west-2.amazonaws.com/redundant/index.m3u8`

## Designing the nameModifier


Design the `nameModifier` portions of the file name. The child manifests and media files include this modifier in their file names. This `nameModifier` distinguishes each output from the other, so it must be unique in each output. Follow these guidelines:
+ For an output that contains video (and possibly other streams), you typically describe the video. For example, **-high** or **-1920x1080-5500kpbs** (to describe the resolution and the bitrate).
+ For an output that contains only audio or only captions, you typically describe the audio or captions. For example, **-aac** or **-webVTT**.
+ It’s a good idea to start the `nameModifier` with a delimiter, such as a hyphen, in order to separate the` baseFilename` from the `nameModifier`.
+ The `nameModifier` can include [data variables](variable-data-identifiers.md).

## Designing the segmentModifier


Design the segmentModifiers portion of the destination path. The segmentModifier is optional, and if you include it, only the media file names include it. 

A typical use case for this modifier is to use a data variable to create a timestamp, to prevent segments overriding each other if the channel restarts. For example, assume that you include the timestamp **\$1t\$1-**. Segment 00001 might have the name `index-120028-00001`. If the output restarts a few minutes later (which causes the segment counter to restart), the new segment 00001 will have the name `index-120039-00001`. The new file won't overwrite the file for the original segment 00001. Some downstream systems might prefer this behavior.

# Complete the fields on the console
Step 2: Complete the fields

After you have designed the output names and destination paths, you can set up the HLS output group.

The following fields configure the location and names of the HLS media and manifest files (the destination).
+ **Output group – HLS group destination** section
+ **Output group – HLS settings – CDN** section
+ **Output group – Location – Directory structure **
+ **Output group – Location – Segments per subdirectory**
+ **HLS outputs – Output settings – Name modifier**
+ **HLS outputs – Output settings – Segment modifier**

**To set the destination for most downstream systems**

1. Complete the **URL** fields in the **HLS group destinations** section. Specify two destinations if the channel is set up as a standard channel, or one destination if it is set up as a single-pipeline channel.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-specify-destination-ems.html)

1. Leave the **Credentials** section blank in both the **HLS group destinations** sections. MediaLive has permission to write to the MediaStore container via the trusted entity. Someone in your organization should have already set up these permissions. For more information, see [Access requirements for the trusted entity](trusted-entity-requirements.md).

1. In the **CDN** settings section, choose `Hls media store`.

1. If the MediaStore user gave you values to [configure the connection](origin-server-http.md), enter those values in the fields in the **CDN** settings section.

# Fields for the output destination – sending to MediaPackage
MediaPackageDelivery to AWS Elemental MediaPackage v2

The guide includes information about setting up an HLS output group to deliver to a AWS Elemental MediaPackage channel that uses MediaPackage v2.Corrections to delivery to AWS Elemental MediaPackage

The information for using HLS output groups to deliver to MediaPackage using the standard MediaPackage API and using the MediaPackage v2 API have both been revised to correct errors, particularly in the examples for the MediaPackage channel URLs. 

When you [planned the output to MediaPackage](hls-choosing-hls-vs-emp.md), you might have decided to send the output by creating an HLS output group. (Or you might have decided to create a [MediaPackage output group](creating-mediapackage-output-group.md).)

You must design the destination path or paths for the output. You must then enter the different portions of the path into the appropriate fields on the console.

You can use an HLS output group to send to standard MediaPackage or toMediaPackage v2. The two versions use different protocols:
+ MediaPackage uses WebDAV.
+ MediaPackage v2 uses Basic PUT.

**Topics**
+ [

# Design the path for the output destination
](hls-destinations-emp-design.md)
+ [

# Complete the fields on the console
](hls-specify-destination-emp.md)
+ [

# Standard MediaPackage example
](hls-example-mediapackage.md)
+ [

# MediaPackage v2 example
](hls-example-mediapackage-v2.md)

# Design the path for the output destination
Step 1: Design the path

Perform this step if you haven't yet designed the full destination path or paths. If you've already designed the paths, go to [Complete the fields on the console](hls-specify-destination-emp.md).

**To design the path**

1. Collect the information you [previously obtained](origin-server-hls-emp.md) from the MediaPackage user:
   + The two URLs (input endpoints is the MediaPackage terminology) for the channel. See the information after this procedure. 
   + If you are using standard MediaPackage, obtain the user name and password. If you are using MediaPackage v2, you don't use user credentials.

1. You must design the portions of the destination paths that follow the URLs. 

**Topics**
+ [

# Collect the information for standard MediaPackage
](hls-destinations-emp-info.md)
+ [

# Collect the information for MediaPackage v2
](hls-destinations-emp-info-v2.md)
+ [

# The syntax for the paths for the outputs
](hls-syntax-emp.md)
+ [

# Designing the nameModifier
](hls-nameModifier-design-emp.md)
+ [

# Designing the segmentModifier
](hls-segmentModifier-design-emp.md)

# Collect the information for standard MediaPackage
Information for MediaPackage

For standard MediaPackage, the two URLs for a channel look like these examples:

`6d2c.mediapackage.us-west-2.amazonaws.com/in/v2/9dj8/9dj8/channel` 

`6d2c.mediapackage.us-west-2.amazonaws.com/in/v2/9dj8/e333/channel`

Where:

`mediapackage` indicates that the input endpoints uses version 1 of the MediaPackage API

`channel` always appears at the end of the URL. It is the base filename for all the files for this destination. 

The two URLs are always identical except for the folder just before `channel`.

# Collect the information for MediaPackage v2
Information for MediaPackage v2

For MediaPackage v2, the two URLs for a channel look like these examples:

`mz82o4-1.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/1/curling/index`

`mz82o4-2.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/2/curling/index`

Where: 


| Element | Description | 
| --- | --- | 
| mz82o4-1 and mz82o4-2 |  Indicate that the two endpoints are for a redundant channel in MediaPackage. The prefixes are always -1 and -2 | 
| mediapackagev2 | Indicates that the input endpoints uses version 2 of the MediaPackage API | 
| live-sports/1/curling and live-sports/2/curling | Folders for the redundant ingests. One folder always includes /1/, and the other folder always includes /2/  | 
| index | Always appears at the end of the URL. It is the base filename for all the files for this destination.  | 

# The syntax for the paths for the outputs
Syntax for path

An HLS output always includes three categories of files: 

See the following sections.
+ The main manifest
+ The child manifests
+ The media files

The following table describes the parts that make up the destination paths for these three categories of files.

The destination paths for these three categories of files are identical up to and including the *baseFilename*, which means thatMediaLive sends all these categories of files to the same folder. The modifiers and file extensions are different for each category of file. When sending to MediaPackage, you must send all the files to the same folder. The downstream systems expect all the files to be together.


| File | Syntax of the path | Example | 
| --- | --- | --- | 
| Main manifest files |  protocol channelURL extension |  The path for output. Here is an example that uses MediaPackage v2 `https://mz82o4-2.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/2/curling/index.m3u8`  | 
| Child manifest files | protocol channelURL nameModifier extension | Here is an example for the path for the child manifest for the high-resolution renditions of the curling output (in a destination that uses MediaPackage v2):`https://mz82o4-1.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/1/curling/index-high.m3u8` | 
| Media files (segments) | protocol channelURL nameModifier optionalSegmentModifier counter extension | Here is an example for the path for the file for the 230th segment (in a destination that uses MediaPackage v2):https://mz82o4-1.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/1/curling/index-high-00230.ts | 

These paths are constructed as follows:
+ The MediaPackage user should have provided you with the channel URLs. The URLs cover the portion of the path up to and including the baseFilename:
  + With standard MediaPackage, the baseFilename is always `channel`. 
  + With MediaPackage v2, the baseFilename is always `index`. 
+ You must specify the following:
  + The modifier
  + The segmentModifier

  See the sections that follow.
+ MediaLive inserts the underscore before the counter.
+ MediaLive generates the counter, which is always five digits starting at 00001.
+ MediaLive inserts the dot before the extension.
+ MediaLive selects the extension:
  + For manifest files – always` .m3u8`
  + For media files – .ts for files in a transport stream, or .mp4 for files in an fMP4 container 

# Designing the nameModifier
Name modifier

Design the `nameModifier` portions of the file name. The child manifests and media files include this modifier in their file names. 

This `nameModifier` distinguishes each output from the other, so it must be unique in each output. 
+ For an output that contains video (and possibly other streams), you typically describe the video. For example, if you have three renditions, you might use **-high**, **-medium** and **-low**. Or each modifier could accurately describe the resolution and the bitrate (**-1920x1080-5500kpbs**).
+ For an output that contains only audio or only captions, you typically describe the audio or captions. For example, **-aac** or **-webVTT**.

It’s a good idea to start the `nameModifier` with a delimiter, such as a hyphen, in order to separate the` baseFilename` from the `nameModifier`.

The `nameModifier` can include [data variables](variable-data-identifiers.md).

# Designing the segmentModifier
Segment modifier

Design the segmentModifiers portion of the destination path. The segmentModifier is optional, and if you include it, only the media file names include it. 

A typical use case for this modifier is to use a data variable to create a timestamp, to prevent segments overriding each other if the channel restarts. For example, assume that you include the timestamp **\$1t\$1-**. Segment 00001 might have the name `index-120028-00001`. If the output restarts a few minutes later (which causes the segment counter to restart), the new segment 00001 will have the name `index-120039-00001`. The new file won't overwrite the file for the original segment 00001. Some downstream systems might prefer this behavior.

# Complete the fields on the console
Step 2: Complete the fields

After you have designed the output names and destination paths, you can set up the HLS output group.

The following fields configure the location and names of the HLS media and manifest files (the destination).
+ **Output group – HLS group destination** section
+ **Output group – HLS settings – CDN** section
+ **Output group – Location – Directory structure **
+ **Output group – Location – Segments per subdirectory**
+ **HLS outputs – Output settings – Name modifier**
+ **HLS outputs – Output settings – Segment modifier**

**To set the destination**

1. Complete the **URL** fields in the **HLS group destinations** section. Specify two destinations if the channel is set up as a standard channel, or one destination if it is set up as a single-pipeline channel.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-specify-destination-emp.html)

1. Enter the input user name. For the password (if applicable), enter the name of the password stored on the AWS Systems Manager Parameter Store. Don't enter the password itself. For more information, see [Requirements for AWS Systems Manager password parameters](requirements-for-EC2.md).

1. In the **CDN** settings section, choose the appropriate connection type:
   + To send to standard MediaPackage, choose `Hls webdav`.
   + To send to MediaPackage v2, choose `Basic PUT`.

1. If the downstream system gave you values to [configure the connection](origin-server-http.md), enter those values in the fields in the **CDN** settings section.

# Standard MediaPackage example


This example shows how to set up the destination fields if the downstream system for the HLS output group is standard MediaPackage.

Assume that you want to stream the curling game and to create three outputs: high, medium, and low bitrate. 


| Field | Value | 
| --- | --- | 
| CDN settings in HLS settings section | hls webdav  | 
| URL in HLS group destination A section |  6d2c.mediapackage.us-west-2.amazonaws.com/in/v2/9dj8/9dj8/channel | 
| Credentials in HLS group destination A section | MediaPackage accepts only authenticated requests, so you must enter a user name and a password that is known to MediaPackage. For the password, enter the name of the password stored on the AWS Systems Manager Parameter Store. Don't enter the password itself. For more information, see [Requirements for AWS Systems Manager password parameters](requirements-for-EC2.md).  | 
| URL in HLS group destination B section |  6d2c.mediapackage.us-west-2.amazonaws.com/in/v2/9dj8/e333/channel | 
| Credentials in HLS group destination B section | Enter a user name and password for the URL for destination B. The credentials are probably the same for both URLs, but they might not be. | 
| Name modifier in HLS outputs section |  Choose **Add output** twice: two more **Output** lines are added to this section, for a total of three lines. In each line, enter a modifier: **-high**, **-medium**, and **-low**.  | 
| Directory Structure and Segments Per Subdirectory in Location section | MediaPackage doesn't use these fields, therefore leave them blank.  | 

As a result, files are created with the following names:
+ One main manifest: **channel.m3u8**
+ One child manifest for each output: **channel-high.m3u8**, **channel-medium.m3u8**, **channel-low.m3u8**
+ TS files for each output: 
  + **channel-high-00001.ts**, **channel-high-00002.ts**, **channel-high-00003.ts**, and so on
  + **channel-medium-00001.ts**, **channel-medium-00002.ts**, **channel-medium-00003.ts**, and so on 
  + **channel-low-00001.ts**, **channel-low-00002.ts**,** channel-low-00003.ts**, and so on

The files will be published to both URL inputs on MediaPackage.

# MediaPackage v2 example


This example shows how to set up the destination fields if the downstream system for the HLS output group is standard MediaPackage. 

Assume that you want to stream the curling game and to create three outputs: high, medium, and low bitrate. 


| Field | Value | 
| --- | --- | 
| CDN settings in HLS settings section |  **basic PUT**  | 
| URL in HLS group destination A section | mz82o4-1.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/1/curling/index | 
| Credentials in HLS group destination A section | Leave blank. MediaPackage v2 doesn't use credentials to authenticate.  | 
| URL in HLS group destination B section | mz82o4-2.ingest.hnycui.mediapackagev2.us-west-2.amazonaws.com/in/v1/live-sports/2/curling/index. | 
| Credentials in HLS group destination B section | Leave blank. MediaPackage v2 doesn't use credentials to authenticate.  | 
| Name modifier in HLS outputs section |  Choose **Add output** twice: two more **Output** lines are added to this section, for a total of three lines. In each line, enter a modifier: **-high**, **-medium**, and **-low**.  | 
| Directory Structure and Segments Per Subdirectory in Location section | MediaPackage doesn't use these fields, therefore leave them blank.  | 

As a result, files are created with the following names:
+ One main manifest: **index.m3u8**
+ One child manifest for each output: **index-high.m3u8**, **index-medium.m3u8**, **index-low.m3u8**
+ TS files for each output: 
  + **index-high-00001.ts**, **index-high-00002.ts**, **index-high-00003.ts**, and so on
  + **index-medium-00001.ts**, **index-medium-00002.ts**, **index-medium-00003.ts**, and so on 
  + **index-low-00001.ts**, **index-low-00002.ts**,** index-low-00003.ts**, and so on

The files will be published to both URL inputs on MediaPackage.

# Fields for the output destination – sending to an HTTP server
HTTP server

When you [planned the destinations for the HLS output group](origin-server-http.md), you might have decided to send the output to an HTTP server. 

You must design the destination path or paths for the output. You must then enter the different portions of the path into the appropriate fields on the console.

**Topics**
+ [

# Design the path for the output destination
](hls-destinations-design-step.md)
+ [

# Complete the fields on the console
](hls-specify-destination.md)
+ [

# Example for an HTTP or HTTPS server
](hls-example-most-downstreamsystems.md)
+ [

# Akamai example
](hls-example-akamai.md)

# Design the path for the output destination
Step 1: Design the path

Perform this step if you haven't yet designed the full destination path or paths. If you've already designed the paths, go to [Complete the fields on the console](hls-specify-destination.md).

**To design the path**

1. Collect the information that you [previously obtained](origin-server-http.md) from the operator of the downstream system:
   + The connection type for the downstream system – Akamai, basic PUT, or WebDAV.
   + The settings for connection fields, if the downstream system has special requirements.
   + The protocol for delivery—HTTP or HTTPS.
   + The user name and password to access the downstream system, if the downstream system requires authenticated requests. Note that these user credentials relate to user authentication, not to the protocol. User authentication is about whether the downstream system will accept your request. The protocol is about whether the request is sent over a secure connection.
   + All or part of the destination paths, possibly including the file names.
   + Whether you need to set up separate subdirectories.

1. As part of the planning with the operator of the downstream system, you should have determined if you want to implement redundant manifests. You should also have determined if the downstream system requires custom manifests. Given these two decisions, read the appropriate section:
   + If you are implementing redundant manifests, see [Creating redundant HLS manifests](hls-redundant-manifests.md), then return to this section.
   + If you are implementing custom paths for manifests, see [Customizing the paths inside HLS manifests](hls-manifest-paths.md), then return to this section.
   + If you are not implementing either of those features, continue keep reading this section.

1. Design the portions of the destination paths that follow the bucket or buckets. For details, see the sections that follow.

**Topics**
+ [

## The syntax for the paths for the outputs
](#hls-syntax-http)
+ [

## Designing the folders and baseFilename
](#hls-baseFilename-design)
+ [

## Designing the nameModifier
](#hls-nameModifier-design)
+ [

## Designing the segmentModifier
](#hls-segmentModifier-design)

## The syntax for the paths for the outputs


The following table describes the parts that make up the destination paths for these three categories of files.

The destination paths for these three categories of files are identical up to and including the *baseFilename*, which means thatMediaLive sends all these categories of files to the same folder. The modifiers and file extensions are different for each category of file. 


| File | Syntax of the path | Example | 
| --- | --- | --- | 
| Main manifest files | protocol domain path baseFilename extension | The URL for a main manifest with the file name */index*:http://203.0.113.55/sports/delivery/curling/index.m3u8 | 
| Child manifest files | protocol domain path baseFilename nameModifier extension | The URL for the child manifest for the high-resolution renditions of the output`http://203.0.113.55/sports/delivery/curling/index-high.m3u8` | 
| Media files (segments) | protocol domain path baseFilename nameModifier optionalSegmentModifier counter extension | The URL for the file for the 230th segment might be:http:// 203.0.113.55/sports/delivery/curling/index-high-00230.ts | 

These destination paths are constructed as follows:
+ The operator at the downstream system [should have provided you](origin-server-http.md) with the protocol, domain and part of the path. For example:

  `http://203.0.113.55/sports/`

  The protocol is always HTTP or HTTPS.
+ The operator might have provided the following. Otherwise, you decide them: 
  + The folders
  + The baseFilename
  + The modifier
  + The segmentModifier

  See the sections that follow.
+ MediaLive inserts the underscore before the counter.
+ MediaLive generates the counter, which is always five digits starting at 00001.
+ MediaLive inserts the dot before the extension.
+ MediaLive selects the extension:
  + For manifest files – always` .m3u8`
  + For media files – `.ts` for files in a transport stream, and `.mp4` for files in an fMP4 container 

## Designing the folders and baseFilename


For the `folder` and `baseFilename` portion of the destination path, follow these guidelines:
+ For a single-pipeline channel, you need only one `baseFilename`.
+ For a standard channel when you are *not *implementing [redundant manifests](hls-opg-redundant-manifest.md), you need two `baseFilenames`. The two `baseFilenames` can be identical or different. Before you create different `baseFilenames`, make sure that the downstream system can work with that setup.
+ For a standard channel when you *are* implementing redundant manifests, see [Fields for redundant manifests](hls-opg-redundant-manifest.md).

## Designing the nameModifier


Design the `nameModifier` portions of the file name. The child manifests and media files include this modifier in their file names. This `nameModifier` distinguishes each output from the other, so it must be unique in each output. Follow these guidelines:
+ For an output that contains video (and possibly other streams), you typically describe the video. For example, **-high** or **-1920x1080-5500kpbs** (to describe the resolution and the bitrate).
+ For an output that contains only audio or only captions, you typically describe the audio or captions. For example, **-aac** or **-webVTT**.
+ It’s a good idea to include a delimiter, to clearly separate the` baseFilename` from the `nameModifier`.
+ The` nameModifier` can include [data variables](variable-data-identifiers.md).

## Designing the segmentModifier


Design the segmentModifiers portion of the destination path. The segmentModifier is optional, and if you include it, only the media file names include it. 

A typical use case for this modifier is to use a data variable to create a timestamp, to prevent segments overriding each other if the channel restarts. For example, assume that you include the timestamp **\$1t\$1-**. Segment 00001 might have the name `/index-120028-00001`. If the output restarts a few minutes later (which causes the segment counter to restart), the new segment 00001 will have the name `/index-120039-00001`. The new file won't overwrite the file for the original segment 00001. Some downstream systems might prefer this behavior.

# Complete the fields on the console
Step 2: Complete the fields

The following fields configure the location and names of the HLS media and manifest files (the destination).
+ **Output group – HLS group destination** section
+ **Output group – HLS settings – CDN** section
+ **Output group – Location – Directory structure **
+ **Output group – Location – Segments per subdirectory**
+ **HLS outputs – Output settings – Name modifier**
+ **HLS outputs – Output settings – Segment modifier**

**To set the destination**

1. Complete the **URL** fields in the **HLS group destinations** section. Specify two destinations if the channel is set up as a standard channel, or one destination if it is set up as a single-pipeline channel.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-specify-destination.html)

1. If the downstream system requires user authentication from MediaLive, in each **HLS group destination** section, complete the **Credentials** section. Enter a user name and a password provided by the downstream system. For the password, enter the name of the password stored on the AWS Systems Manager Parameter Store. Don't enter the password itself. For more information, see [Requirements for AWS Systems Manager password parameters](requirements-for-EC2.md). 

1. In the **CDN** settings section, choose the option that the downstream system told you to use—Akamai, PUT, or WebDAV.

1. If the downstream system gave you values to [configure the connection](origin-server-http.md), enter those values in the fields in the **CDN** settings section.

# Example for an HTTP or HTTPS server
HTTP example

This example shows how to set up the destination fields if the downstream system is an HTTPS server that uses basic PUT. 

Assume that you want to stream the curling game and to create three outputs: high, medium, and low bitrate.


| Field | Value | 
| --- | --- | 
| CDN settings in HLS settings section | Hls basic putChange the other CDN fields according to the instructions from the downstream system.  | 
| URL in HLS group destination A section | For example:**https://203.0.113.55/sports/curling/index** | 
| Credentials in HLS group destination A section | If the downstream system requires authenticated requests, enter the user name provided by the downstream system. For the password, enter the name of the password stored on the AWS Systems Manager Parameter Store. Don't enter the password itself. For more information, see [Requirements for AWS Systems Manager password parameters](requirements-for-EC2.md).  | 
| URL in HLS group destination B section | For example:**https://203.0.113.82/sports/curling/index** | 
| Credentials in HLS group destination B section | Enter a user name and password for the URL for destination B, if applicable. The credentials are probably the same for both URLs, but they might not be. | 
| Name modifier in HLS outputs section |  Choose **Add output** twice: two more **Output** lines are added to this section, for a total of three lines. In each line, enter a modifier: **-high**, **-medium**, and **-low**.  | 
| Directory Structure and Segments Per Subdirectory in Location section |  Assume that the downstream system doesn't use these fields.  | 

As a result, files are created with the following names:
+ One main manifest: `index.m3u8`
+ One child manifest for each output: `index-high.m3u8`, `index-medium.m3u8`, `index-low.m3u8`
+ TS files for each output: 
  + `index-high-00001.ts`, `index-high-00002.ts`, `index-high-00003.ts`, and so on
  + `index-medium-00001.ts`, `index-medium-00002.ts`, `index-medium-00003.ts`, and so on 
  + `index-low-00001.ts`, `index-low-00002.ts`, ` index-low-00003.ts`, and so on

The files will be published to two hosts at the downstream system, and in a folder called `sports` on each host.

# Akamai example


This example shows how to set up the destination fields if the downstream system is an Akamai server. 

Assume that you want to stream the curling game and to create three outputs: high, medium, and low bitrate. 


| Field | Value | 
| --- | --- | 
| CDN settings in HLS settings section | HLS akamai Select this setting if you are using Akamai Token Authentication. Change the other CDN fields according to the instructions from Akamai.HLS basic put Select this setting if you are using digest authentication. Change the other CDN fields according to the instructions from Akamai. | 
| URL in HLS group destination A section | For example:**https://p-ep50002.i.akamaientrypoint.net/50002/curling/index**Mapping this URL to the Akamai terminology: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-example-akamai.html) | 
| Credentials in HLS group destination A section | If Akamai requires authenticated requests, enter a user name and a password that is known to Akamai. For the password, enter the name of the password stored on the AWS Systems Manager Parameter Store. Don't enter the password itself. For more information, see [Requirements for AWS Systems Manager password parameters](requirements-for-EC2.md).  | 
| URL in HLS group destination B section | For example:**https://b-ep50002.i.akamaientrypoint.net/50002-b/curling/index**Mapping this URL to the Akamai terminology: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/hls-example-akamai.html) | 
| Credentials in HLS group destination B section | Enter a user name and password for the URL for the other destination, if applicable. The credentials are probably the same for both URLs, but they might not be. | 
| Name modifier in HLS outputs section |  Choose **Add output** twice: two more **Output** lines are added to this section, for a total of three lines. In each line, enter a modifier: **-high**, **-medium**, and **-low**.  | 
| Directory Structure and Segments Per Subdirectory in Location section |  Complete the fields according to the instructions from Akamai.  | 

As a result, files are created with the following names:
+ One main manifest: **index.m3u8**
+ One child manifest for each output: **index-high.m3u8**, **index-medium.m3u8**, **index-low.m3u8**
+ TS files for each output: 
  + `index-high-00001.ts`, `index-high-00002.ts`, `index-high-00003.ts`, and so on
  + `index-medium-00001.ts`, `index-medium-00002.ts`, `index-medium-00003.ts`, and so on 
  + `index-low-00001.ts`, `index-low-00002.ts`,` index-low-00003.ts`, and so on



The files will be published to two places: 
+ On the Akamai host **p-ep50002.i.akamaientrypoint.net** in a folder called **50002**
+ On the host **b-ep50002.i.akamaientrypoint.net** in a folder called **50002-b**