

# Working with Dolby metadata
Dolby metadata

Audio encoded with a Dolby codec always includes Dolby metadata, as per the ATSC A/52 2012 standard. This Dolby metadata is used by AWS Elemental Live in two ways when the stream is encoded with Dolby codec:
+ It is used to manipulate the audio just before encoding the output.
+ It is included in the metadata for the output stream.

This document describes how to set up an Elemental Live profile or event to use Dolby metadata in these ways.

Dolby metadata is supported in the output only when the audio codec for the output is Dolby Digital (also known as AC3) or Dolby Digital Plus (also known as Enhanced AC3). 

**Topics**
+ [

# Categories of metadata: Delivered and encoder control
](dolby-metadata-categories.md)
+ [

# Source of Elemental Live metadata
](dolby-metadata-source.md)
+ [

# Impact of the metadata on the output audio
](dolby-metadata-impact.md)
+ [

# Combinations of input and output codec
](dolby-metadata-impact-combination-input-output-codec.md)
+ [

# Setting up the profile or event using the web interface
](dolby-metadata-setup.md)
+ [

# Output with the Dolby Digital codec
](dolby-metadata-output-dolby-digital-codec.md)
+ [

# Output with Dolby Digital Plus (EC2, EAC3) codec
](dolby-metadata-output-dolby-digital-plus-codec.md)

# Categories of metadata: Delivered and encoder control
Categories of Metadata

There are two categories of parameters in the Dolby metadata, characterized by how Elemental Live uses it:
+ Delivered: Elemental Live does not read these parameters, so they have no effect on the audio produced by Elemental Live. Instead, they are included as metadata in the output in order to **deliver ** them to the downstream decoder.

  “Delivered” metadata is also called *Consumer* metadata because it is intended to be used by the end consumer’s home decoder.
+ Encoder Control: Elemental Live uses these parameters to manipulate the audio just before encoding the stream and producing the output. They provide a mechanism for Elemental Live to control the transcoding performed by Elemental Live. These parameters are never included in the output metadata.

  “Encoder Control” metadata is also called *Professional* metadata because it is intended to be used by a professional device – in our case Elemental Live. It is never intended for the end consumer's home decoder.

# Source of Elemental Live metadata
Source of metadata

The metadata that Elemental Live emits can come from one of two sources:
+ Metadata that is already in the source. Only audio sources that use a Dolby codec can include this metadata. Different Dolby codecs include different categories of metadata as shown in this table.    
<a name="dolby-metadata-source-table"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/elemental-live/latest/ug/dolby-metadata-source.html)
+ Metadata that is specified by completing metadata fields in the profile or event. You can specify this metadata in any audio whose output codec is a Dolby codec. In other words, you can add it when the audio source is not a Dolby codec as long as the output audio uses a Dolby codec.

  Both categories of metadata can be specified when specifying this source.

You specify the source when setting up the profile or event.

# Impact of the metadata on the output audio
Impact on output audio

Regardless of the source of the metadata, it affects the audio (either by manipulating encoder control or by being included in the output metadata) but only if the output codec is Dolby Digital or Dolby Digital Plus.

# Combinations of input and output codec
Codec combinations

The possible input and output codec combinations (in which at least one codec is a Dolby codec) are as follows. All these combinations support including metadata in the output.


| Input codec | Output codec | 
| --- | --- | 
| Dolby Digital or Dolby Digital Plus | Dolby Digital or Dolby Digital Plus | 
| Dolby Digital | Dolby Digital Passthrough (so Dolby Digital audio is passed through; it is not transcoded) | 
| Dolby Digital Plus | Dolby Digital Passthrough (so Dolby Digital Plus audio is passed through; it is not transcoded) | 
| Mix of Dolby Digital Plus and another codec | Dolby Digital Plus (with the Automatic Passthrough field checked) | 
| Dolby E | Dolby Digital  | 
| Dolby E | Dolby Digital Plus | 
| Dolby E | Dolby E (passthrough ) | 
| A non-Dolby codec | Dolby Digital or Dolby Digital Plus | 

The sample rate when encoding with a Dolby codec is always 48000.

# Setting up the profile or event using the web interface
Setting up

This section describes how to set up the project or event using the web interface. To set up using the REST API, see [Output with the Dolby Digital codec](dolby-metadata-output-dolby-digital-codec.md) and [Output with Dolby Digital Plus (EC2, EAC3) codec](dolby-metadata-output-dolby-digital-plus-codec.md) to map the fields to their XML tags according to the following steps.

1. In the Output > Stream section, click the Audio tab to display the fields for audio.

1. Choose one of these Audio Sources as appropriate and complete the Audio Codec field: Dolby Digital, Dolby Digital Plus or Dolby Digital Pass Through. The fields for metadata appear.

1. Complete the remaining fields for the audio source that you selected. See the following to determine how to achieve the desired effect.

**Dolby Digital codec**  
For Dolby Digital, encoder control fields are circled in blue and delivery fields are circled in red. Note that the LFE Filter field appears only when the Coding Mode is 3/2 mode.  

![\[Audio codec settings interface with Dolby Digital options and highlighted fields.\]](http://docs.aws.amazon.com/elemental-live/latest/ug/images/dolby-metadata-setup-dolby-digital.png)


**Dolby Digital Plus codec**  
Encoder Control fields are circled in blue. Delivery fields are circled in red. Note that the Automatic Pass-through field does not relate to metadata.  
Note that the Surround Mode field appears only when Coding Mode is 2/0.  

![\[Audio codec interface with settings for bitstream, coding, DRC, filters, and surround sound options.\]](http://docs.aws.amazon.com/elemental-live/latest/ug/images/dolby-metadata-setup-dolby-digital-plus.png)


**Dolby Digital Passthrough**  
There are no fields for metadata.

## Use the metadata in the audio source – case 1
Case 1


| Input codec | Output codec | Handling of audio | 
| --- | --- | --- | 
| Dolby Digital or Dolby Digital Plus | Dolby Digital or Dolby Digital Plus | You are transcoding the audio. | 
+ **Metadata Parameters** fields: Complete only Elemental Live Control fields, as required for your workflow.
+ **Follow Input Metadata** field: Check this field after completing the Metadata Parameter fields.

**Result for Metadata**

Elemental Live Control parameters from the profile are applied during transcoding (given that the input does not include these parameters). If a given parameter is not exposed in the profile, a default value is always applied; see [Output with the Dolby Digital codec](dolby-metadata-output-dolby-digital-codec.md) and [Output with Dolby Digital Plus (EC2, EAC3) codec](dolby-metadata-output-dolby-digital-plus-codec.md). 

The Delivery parameters from the input metadata are included in the output.

## Use the metadata in the audio source – case 2
Case 2


| Input codec | Output codec | Handling of audio | 
| --- | --- | --- | 
| Dolby Digital or Dolby Digital Plus | Dolby Digital or Dolby Digital Plus (Passthrough) | You are passing through the audio. | 
+ **Metadata Parameters** fields: Not applicable.
+ **Follow Input Metadata** field: No Encoder Control parameters are applied (because no transcoding occurs).

**Result for Metadata**

The Delivery parameters from the input metadata will be included in the output.

## Use the metadata in the audio source – case 3
Case 3


| Input codec | Output codec | Handling of audio | 
| --- | --- | --- | 
| Mix of Dolby Digital Plus and another codec | Dolby Digital Plus | You are passing through the Dolby Digital Plus audio and transcoding the remainder (Automatic Passthrough field is checked). | 
+ **Metadata Parameters** field: Complete all the parameters.
+ **Follow Input Metadata** field: Check this field after completing the metadata fields.

**Result for Metadata**
+ Elemental Live Control parameters from the profile will be applied when transcoding the non-Dolby Digital Plus audio. 
+ No Encoder Control parameters will be applied when passing through the Dolby Digital Plus audio.
+ The Delivery parameters from the profile will be used when transcoding the non-Dolby Digital Plus audio.
+ The Delivery parameters from the audio source will be used for the passed-through Dolby Digital audio. 

## Use the metadata in the audio source – case 4
Case 4


| Input codec | Output codec | Handling of audio | 
| --- | --- | --- | 
| Dolby E | Dolby Digital or Dolby Digital Plus | You are transcoding the audio. | 
+ **Metadata Parameters** fields: Ignore.
+ **Follow Input Metadata** field: Check.

**Result for Metadata**
+ Elemental Live Control parameters from the input metadata are applied during transcoding. 
+ The Delivery parameters from the input metadata are included in the output.

## Override the metadata with new values – case 5
Case 5


| Input codec | Output codec | Desired effect | 
| --- | --- | --- | 
| Any codec | Dolby Digital or Dolby Digital Plus | To override the metadata in the audio source. | 
+ **Metadata Parameters** field: Complete as desired. 
+ **Follow Input Metadata** field: Leave unchecked.

**Result for metadata**

The values from the profile are used. 
+ With all parameters except Dialnorm, the values from the profile are used. If a given parameter is not exposed in the profile, a default value is always applied; see [Output with the Dolby Digital codec](dolby-metadata-output-dolby-digital-codec.md) and [Output with Dolby Digital Plus (EC2, EAC3) codec](dolby-metadata-output-dolby-digital-plus-codec.md). 
+ With Dialnorm, the value from the profile is used. If the profile has no value and the source is a Dolby file, the value from the input metadata is used. If the profile has no value and the source is *not * a Dolby file, a default value is used; see [Output with the Dolby Digital codec](dolby-metadata-output-dolby-digital-codec.md) and [Output with Dolby Digital Plus (EC2, EAC3) codec](dolby-metadata-output-dolby-digital-plus-codec.md).

Elemental Live Control parameters are applied during transcoding. The Delivery parameters are included in the output.

# Output with the Dolby Digital codec
Output with Dolby Digital


| Named metadata parameters | Category | Field | API tag (at stream\$1assembly\$1audio\$1description\$1ac3\$1settings) | Default | 
| --- | --- | --- | --- | --- | 
| Dialogue Level | D |  Dialnorm    | dialnorm | Not set | 
| Channel Mode | D | Coding Mode | coding\$1mode | 2/0 | 
| LFE Channel | D |  Coding Mode Coding Mode set to “3/2mode with LFE” means LFE is enabled. All other options mean LFE is disabled.  |   | Disabled | 
| Bitstream Mode | D | Bitstream Mode | bitstream\$1mode | Complete Main | 
| Line Mode Compression | D | No user control |   | Film Std. | 
| RF Mode Compression | D | No user control |   | Film Std. | 
| RF Overmodulation Protection | D | No user control |   |   | 
| Center Downmix Level | D | No user control |   | -3dB | 
| Surround Downmix Level | D | No user control |   | Not indicated | 
| Dolby Surround Mode | D | No user control |   | Disabled | 
| Audio Production Information | D | No user control |   | 0 (does not exist) | 
| Mix Level | D | No user control |   | Not set | 
| Room Type | D | No user control |   | Not set | 
| Copyright Bit | D | No user control |   | 0 | 
| Original Bitstream | D | No user control |   | 0 | 
| Preferred Stereo Downmix | D | No user control |   | Not indicated | 
| Lt/Rt Center Downmix Level | D | No user control |   | -3.0 dB | 
| Lt/Rt Surround Downmix Level | D | No user control |   | -3.0 dB | 
| Lo/Ro Center Downmix Level | D | No user control |   | -3.0 dB | 
| Lo/Ro Surround Downmix Level | D | No user control |   | -3.0 dB | 
| Dolby Surround EX Mode | D | No user control |   | Disabled | 
| A/D Converter Type | D | No user control |   | 0 (standard) | 
| DC Filter | EC | No user control |   | Enabled | 
| LFE Lowpass Filter | EC | When Coding Mode is 3/2, LFE Filter checkbox appears at the far right. | lfe\$1filter | Disabled | 
| Surround 3 dB Attenuation | EC | No user control |   | Enabled | 
| Surround Phase Shift | EC | No user control |   | Disabled | 

# Output with Dolby Digital Plus (EC2, EAC3) codec
Output with Dolby Digital Plus


| Named metadata parameters | Category | Field | API tag (stream\$1assembly\$1 audio\$1description\$1ac3\$1settings) | Default | 
| --- | --- | --- | --- | --- | 
| Dialogue Level | D | Dialnorm | dialnorm | Not set | 
| Channel Mode | D | Coding Mode | coding\$1mode | 3/2 – L,R,C,LS,Rs | 
| LFE Channel | D | When Coding Mode is 7 or 3/2, the LFE checkbox appears three lines below that checkbox. | lfe | Enabled | 
| Bitstream Mode | D | Bitstream Mode | bitstream\$1mode | Complete Main | 
| Line Mode Compression | D | DRC Line Mode Profile | drc\$1line  | Film Std. | 
| RF Mode Compression | D | DRC RF Mode Profile | drc\$1rf  | Film Std. | 
| RF Overmodulation Protection | D | No user control | - |   | 
| Center Downmix Level | D | No user control | - | -3dB | 
| Surround Downmix Level | D | Stereo Downmix | stereo\$1downmix | Not indicated | 
| Dolby Surround Mode | D | No user control | - | Disabled | 
| Audio Production Information | D | No user control | - | 0 (does not exist) | 
| Mix Level | D | No user control | - | Not set | 
| Room Type | D | No user control | - | Note set | 
| Copyright Bit | D | No user control | - | 0 | 
| Original Bitstream | D | No user control | - | 0 | 
| Preferred Stereo Downmix | D | No user control | - | Not indicated | 
| Lt/Rt Center Downmix Level | D | Lt/Rt Center Mix Level | lt\$1rt\$1center\$1mix\$1level | -3.0 dB | 
| Lt/Rt Surround Downmix Level | D | Lt/Rt Surround Mix Level | lt\$1rt\$1surround\$1mix\$1level | -3.0 dB | 
| Lo/Ro Center Downmix Level | D | Lo/Ro Center Mix Level | lo\$1ro\$1center\$1mix\$1level | -3.0 dB | 
| Lo/Ro Surround Downmix Level | D | Lo/Ro Surround Mix Level | lo\$1ro\$1surround\$1mix\$1level | -3.0 dB | 
| Dolby Surround EX Mode | D | Surround EX Mode | surround\$1ex\$1mode | Disabled | 
| A/D Converter Type | D | No user control |   | 0 (standard) | 
| DC Filter | EC | CD Highpass Filter | dc\$1filter | Enabled | 
| LFE Lowpass Filter | EC | LFE Filter | lfe\$1filter | Enabled | 
| Surround 3 dB Attenuation | EC | 3 dB Attenuation | attenuate\$13\$1db | Disabled | 
| Surround Phase Shift | EC | 90-degree Phase Shift | phase\$1shift\$190\$1degree | Enabled | 
| Surround Mode | D | When Coding Mode is 2/0, the Surround Mode checkbox appears. | surround\$1mode | Not indicated | 