

# Create captions encodes
Step 4: Set up outputs

As the final step in setting up captions in a MediaLive channel, you must set up the captions in each output group. For each output and captions format that you identified, follow the procedure that applies to the format category:
+ [Create embedded or object captions encodes](output-embedded-and-more.md)
+ [Create sidecar or SMPTE-TT captions encodes](output-sidecar-and-smptett-mss.md)

# Create embedded or object captions encodes
Embedded or object captions encodes

Follow this procedure if the format of the captions asset that you want to add belongs to the category of embedded, burn-in, or object. You set up the captions and video and audio in the same MediaLive output.

1. In the **Create channel** or **Edit channel** page for the channel, in the **Channel** panel, find the output group where you want to set up captions.

1. If you have already set up outputs in this output group with video (and possibly audio), find the outputs where you want to add the captions. Or create a new output in this output group.

1. In the output, go to the **Stream settings** and choose **Add caption**, then **Create a new caption encode**. Captions fields appear.. 

1. Complete the following fields:
   + **Captions description name**: Enter a name that is unique in the channel, for example, **Embedded**.
   + **Captions selector name**: Select the captions selector that you created when you [created the captions selectors in the input](identify-captions-in-the-input.md). Specify the selector that identifies the captions asset that is the source for the captions in this output.
   + **Captions settings**: Choose the captions format for the output captions. Depending on the format, more fields appear.

1. Choose **Additional settings**. More fields appear. See the table after this procedure for information about which fields to complete for each format.

   Complete the fields that appear for the selected format. For details about a field, choose the Info link beside the field.

1. You now have a captions encode that is fully defined. Repeat these steps to create more captions in this output or in another output, or in another output group.


| Field | Topic | Applicable formats | For more information, see this section | 
| --- | --- | --- | --- | 
| Font, Positioning, Font Style | Captions style | Burn-in, DVB-Sub | [Font styles for Burn-in or DVB-Sub](font-styles-for-burn-in.md) | 
| Language code, Language description | Language information for this specific caption | All formats | Optional. For information, choose the Info link next to each field. | 
| Accessibility, Caption DASH Roles, DVB DASH accessibility | Accessibility data | All formats | [Including accessibility data in captions in MediaLive](captions-accessibility.md) | 
| PIDs | PID assignment | ARIB, DVB-Sub | [PIDs for ARIB](complete-the-pids-for-arib.md), [PIDs for DVB-Sub](complete-the-pids-for-dvb-sub.md) | 
|  Captions language mappings  | Tags in manifest | HLS | [Language information in HLS manifests](set-up-the-hls-manifest.md) | 

# Create sidecar or SMPTE-TT captions encodes
Sidecar or SMPTE-TT captions encodes

Follow this procedure if the format of the captions asset that you want to add in the MediaLive channel is [a sidecar](categories-captions.md), or if the format is SMPTE-TT for a Microsoft Smooth output group. 

You set up the captions and video in the same output.

1. In the **Create channel** or **Edit channel** page for the channel, in the **Channel** panel, find the output group where you want to set up captions.

1. Create a new output in this output group. 

1. In the output, go to the **Stream settings** and choose **Add caption**, then **Create a new caption encode**. Captions fields appear. 

1. Complete the following fields:
   + **Captions description name**: Enter a name that is unique in the channel, for example, **Embedded**.
   + **Captions selector name**: Select the captions selector that you created when you [created the captions selectors in the input](identify-captions-in-the-input.md). Specify the selector that identifies the captions asset that is the source for the captions in this output.
   + **Captions settings**: Choose the captions format for the output captions. Depending on the format, more fields appear.

1. Choose **Additional settings**. More fields appear. See the table after this procedure for information about which fields to complete for each format.

1. You now have a captions encode that is fully defined. Repeat these steps to create more captions in this output group.


| Field | Topic | Applicable formats | Description | 
| --- | --- | --- | --- | 
| Style Control, Fill Line Gap, Font Family, Copyright Holder | Captions style | EBU-TT-D | See [Font styles for EBU-TT-D](ebu-tt-font-styles.md) | 
| Style Control | Captions style | TTML, Web-VTT | See [Font styles for TTML](ttml-font-styles.md) or [Font styles for WebVTT](webvtt-font-styles.md) | 
| Language code, Language description | Language information for this specific caption | All formats | Optional. For information, choose the Info link next to each field. | 
| Accessibility, Caption DASH Roles, DVB DASH accessibility | Accessibility data | All formats | [Including accessibility data in captions in MediaLive](captions-accessibility.md) | 
| PIDs | PID assignment | Teletext | [PIDs for Teletext](complete-the-pids-for-teletext.md),  | 

# Including accessibility data in captions in MediaLive
Accessibility data in captions

The guide now includes information about how to include accessibility data in captions outputs.

In the captions in CMAF Ingest, HLS, MediaPackage, or Microsoft Smooth output groups, you can include accessibility data. This data describes the type of accessibility that the encode represents. For example, a captions track might provide a written translation (into another language) of the speech in the content. Accessibility data is also known as accessibility signaling.

**Topics**
+ [

## Supported accessibility data standards
](#captions-accessibility-standards)
+ [

## Specifying data in a CMAF Ingest or Microsoft Smooth output
](#captions-accessibility-cmaf-mss)
+ [

## Specifying data in an HLS or MediaPackage output
](#captions-accessibility-hls-emp)

## Supported accessibility data standards


MediaLive supports the following styles of accessibility data. 


| Accessibility data style | Specification | CMAF Ingest | HLS or MediaPackage | Microsoft Smooth | 
| --- | --- | --- | --- | --- | 
| DASH role captions | DASH role scheme (ISO/IEC 23009-1:2022(E)) | Yes |  | Yes | 
| DVB DASH accessibility |  * ETSI TS 103 285 Technical Specification, V1.3.1 (2020-02)*  | Yes |  | Yes | 
|  Accessibility  |  Signaled in tags that are inserted in the HLS manifest.  |  | Yes |  | 

## Specifying data in a CMAF Ingest or Microsoft Smooth output


You can set up the captions encode to include accessibility data when you create the encode, as described in [Create embedded or object captions encodes](output-embedded-and-more.md) and [Create sidecar or SMPTE-TT captions encodes](output-sidecar-and-smptett-mss.md).

In the output that has the captions encode that you want to set up, follow these steps:
+ To include DASH Roles, choose **Add dash role**s as many times as you want. Choose the style in each role.
+ To include DVB DASH accessibility style, in **DVB DASH accessibility**, choose the applicable description. You can add only one instance of this accessibility style.

You can add more than one style of accessibility data to each encode. For example, you can add Dash Roles and DVB DASH accessibility style. You might want to do this because different downstream systems for these outputs implement different styles.

### Handling of accessibility data in CMAF Ingest or Microsoft Smooth


The fields for accessibility data appear for all output group types, including types that don't support this data. 

**Note**  
When you set up audio encodes and you plan to include accessibility data, proceed as follows. First create the audio encodes in the CMAF Ingest and/or Microsoft Smooth output groups, and set up the accessibility data. Then create the audio encodes in the other output groups.

**Handling in supported output groups**

If you aren't implementing shared captions encodes, MediaLive includes the data only in the captions outputs of the CMAF Ingest and Microsoft Smooth output groups that you set up for captions accessibility data. 

**Handling in shared encodes**

You might plan to share captions encodes among several output groups. For example, you might share a captions encode among one CMAF Ingest output group and other output groups. 

If you set up accessibility data in a shared audio encode, MediaLive will handle the data as follows:
+ It will include the data in the CMAF Ingest and Microsoft Smooth output groups that share the encode.
+ It won't include the data in other output groups, because those output groups don't support this data. Even though the output group is sharing the encode, MediaLive won't include the data. 

**Handling in other output groups**

You might try to set up accessibility fields in an output that doesn't support accessibility data. If you're not implementing encode sharing with a CMAF Ingest or Microsoft Smooth output group, you will get an error message when you save the channel. 

## Specifying data in an HLS or MediaPackage output


You can set up the captions encode to include accessibility data when you create the encode, as described in [Create embedded or object captions encodes](output-embedded-and-more.md).

In the output that has the captions encode that you want to set up, in **Accessibility**, choose **IMPLEMENTS\$1ACCESSIBILITY\$1FEATURES**.

MediaLive assigns accessibility captions a unique attribute in the EXT-X-MEDIA tag of the HLS manifest:

`CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound"`

Here is an example of the EXT-X-MEDIA tag with the accessibility caption attribute:

`#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="captions-group",NAME="accessibility-captions1",LANGUAGE="eng", CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound",AUTOSELECT=YES,DEFAULT=YES,URI="caption-accessibility-eng.m3u8"`

### Handling of accessibility data in HLS or MediaPackage output groups


The **Accessibility** field appears for all output group types, including types that don't support this data. 

**Note**  
When you set up audio encodes and you plan to include accessibility data, proceed as follows. First create the audio encodes in the HLS and/or MediaPackage output groups, and set up the accessibility data. Then create the audio encodes in the other output groups.

**Handling in supported output groups**

If you aren't implementing shared audio encodes, MediaLive includes the data only in the audio outputs of the HLS and MediaPackage output groups that you set up for audio accessibility data. 

**Handling in shared encodes**

You might plan to share captions encodes among several output groups. For example, you might share a captions codec among one HLS output group and other output groups. 

If you set up accessibility data in a shared captions encode, MediaLive will handle the data as follows:
+ It will include the data in the HLS and MediaPackage output groups that share the encode.
+ It won't include the data in other output groups, because those output groups don't support this data. Even though the output group is sharing the encode, MediaLive won't include the data. 

**Handling in other output groups**

You might try to set up **Accessibility** in an output that doesn't support accessibility data. If you're not implementing encode sharing with an HLS or MediaPackage output group, you will get an error message when you save the channel. 

# Details for specific output formats


The following sections provide information that applies only to specific captions formats.

Topics

# Font styles for Burn-in or DVB-Sub


This section applies if you are [setting up Burn-in or DVB-Sub captions](output-embedded-and-more.md) in a MediaLive channel. You might decide to specify the look of the captions. The following rule applies.

If you are using the same captions source in several outputs and all those outputs use the same format, then you must set up the font style information identically in each output. If you don't, you get an error when you save the channel. For example, you have an Archive output that includes DVB-Sub captions converted from captions selector "embedded". And you have a UDP output that also includes DVB-Sub captions converted from the same captions selector. 

Note that you must set up the font style information separately in each output. But you must enter the same information in each output. 

For example, output A might use **Captions Selector 1** with the **Destination Type** set to **Burn-in**. And output B might also use **Captions Selector 1** with the **Destination Type** set to **Burn-in**. You set the font information once in output 1 and again in output 2. But you must set up all the font information identically in both outputs.

# PIDs for ARIB


This section applies if you are [setting up ARIB captions](output-embedded-and-more.md) in an  output group that supports a transport stream. For example, UDP or SRT. You must specify the output PID.
+ In the relevant output group, choose the output that has the ARIB captions.
+ For **PID settings**, complete **ARIB captions PID control **and **ARIB captions PID** as shown in the following table.


|  ARIB Captions PID Control  |  ARIB Captions PID  |  Result  | 
| --- | --- | --- | 
|  Auto  |  Ignore  |  A PID is automatically assigned during encoding. This value could be any number.  | 
|  Use Configured  |  Enter a decimal or hexadecimal  |  This PID is used for the captions.  | 

# PIDs for DVB-Sub


This section applies if you are [setting up DVB-Sub captions](output-embedded-and-more.md) in an output group that supports a transport stream. For example, UDP or SRT. You must specify the output PID.
+ In the relevant UDP output group, choose the output that has the DVB-Sub captions.
+ For **PID settings**, in **DVB-Sub PIDs**, enter the PID for the DVB-Sub captions in this output. Or keep the default.

# PIDs for Teletext


This section applies if you are [setting up Teletext captions](output-embedded-and-more.md) in an output group that supports a transport stream. For example, UDP or SRT. You must specify the output PID.
+ In the relevant UDP output group, choose the output that has the Teletext captions.
+ For **PID settings**, in **DVB Teletext PID**, enter the PID for the Teletext captions in this output. Or keep the default.

# Language information in HLS manifests


This section applies if you are [setting up captions in an HLS output group](output-embedded-and-more.md) in a MediaLive channel. You must include captions language information in the manifest.

If the captions are embedded captions and the output is HLS, you must include captions language information in the manifest. If you don't include this information, the downstream player won't have information about the embedded captions. To include language information in the manifest: 

1. In the HLS output group in Output groups, go to the **Captions** section. In **Captions language setting**, choose **Insert**. Choosing this option inserts lines in the manifest for each embedded captions language. It inserts as many lines as the mappings that you will add in the next step. 
**Note**  
This **Captions** section is in the output group. Don't confuse this section with the the captions encode sections in the individual outputs.

1. Still in the HLS output group, for **HLS settings**, in **Captions language mappings**, choose **Add captions language mappings**.

1. Choose **Add captions language mappings** again to add more mapping groups, one for each embedded captions asset, to a maximum of four groups. For example, if the output embedded languages contain English, French, and Spanish, you need three mapping groups.

1. Complete each mapping group to identify the CC (caption channel) number and its language. Specify the language as a three-letter ISO language code, as per ISO 639-2. For example, if captions channel 1 is French, then set up the three fields with "1", "fre", and "French". 

   The order in which you enter the languages must match the order of the captions in the source. For example, if the captions are in the order French, then English, then Spanish, then Portuguese, then set up CC1 as French, CC2 as English, and so on. If you don't order them correctly, the captions in the manifest will be tagged with the wrong languages.

# Font styles for EBU-TT-D


This section applies if you are [setting up EBU-TT-D captions](output-sidecar-and-smptett-mss.md) from source captions that are embedded or Teletext captions. You can optionally specify some of the font style information. 

An EBU-TT-D caption encode consists of an XML file that the downstream system reads and processes. This XML file includes a section for font style information. You can specify some of this information.

1. In the output that has the EBU-TT-D captions, display the section for the captions.

1. Complete these fields. For details about a field on the MediaLive console, choose the **Info** link next to the field.
   + **Style control**
   + **Fill line gap**
   + **Font family**

This setup results in one of the following options:

The XML file for the captions includes the following style information:


| Style information | Value in XML file for Include option | Value in XML file for Exclude option | 
| --- | --- | --- | 
| Font style information (position, alignment, italics, and so on) | Set to match the source captions. | Left blank. | 
| Font color and background color | Set to match the source captions. | Set to white font and black background. | 
| Font size  | Set to 100%. | Set to 100%. | 
| Font family | Set to the value that you specified in Font family. | Set to monospaced. | 
| Line gap  | Set up to match the value that you specified in Fill line gap.  | Set up to leave the gap unfilled. | 

# Font styles for TTML


This section applies if you are [setting up TTML captions](output-sidecar-and-smptett-mss.md) from source captions are embedded or Teletext captions. You can optionally specify some of the font style information. 

1. In the output that has the TTML captions, display the section for the captions. 

1. Set **Style control** to **Passthrough** or **Use\$1configured**.

   Note that when **User\$1configured** is selected, there are actually no fields that you can configure.

The XML file for the captions will include the following style information:


| Style information | Value in XML file for Passthrough option | Value in XML file for User-configured option | 
| --- | --- | --- | 
| Font style information (position, alignment, italics, and so on) | Set to match the source captions. | Left blank. | 
| Font color and background color | Set to match the source captions. | Set to white font and black background. | 
| Font size  | Match size of source captions, if specified. Otherwise, set to 80% of the available height available for captions. | Left blank. | 
| Font family | Match family of source captions, if specified. Otherwise, set to monospaceSansSerif. | Left blank. | 
| Line gap  | Set to leave the line gap unfilled. | Set to leave the gap unfilled. | 

# Font styles for WebVTT


This section applies if you are [setting up a MediaLive channel with WebVTT captions](output-sidecar-and-smptett-mss.md) from source captions that are embedded or Teletext captions. You can optionally pass through some of the style information.

1. In the output that has the WebVTT captions, display the section for the captions. 

1. Set **Style control**:
   + **No\$1Style\$1Data**: Includes only text and timestamp information for the caption encode. 
   + **Passthrough**: Passes through position and color style data from the source, and includes the text and timestamp information. 