

# Configuring SMPTE 2110 outputs
<a name="output-2110"></a>

You can include one or more SMPTE 2110 outputs in an AWS Elemental Live event. You can optionally configure the output to implement SMPTE 2022-7, so that the output delivers identical content to two destinations, which improves resiliency for the downstream system.

For general information about SMPTE 2110 video content, SMPTE 2022-7, NMOS, and SDP files, see [Working with SMPTE 2110](SMPTE-ST-2110.md).

**Note**  
You can't use AWS Elemental Conductor Live to produce SMPTE 2110 outputs that use NMOS. You can use AWS Elemental Conductor Live to if you're not using NMOS.

**Topics**
+ [Step 1: Get ready](s2110-output-get-ready.md)
+ [Step 2: Design the workflow](s2110-out-design-workflow.md)
+ [Step 3: Create SMPTE 2110 output group](config-output-2110.md)
+ [Step 4: Download and post the SDP file](locate-sdp.md)

# Step 1: Get ready
<a name="s2110-output-get-ready"></a>

Before you set up a SMPTE 2110 output in an event, read the following information:
+ [Setup: Remove bonded interfaces](s2110-setup-bonded-if.md)
+ [Setup: Reserve cores for SMPTE 2110](enable-2110.md)
+ [Setup: Enable precision time protocol (PTP)](enable-ptp.md)

# Step 2: Design the workflow
<a name="s2110-out-design-workflow"></a>

Before you start to create the SMPTE 2110 output group, plan the contents, to make sure that you observe the rules for the number of video, audio, and ancillary data streams that you can include.

**Topics**
+ [Design the video](#2110-output-design-video)
+ [Design the audio](#2110-output-design-audio)
+ [Design the ancillary data](#2110-output-design-anc-data)

## Design the video
<a name="2110-output-design-video"></a>

Decide if you want the output video to be uncompressed or JPEG XS.

The output group can contain only one video output. This Elemental Live *output* represents one SMPTE 2110 *stream*. If you need multiple SMPTE 2110 streams, you must create one SMPTE 2110 output group for each.

## Design the audio
<a name="2110-output-design-audio"></a>

**Note**  
Pay attention to the terminology in this section because there is terminology from SMPTE 2110 and there is terminology from Elemental Live.   
A Elemental Live *output* is a SMPTE 2110 *stream*.   
A Elemental Live *stream* is a SMPTE 2110 *essence*.   
A Elemental Live *stream* contains *encodes*.

1. Decide how many audio outputs you need. This Live *output* represents one SMPTE 2110 *stream*. 

   Follow these guidelines:
   + You need a separate output for each variation of audio codec and bit depth/sample rate combination. For example:
     + One output for PCM audio, and one output for Dolby Digital.
     + One output for Dolby Digital Plus, and one output for Dolby Digital Passthrough.
     + One output for Dolby Digital with a bit depth of 24 and another output for Dolby Digital with a bit depth of 16.

     You don't need separate outputs for different channel configurations (PCM) or coding mode (Dolby Digital codecs). For example, in a PCM output, you can include one encode that is PCM 6-channel and one encode that is PCM 2-channel. 
   + All audio encodes that are in the same output must follow these rules:
     + They must have the same sample rate.
     + They must have the same bit depth.

     Therefore, for example, you need separate outputs if you want to produce one Dolby Digital 5.1 with 24-bit depth and another Dolby Digital 5.1 with 16-bit depth.

1. In each output, decide how many encodes you need. You need one encode for each PCM channel configuration or Dolby Digital coding-mode.

   For example, to include two PCM stereo channels (perhaps one English and one French), you need two encodes. 

   Or to include one Dolby Digital 5.1 and one Dolby Digital stereo pair, you need two encodes.

**Result of these decisions**

You will have a list of outputs, streams, and encodes. For example:
+ One PCM output containing one Elemental Live stream. The stream contains eight 2-channel encodes.
+ One Dolby Digital output containing one Elemental Live stream. The stream contains one encode, for 5.1 audio.

## Design the ancillary data
<a name="2110-output-design-anc-data"></a>

In the ancillary data, you configure the output to include or exclude embedded captions and SCTE 104 messages.

**Embedded captions**

1. If your input includes captions, you can convert those captions to embedded captions and include them in the ancillary data output. For detailed information about setting up captions, see [Setting up for captions](setting-up-for-captions.md).

1. If you decide to include embedded captions, identify the line where you want them to appear in the VANC (vertical ancillary data space) of the video stream. If you aren't sure which line to use, speak to the downstream system.

**SCTE 104 messages**

1. Decide if you want to include ad avail messages in the output. These messages can come from two sources:
   + SCTE 35 or SCTE 104 ad avail messages already present in the event input. When Elemental Live ingests the input, SCTE 104 messages are always converted to SCTE 35 messages. 
   + SCTE 35 messages that you insert when the event is running, using the API.

   In both cases, Elemental Live converts the messages to SCTE 104 messages in the SMPTE 2110 output. For general information about ad avail handling in Elemental Live, see [SCTE-35 and SCTE-104 message processing in Elemental Live](scte-message-processing.md).

1. If you decide to include ad avail messages, identify the line where you want them to appear in the VANC of the video stream.

# Step 3: Create SMPTE 2110 output group
<a name="config-output-2110"></a>

In a SMPTE 2110 output group, you create one output for the single video, for each audio, and for the single (optional) ancillary data stream.

**Topics**
+ [General procedure](#2110-output-general-procedure)
+ [Set up the video stream](#2110-output-video)
+ [Set up the audio stream](#2110-output-audio)
+ [Set up the ancillary data stream](#2110-output-anc-data)

## General procedure
<a name="2110-output-general-procedure"></a>

Follow this procedure to create an SMPTE 2110 output. This procedure applies if your organization uses NMOS IS-04 and IS-05, and if it doesn't.

**Note**  
Pay attention to the terminology in this section because there is terminology from SMPTE 2110 and there is terminology from Elemental Live.   
An Elemental Live *output* is a SMPTE 2110 *stream*.   
A Elemental Live *stream* is a SMPTE 2110 *essence*.   
A Elemental Live *stream* contains *encodes*.

**To configure a SMPTE 2110 output**

To create a SMPTE 2110 output on the web interface, you create one SMPTE 2110 output group that contains one output for video, one output for audio, and (optionally) one output for ancillary data. The video output contains one stream that contains one video. 

1. On the web interface for the event, scroll down to the **Additional Global Configuration** section.

   Open the section and choose **Low Latency Mode**. We recommend that you enable this field for any event that includes SMPTE 2110 outputs.

1. Scroll down to the **Output Groups** section and choose the **SMPTE 2110** tab. 

1. In the output group section, complete the **NMOS Control** field:
   + Check this field if your organization has an NMOS registry.
   + Otherwise, leave the field unchecked.

1. Choose **Add Output** on the far right of the page. A new output section appears, with a reference to one Elemental Live stream. For example, *Stream 1*. Assume that this stream is for video.

1. Choose **Add Output** again for each audio output you want to include. You should have identified the output you need when you [designed the audio output](s2110-out-design-workflow.md#2110-output-design-audio). Each time you add an output, a new output section appears, with a reference to one Elemental Live *stream*. For example, *Stream 2*.

1. Optionally, choose **Add Output** again to create an output for ancillary data. A new output section appears, with a reference to one Elemental Live stream. For example, *Stream 3*. 

   Scroll down to the **Streams** section. There is one Elemental Live stream for each output you created.

1. To set up the video stream (for example, Stream 1), hover over **Audio 1** and click **x**. The stream now contains only a video stream.

1. To set up each audio stream (for example, Stream 2), hover over **Video** and click **x**. The stream now contains only an audio stream. If you scroll back up to the output that references this stream, you'll see that there is now an **Audio Settings** section.

1. To set up the ancillary data stream (for example, Stream 3), hover over **Audio 1** and click **x**. Then click **Caption \$1**. The stream now contains a video stream and a captions stream. If you scroll back up to the output that references this stream, you'll see that there is now an **Ancillary Data Settings** section.

1. To set up the content of the video, audio, and ancillary data streams, see the sections [Set up the video stream](#2110-output-video), [Set up the audio stream](#2110-output-audio), and [Set up the ancillary data stream](#2110-output-anc-data).

1. When you save the event, Elemental Live creates an SDP file for each output you included in the output group. The files are stored on your appliance at this location:

   `http://locahost/<filename>`

   For information about the file name, see [Step 4: Download and post the SDP file](locate-sdp.md).

1. Follow the appropriate step with the SDP files:
   + If you enabled NMOS in the output group, Elemental Live automatically sends the SDP file to your registry, and your registry processes the information in each file. You don't need to do anything with the files.
   + If you didn't enable NMOS, you can download this file so that you can make it available to the downstream system for this output. See [Step 4: Download and post the SDP file](locate-sdp.md).

     You must put the files on an HTTP server that is accessible to the downstream system.

## Set up the video stream
<a name="2110-output-video"></a>

Follow this procedure to set up the video stream.

**To set up the video stream**

1. Complete the **Outputs** section:
   + **RTP Payload Type** – Enter a number for the type. For example, `96` for a video stream. If you aren't sure what number to enter, speak to the administrator of the downstream system.

     This number will appear in the **m= line** in the SDP file.
   + **Primary Destination** and **Secondary Destination** – These fields appear only if the **NMOS Control** field is unchecked. Complete the two fields in one of these ways:
     + If you are not implementing seamless protection switching, complete only the primary destination. 
     + If you are implementing seamless protection switching, complete both destinations fields, one interface for the primary stream, the other for the secondary stream.

     Enter the unicast or multicast address to deliver the video stream to. For example:

     **rtp://239.x.x.x:5000**

     This information will appear in the SDP file.
   + **Interface** – complete these two fields in one of these ways:
     + If you are not implementing seamless protection switching, complete only **Interface**.
     + If you are implementing seamless protection switching, complete both **Interface** fields, one interface for the primary stream, the other for the secondary stream.

1. Complete the **Streams** section for the video (for example, Stream 1):
   + **Video Codec** – Choose the codec that you identified when you [designed the video](s2110-out-design-workflow.md#2110-output-design-video).
   + **Interlace Mode** – Choose **Progressive** or **Interlaced**.
   + **FourCC** (Uncompressed only) – Choose **s210 (10-bit 4:2:2 packed)**.
   + **Compression Ratio** (JPEG XS only) – Choose the compression that the downstream system has requested. 
   + **Resolution - Width** – Enter a value that meets one of the following conditions:
     + A value between 352 and 1152. The value must be divisible by 4. 
     + A value between 1160 and 2048. The value must be divisible by 8. 
     + A value between 2054 and 4096. The value must be divisible by 16.
   + **Resolution - Height** – Enter a value that meets one of the following conditions:
     + If **Interlace Mode** is Progressive – a value of 240 or more. The value must be divisible by 4.

       If **Interlace Mode** is Interlaced – a value of 240 or more. The value must be divisible by 8.
   + Complete other fields according to your preference.

   Many of the fields in this section appear in the `a=ftmp` line in the SDP file.

## Set up the audio stream
<a name="2110-output-audio"></a>

**To set up the audio stream**

Follow this procedure to set up each audio stream.

1. Complete the **Outputs** section in the same way that you completed the section for the video. Make sure that you enter an RTP payload type that is unique in this SMPTE 2110 output group.

   For information about the packet time, see the information after this procedure. 

1. Add more encodes to each stream, according to [your design](s2110-out-design-workflow.md#2110-output-design-audio). For example, if your design includes an output that must contain four stereo PCM channels, you need four encodes in the stream.

1. Complete the **Streams** section for the video (for example, Stream 1):
   + **Audio Source** – Choose the input selector that identifies the source for this audio. You previously set up this selector in the Input section of the event.
   + **Audio Codec** – Choose the codec you identified for this stream when you designed the audio. Choose the same audio codec for all the encodes in this Elemental Live stream.
   + **Channels** (PCM only) – Set the number of channels you identified for this audio when you designed the audio.
   + **Coding Mode** (Dolby Digital and Dolby Digital Plus) – Choose the mode you identified for this audio when you designed the audio.
   + **Sample Rate** (PCM only) – See the information after this procedure.
   + **Bit Depth** – Choose a value. Choose the same value for all the encodes in this Elemental Live stream.
   + Complete other fields according to your preference. For Dolby Digital and Dolby Digital Plus, some of the remaining fields relate to Dolby metadata. For more information, see [Working with Dolby metadata](dolby-metadata.md).

   Many of the fields in this section appear in the `a=ftmp` line in the SDP file.

**Setting the sample rate and packet rate for PCM audio**

Complete the **Sample Packet** (in the stream section) and the **Packet Time** field (in the output section). Follow this procedure:
+ Identify the number of audio channels in all the encodes in this Elemental Live stream.
+ Choose a sample rate and a packet time that both fall within the limits for the number of channels, as specified in the following table. 
+ Set the same sample rate for every encode in the Elemental Live stream.


| Number of audio channels  | Maximum sample rate (Hz) | Maximum packet time (microseconds) | 
| --- | --- | --- | 
| Up to 4  | 96,000 | 1000 | 
| Up to 8  | 48,000 | 1000 | 
| Up to 32  | 96,000 | 125 | 
| Up to 64  | 48,000 | 125 | 

**Setting the packet rate for any of the Dolby codecs**

Complete the **Packet Time** field (in the output section). Follow this procedure:
+ Identify the number of audio tracks in all the encodes in this Elemental Live stream.
+ Choose a packet time that falls within the limits for the number of tracks, as specified in the following table. 


| Number of audio tracks  | Packet time (microseconds) | 
| --- | --- | 
| Up to 3 | 125 or 1000. We recommend 1000 | 
| Up to 24 | 125 | 

Note that the sample rate is always 48,000 Hz.

## Set up the ancillary data stream
<a name="2110-output-anc-data"></a>

**To set up the ancillary data stream**

You set up the ancillary data stream to include embedded captions. You can optionally configure how you want to handle ad avails. These ad avails might be in the source and/or might be ad avails that you insert using the API.

1. Complete the **Outputs** section in the same way that you completed the section for the video. Make sure you enter an RTP payload type that is unique in this SMPTE 2110 output group.

1. Complete the video stream for this output so that it is identical to the video that you set up in the video output. In our example, the video stream in this ancillary data output is stream 3, and the video in the video output is stream 1. 

1. If you want to pass through ad avails, complete these fields in the **Outputs** section:
   + **Enable SCTE 35 Passthrough** – Set the check box to checked. 
   + **SCTE 104 messages line number** – Enter the line number that you identified when you [designed the ancillary data](s2110-out-design-workflow.md#2110-output-design-anc-data).

1. If you want include embedded captions in the output, follow this procedure:
   + Make sure that you have set up the event so that the captions in the input are converted to embedded captions in the output (or that the embedded source captions are passed through). For information about setting up captions, see [Setting up for captions](setting-up-for-captions.md).
   + In the **Outputs **section for the ancillary data, for **CEA-608-E captions line number**, enter the line number that you identified when you [designed the ancillary data](s2110-out-design-workflow.md#2110-output-design-anc-data).

# Step 4: Download and post the SDP file
<a name="locate-sdp"></a>

If your organization doesn't use NMOS, you must make sure that the downstream system (the SMPTE 2110 receiver) can access them:
+ If the location is accessible and doesn't need user credentials, provide the downstream system operator with the full path so that they can download the SDP files.
+ If the location where the files are stored isn't accessible from the public internet, you must download the files and put them on a location that is accessible.

If your organization uses NMOS, skip this step.

**Location and syntax of the files**

Elemental Live puts the SDP files on the HTTP root folder: 

`/opt/elemental_se/web/public/`

The files are named as follows:

`SmpteSt2110Output.LiveEvent_<event ID>.OutputGroup_<output group>_2110-<ID>_<media>_<unique number on node>.sdp`

For example:

`SmpteSt2110Output.LiveEvent_123.OutputGroup_curling_smpte_2110.2110-20_video_473.sdp`

The key pieces of information are:
+ `123` – The number for this event, unique on this Elemental Live node.
+ `curling` – The name you assigned to this output group.
+ `2110-20_video` – Identifies this file type. In this example, it's an SDP file for uncompressed video.
+ `473` – A number that is unique for this Elemental Live node.

**To locate and download the SMPTE 2110 SDP file**

1. From your output, select **View Logs**.

1. Select the eme log to view its contents.

1. Within the eme log, search for `Writing SDP file to`. You will find a line for the video, and a line for the audio. Copy the portions that follow `/opt/elemental_se/web/public/` for each line. These are your SDP files. For example:

   `SmpteSt2110Output.LiveEvent_123.OutputGroup_curling_smpte_2110.2110-20_video_473.sdp`

1. If you don't know the IP address of your Elemental Live appliance, find it now. In the Elemental Live web interface, choose **Settings**. (Don't choose **Input Devices** or **Routers** from the submenu).

   On the **Settings **page, choose the **Network** tab, then choose the **Current Settings** tab. Make a note of the IP addresses in the **Domain Name Servers** section.

1. Download the file using a suitable tool to connect from a computer that is on your network to the Elemental Live appliance. For example:
   + On a PC, use Windows Share protocol. Connect to:

     `\\<IP address>\opt\elemental_se\web\public\`
   + On a Mac, use Samba. Connect to:

     `smb://<IP address>/opt/elemental_se/web/public/`

1. Download the files. Then put the files on an HTTP server that you know the receiver can access.