

# Working with ID3 metadata
<a name="id3-metadata"></a>



In MediaLive, you can include ID3 metadata in the following types of output groups:
+ Archive
+ CMAF Ingest
+ HLS TS (transport stream)
+ HLS MP4
+ HLS audio-only. This is an [HLS MP4 output group that contains only audio encodes](audio-only.md).
+ MediaPackage
+ UDP. 

The metadata is associated with individual outputs within the output group. You have control over the individual output where you want to include it. Typically, you include the metadata in an output if you know that a downstream system expects the metadata and is capable of interpreting it. You should obtain the requirements for ID3 metadata from a representative of the downstream system.

**Topics**
+ [Different mechanisms for including metadata](id3-enable-result.md)
+ [Passing through ID3 metadata](enable-passthrough-id3.md)
+ [Inserting ID3 timed metadata when creating the MediaLive channel](insert-timed-metadata.md)
+ [Inserting ID3 metadata using the schedule](insert-id3-metadata-via-schedule.md)

# Different mechanisms for including metadata
<a name="id3-enable-result"></a>

You can include metadata in the following ways.
+ Passthrough — Pass through metadata that is already present in the source input. You set up to include this metadata when you create or modify the channel.
+ Timestamp — Insert a timestamp at a regular interval. You set up to include this metadata when you create or modify the channel. See [Inserting ID3 timed metadata when creating the MediaLive channel](insert-timed-metadata.md)
+ One-time insertion — Insert metadata once, at a specified time. You insert this metadata by creating an action in the channel schedule. See [Inserting ID3 metadata using the schedule](insert-id3-metadata-via-schedule.md).
+ Segment insertion — Insert metadata in every segment. You insert this metadata by creating an action in the channel schedule. You insert the action as plain text, using the tag option, or as base64, using the ID3 option. See [Inserting ID3 metadata using the schedule](insert-id3-metadata-via-schedule.md).

The different mechanisms are supported in specific types of output groups. You set up each output group separately. In the following table, read across each row to identify the mechanisms that are supported for the specified type of output group. If a cell is empty, then the output group doesn't support that mechanism.


|  | Passthrough | Timestamp | One-time insertion  | Segment insertion (tag option) | Segment insertion (ID3 option) | 
| --- | --- | --- | --- | --- | --- | 
| Archive | Supported |  |  |  |  | 
| CMAF Ingest | Supported | Supported | Supported |  | Supported | 
| HLS TS | Supported | Supported | Supported | Supported |  | 
| HLS MP4 | Supported | Supported | Supported | Supported |  | 
| HLS audio-only |  | Supported |  | Supported | Supported | 
| MediaPackage | Supported |  | Supported | Supported |  | 
| UDP | Supported | Supported |  |  |  | 

## Scope of the insertion
<a name="id3-insert-scope"></a>

You configure each mechanism separately, and you configure each mechanism at the output level. You can configure one group of outputs with one mechanism, and another group or an overlapping group with another mechanism. Each mechanism as its own scope. In the following table, read across each row to determine the scope of the mechanism.


| Mechanism | First condition | Second condition | Third condition | 
| --- | --- | --- | --- | 
| Passthrough | All the outputs where you have enabled metadata passthrough | And that support passthrough |  | 
| Timestamp | All the outputs where you have enabled metadata passthrough | And that support timestamp | And where you have configured the output group for timestamp | 
| One-time insertion, using the schedule | All the outputs where you have enabled metadata passthrough | And that support one-time insertion |  | 
| Segment insertion with the tag option, using the schedule | All the outputs where you have enabled metadata passthrough | And that support segment tags | And where you have enabled segment tagging in the output group | 
| Segment insertion with the ID3 option, using the schedule | All the outputs where you have enabled metadata passthrough | And that are audio-only outputs | And where you have enabled segment tagging in the output | 

## Frames, ID3 tags, PIDs
<a name="id3-insert-frames-tags-pids"></a>

The metadata is inserted into a specific ID3 frame (for example, TXXX). The frame is inserted in an ID3 tag. The ID3 tag goes in a PID (for a TS output) or the emsg event (for an MP4 output).

**Supported types of ID3 frames**

Different mechanisms support different types of ID3 frames.


| Mechanism | Type of frame | 
| --- | --- | 
| Passthrough | MediaLive passes through any frame type, including PRIV or TDRL.  | 
| Timestamp | You specify the frame type: PRIV or TDRL | 
| One-time insertion, using the schedule | You specify the frame type. All ID3 frame types are supported. | 
| Segment insertion with the tag option, using the schedule |  A TXXX  | 
| Segment insertion with the ID3 option, using the schedule | Any frame type. You specify the frame type. | 

**PID for the ID3 tag**

With TS output groups, all the mechanisms for ID3 metadata insert the ID3 tag in the same PID. The default is 502, but you have the option to override the default in any output group. 

**Topics**
+ [Different mechanisms for including metadata](id3-enable-result.md)
+ [Passing through ID3 metadata](enable-passthrough-id3.md)
+ [Inserting ID3 timed metadata when creating the MediaLive channel](insert-timed-metadata.md)
+ [Inserting ID3 metadata using the schedule](insert-id3-metadata-via-schedule.md)

# Passing through ID3 metadata
<a name="enable-passthrough-id3"></a>

You can set up one or more outputs in a MediaLive channel so that ID3 metadata that is in a source is automatically passed through to the output. Passthrough is supported in the following types of output groups:
+ Archive
+ CMAF Ingest
+ HLS TS
+ HLS MP4
+ MediaPackage
+ UDP. 

Metadata is passed through according to the following rules about the source content.


| Type of frame | Content of the source metadata | Result | 
| --- | --- | --- | 
| Not PRIV and TDRL | Any content | Pass through in enabled outputs. | 
| PRIV and TDRL | The frame doesn't have "Elemental Technologies" included in the wording. | Pass through in enabled outputs. | 
| PRIV and TDRL | The frame does have "Elemental Technologies" included in the wording. | Don't pass through. MediaLive assumes that the timestamp for this metadata has passed, so the metadata isn't valid. | 

**Note**  
All the following procedures assume that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md).

## Passing through ID3 metadata in Archive outputs
<a name="enable-passthrough-archive"></a>

You must configure each output where you want the ID3 metadata to appear.

1. Display the **Create channel** or **Edit channel** page, then select the **Archive** output group.

1. Select the output where you want to include ID3 metadata. Select **Container Settings**, then **PID Settings**. 

1. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

## Passing through ID3 metadata in CMAF Ingest outputs
<a name="enable-passthrough-cmafi"></a>

You must configure each output group where you want the ID3 metadata to appear.

1. Display the **Create channel** or **Edit channel** page and select the CMAF Ingest output group that you want to set up. 

1. Set **ID3 Behavior**: Select **ENABLED**.

1. Go to **Additional Settings**. Set the following field:
   + **Timed Metadata Behavior**: Set to **ENABLED**.

## Passing through ID3 metadata in HLS TS outputs
<a name="enable-passthrough-hls"></a>

Follow this procedure for an HLS output that is set up with a standard container, which holds a transport stream. You must configure each output where you want the ID3 metadata to appear.

1. Display the **Create channel** or **Edit channel** page, then select the **HLS** output group.

1. Select the output where you want to include ID3 metadata. Go to **Container Settings**, then **PID Settings**. 

1. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

## Passing through ID3 metadata in HLS MP4 outputs
<a name="enable-passthrough-hls-mp4"></a>

Follow this procedure for an HLS output that is set up with an fMP4container. You must configure each output where you want the ID3 metadata to appear. The metadata will be included in the emsg event.

1. Display the **Create channel** or **Edit channel** page, then select the **HLS** output group.

1. Select the output where you want to include ID3 metadata. Set the following field:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.

## Passing through ID3 metadata in MediaPackage outputs
<a name="enable-passthrough-mediapackage"></a>

You don't have to perform any setup in MediaPackage outputs. These outputs are automatically set up to pass through any ID3 metadata that is present in the source. 

## Passing through ID3 metadata in UDP outputs
<a name="enable-passthrough-udp"></a>

You must configure each output where you want the ID3 metadata to appear.

1. Display the **Create channel** or **Edit channel** page, then select the **UDP** output group.

1. Select the output where you want to include ID3 metadata. Go to **Network Settings**, then **PID Settings**. 

1. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

# Inserting ID3 timed metadata when creating the MediaLive channel
<a name="insert-timed-metadata"></a>

When you create or edit the channel, you can set up the following types of output groups so that MediaLive inserts a timestamp at a regular interval.
+ CMAF Ingest
+ HLS TS
+ HLS MP4
+ HLS audio-only
+ UDP. 

With this mechanism, MediaLive inserts the first ID3 metadata shortly after the output starts and then at the specified interval for as long as the channel is running. If you restart the channel, the insertion restarts.

**Note**  
This section assumes that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md).

## Inserting in CMAF Ingest outputs
<a name="insert-timed-metadata-cmafi"></a>

Follow this procedure for a CMAF Ingest output group. 

1. Display the **Create channel** or **Edit channel** page, then select the CMAF Ingest output group that you want to set up. 

1. Set **ID3 Behavior**: Select **ENABLED**.

1. Go to **Additional Settings**. Set the following fields:
   + **Timed Metadata Behavior**: Set to **ENABLED**.
   + **Timed Metadata ID3 Frame**: Select **PRIV** or **TDRL**
   + **Timed metadata ID3 period**: Specify the frequency for the metadata, in seconds.

## Inserting in HLS TS outputs
<a name="insert-timed-metadata-hls-ts"></a>

Follow this procedure for an HLS output that is set up with Standard containers (which always contain a transport stream). 

1. Display the **Create channel** or **Edit channel** page, then select the HLS output group that you want to set up. Scroll down and expand the **ID3** section. 

1. Complete the following fields:
   + **Timed metadata ID3 frame**: Select the type of frame for the output — **PRIV** or **TDRL**.

     
   + **Timed metadata ID3 period**: Specify the frequency for the metadata, in seconds.

     We recommend that you set the period to half the segment length. To verify the segment length, in the **HLS output group**, expand the **Manifests and Segments** section, and look at **Segment Length**. 

1. If you haven't already enabled ID3 metadata insertion in the output or outputs, do so now: Select the output where you want to include ID3 metadata. Select **Container Settings**, then **PID Settings**.

1. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

## Inserting in HLS MP4 outputs
<a name="insert-timed-metadata-hls-mp4"></a>

Follow this procedure for an HLS output group that is set up with fMP4 containers. The metadata will be included in the emsg event.

1. Display the **Create channel** or **Edit channel** page, then select the HLS output group that you want to set up. Scroll down and expand the **ID3** section. Complete the following fields:
   + **Timed metadata ID3 frame**: Select the type of frame for the output — **PRIV** or **TDRL**.

     
   + **Timed metadata ID3 period**: Specify the frequency for the metadata, in seconds.

     We recommend that you set the period (interval) to half the segment length. To verify the segment length, in the **HLS output group**, expand the **Manifests and Segments** section, and look at **Segment Length**. 

1. If you haven't already enabled ID3 metadata insertion in the output or outputs, do so now: Select the output where you want to include ID3 metadata, and set the following field:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.

## Inserting in HLS audio-only outputs
<a name="insert-timed-metadata-audio-only"></a>

 Follow this procedure for an HLS audio-only output group . The metadata will be included in the emsg event.

1. Display the **Create channel** or **Edit channel** page, then select the HLS output group that you want to set up. Scroll down and expand the **ID3** section. Complete the following fields:
   + **Timed metadata ID3 frame**: Select the type of frame for the output — **PRIV** or **TDRL**.

     
   + **Timed metadata ID3 period**: Specify the frequency for the metadata, in seconds.

     We recommend that you set the period (interval) to half the segment length. To verify the segment length, in the **HLS output group**, expand the **Manifests and Segments** section, and look at **Segment Length**. 

1. If you haven't already enabled ID3 metadata insertion in the output or outputs, do so now: Select the output where you want to include ID3 metadata. Set the following field:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.

## Inserting in UDP outputs
<a name="insert-timed-metadata-udp"></a>

Follow this procedure for a UDP output.

1. Display the **Create channel** or **Edit channel** page, then select the UDP output group you want to set up. Scroll down to the **UDP settings** section. Complete the following fields:
   + **Timed metadata ID3 frame type**: Select the type of frame for the output — **PRIV** or **TDRL**.

     
   + **Timed metadata ID3 period**: Specify the frequency for the metadata, in seconds.

1. If you haven't already enabled ID3 metadata insertion in the output or outputs, do so now: Select the output where you want to include ID3 metadata. 

1. Go to **Network Settings**, then **PID Settings**. 

1. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

# Inserting ID3 metadata using the schedule
<a name="insert-id3-metadata-via-schedule"></a>

You can create actions in the channel schedule to insert ID3 metadata in one or more outputs. There are two types of ID3 metadata actions:
+ Timed metadata, to insert metadata once, at a specified time. 
+ ID3 segment tag action: To insert metadata in every segment. There are two options for this action — tag option and ID3 option. For more information, see the table below.

## Supported output groups
<a name="insert-id3-metadata-schedule-opg"></a>

The following table specifies which output groups support inserting metadata using the schedule, and which schedule mechanisms each output group supports. Find the mechanism in the first column, then read across the row.


| Mechanism | CMAF Ingest | HLS TS | HLS MP4 | HLS audio-only | MediaPackage | 
| --- | --- | --- | --- | --- | --- | 
| One-time insertion, using the schedule | Supported | Supported | Supported |  | Supported | 
| Segment insertion with the tag option, using the schedule | Supported | Supported | Supported | Supported | Supported | 
| Segment insertion with the ID3 option, using the schedule | Supported |  |  | Supported |  | 

## Comparison of different schedule actions
<a name="insert-id3-metadata-schedule-compare"></a>

This table describes the main differences between the three mechanisms for inserting ID3 metadata using the schedule. Find the mechanism in the first column, then read across the row.


| Mechanism | One time or repeat? | You provide plain text or base64? | Which frame type? | 
| --- | --- | --- | --- | 
| ID3 timed metadata |  One-time At the start time of the action, MediaLive inserts the ID3 metadata in the applicable outputs, as a one-time event.  |  Base64 You provide a fully formed ID3 metadata item (including both a header and a frame, as per the ID3 specification) and encode it as base64.  | A frame type that you specify. | 
| ID3 segment tags that use the tag option | RepeatAt the start time of the action, MediaLive starts inserting ID3 tags in every segment in the applicable outputs. It continues to insert in every segment, typically for the life of the channel. |  Clear text You provide only the value for the TXXX field inside the ID3 tag. You specify this value as clear text.   | A TXXX | 
| ID3 segment tags that use the ID3 option | RepeatAt the start time of the action, MediaLive starts inserting ID3 tags in every segment in the applicable outputs. It continues to insert in every segment, typically for the life of the channel. |  Base64 You provide a fully formed ID3 metadata item (including both a header and a frame, as per the ID3 specification) and encode it as base64.  | A frame type that you specify. | 

## Step 1: Set up for insertion
<a name="insert-id3-metadata-schedule-setup"></a>

Before you can insert ID3 metadata using the schedule, you must enable ID3 metadata insertion in the appropriate output groups.

**Note**  
This section assumes that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md).

### Inserting in CMAF Ingest outputs
<a name="insert-id3-metadata-schedule-cmafi"></a>

1. Display the **Create channel** or **Edit channel** page, then select the CMAF Ingest output group that you want to set up. 

1. Set **ID3 Behavior**: Select **ENABLED**.

### Inserting in HLS TS outputs
<a name="insert-id3-metadata-schedule-hls-ts"></a>

1. Display the **Create channel** or **Edit channel** page, then select the output group where you want to enable ID3 metadata.

1. Complete this step only if you plan to insert segments using the tag option. In the output group section, scroll down and expand the **ID3** section. Complete the following field:
   + **HLS ID3 segment tagging**: Set to **ENABLED**.

1. Select the output where you want to include ID3 metadata. Go to **Container Settings**, then **PID Settings**. Complete the following fields:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.
   + **Timed Metadata PIDs**: Enter the PID where you want to insert the ID3 metadata in this output. Or leave empty to use the default, which is PID 502.

### Inserting in HLS MP4 outputs
<a name="insert-id3-metadata-schedule-hls-mp4"></a>

1. Display the **Create channel** or **Edit channel** page, then select the output group where you want to enable ID3 metadata.

1. Complete this step only if you plan to insert segments using the tag option. In the output group section, scroll down and expand the **ID3** section. Complete the following field:
   + **HLS ID3 segment tagging**: Set to **ENABLED**.

1. Select the output where you want to include ID3 metadata. Set the following field:
   + **Timed Metadata Behavior**: Select **PASSTHROUGH**.

Note that with an MP4 output, the metadata will be inserted in the emsg. You don't need to configure this information.

### Inserting in HLS audio-only outputs
<a name="insert-id3-metadata-schedule-hls-audio"></a>

1. Display the **Create channel** or **Edit channel** page, then select the output group where you want to enable ID3 metadata.

1. In the output group section, scroll down and expand the **ID3** section. Complete the following field:
   + **HLS ID3 segment tagging**: Set to **ENABLED**.

### Inserting in MediaPackage outputs
<a name="insert-id3-metadata-schedule-mediapackage"></a>

You don't need to enable insertion in MediaPackage outputs because ID3 metadata is enabled by default. This default behavior includes insertion of metadata using the schedule. MediaLive inserts the metadata in PID 502.

## Step 2: Create actions in the schedule
<a name="insert-id3-metdata-schedule-step"></a>

After you have enabled ID3 metadata insertion in the appropriate output groups, you can create actions in the schedule. 

You can create actions at any time — before starting the channel or when the channel is running. When the channel is running, MediaLive starts to insert the tag content specified in the action or actions. The same content is inserted in all the outputs where you have enabled insertion.

For more information, see the following:
+ [How ID3 metadata actions work](x-actions-in-schedule-id3.md)
+ [How ID3 segment tag actions work](x-actions-in-schedule-id3-segment-tag.md)