

# Creating SRT outputs in caller mode
<a name="creating-srt-caller-output"></a>

This section describes how to create SRT outputs in caller mode, where MediaLive initiates connections to downstream systems.

**Topics**
+ [Coordinate with the downstream system](downstream-system-srt-caller.md)
+ [Create the SRT output in caller mode](creating-srt-caller-output-group.md)
+ [Provide information to the downstream system](srt-caller-info-to-downstream.md)

# Coordinate with the downstream system
<a name="downstream-system-srt-caller"></a>

With an SRT output group, you can create more than one output, in order to deliver the same content to more than one downstream system.

You and the operator of each downstream system must discuss details about the output delivery. With caller mode, MediaLive is the caller and the sender. The downstream system is the listener and the receiver.

1. Decide if you need two destinations for the output: 
   + If the MediaLive channel is a [standard channel](plan-redundancy.md), you need two destinations. 
   + If the MediaLive channel is a single-pipeline channel, you need one destination. 

1. Obtain the IP address and port for each destination. For example, `srt://203.0.113.22:5000` and `srt://203.0.113.88:5001`. 

   Note that if you are delivering to MediaConnect, you can obtain the addresses only after the MediaConnect operator creates the flows. See the last step in this procedure.

1. MediaLive always encrypts the content, therefore you must agree about the following encryption details:
   + The encryption algorithm: AES 128, AES 192, or AES 256.
   + The passphrase that MediaLive and the downstream system will use to create the encryption and decryption keys. The passphrase can be 10 to 79 Unicode characters, which means that spaces are allowed. 

1. Discuss the following with the operator of the downstream system:
   + Tell the downstream system about the latency (in milliseconds) that you plan to configure into MediaLive for packet loss and recovery. Packet recovery is a key feature of SRT. The downstream destination should choose a latency value that is close to the value that you plan to use.

     You will configure the latency in each output, so each downstream system can have a different latency. 
   + MediaLive works without a stream ID. But if you want to include one, or if the downstream system would like to use one, agree on the ID. Maximum 512 UTF-8 characters.

1. If you are delivering to a MediaConnect flow, ask the MediaConnect operator to create their flow now.

   Ask the operator to give you the one or two addresses that are in the Inbound IP address field for that flow. These addresses are the destinations for the SRT output. For example, `srt://203.0.113.22:5000` and `srt://203.0.113.88:5001`.

# Create the SRT output in caller mode
<a name="creating-srt-caller-output-group"></a>

After you have designed the contents of the output and you have coordinated delivery of the output with the downstream system, you can create the SRT output in caller mode.

1. On the **Create channel** page, under **Output groups**, choose **Add**. 

1. In the **Add output group** section, choose **SRT**, and then choose **Confirm**. More sections appear.

   The form for this output group is broken down into the following sections:
   + **SRT settings**: Features that apply at the output group level, not in individual outputs.
   + **SRT outputs**: Outputs in the output group.
   + **Output > Destinations**: The URL and encryption fields for each output. 
   + **Output > Output settings**: Networking and transport stream settings, and configure individual PIDs.
   + **Output > Stream settings**: Configuration of the video, audio, and captions in each output.

   For information about each section, see the topics listed after this procedure.

1.  After you have finished setting up this output group and its outputs, you can create another output group (of any type), if your plan requires it. Otherwise, go to [Save the channel](creating-a-channel-step9.md)

## SRT settings
<a name="srt-caller-srt-settings"></a>

In the **SRT settings** sections, complete the fields:
+ **Name**: Enter a name for the output group. This name is internal to MediaLive; it doesn't appear in the output. For example, **Sports Game**.
+ **Input loss action**: Choose a value. For details, choose the **Info** link. For detailed information about input loss handling for all output groups in the channel, see [Handling loss of video input](feature-input-loss.md).

## SRT outputs
<a name="srt-caller-srt-outputs"></a>

The **SRT outputs** section shows the single output that is added by default. Choose **Add output** if you want to send the content to more destinations.

In each output, choose the **Settings** link to show three subsections:
+ Destinations. See [Output > Destinations](#srt-caller-destinations).
+ Output settings. See [Output > Output settings](#srt-caller-output-settings)
+ Stream settings: See [Output > Stream settings](srt-streams.md).

## Output > Destinations
<a name="srt-caller-destinations"></a>

In each output, you must specify one destination (for a single-pipeline channel) or two destinations (for a standard channel). You must also configure encryption for each destination. 
+ **Connection mode**: Select **Caller**.
+ Enter the destination URL or URLs, including the port number. You obtained this information when you [discussed your requirements](downstream-system-srt-caller.md) with the downstream system. For example:

  **srt://203.0.113.22:5000**

  **srt://203.0.113.88:5001**
+ Stream ID: Optional.
+ In each destination, select the secret that [you obtained from the operator of Secrets Manager](srt-output-encryption-asm.md). You can select the secret by its ARN or its name.

## Output > Output settings
<a name="srt-caller-output-settings"></a>

Enter a user-friendly name for the output, or leave the default. This name is internal to MediaLive and doesn't appear in the output.

The remainder of this section contains fields that let you configure the following:
+ Network behavior.
+ Characteristics of the transport stream (in the **Container** section).
+ PID values (in the **PID Settings** section). 

  These fields cover the SI/PSI and other data. For each of the SI/PSI PIDs, you can specify a custom value or you can let MediaLive use the default value. 

  For other data, complete the fields as appropriate. With some of these fields, the behavior is different for fields that you leave empty. MediaLive might omit the data from the transport stream. Or MediaLive might use default values.

Change any values as appropriate. For details about a field, choose the **Info** link next to the field in the MediaLive console.

# Provide information to the downstream system
<a name="srt-caller-info-to-downstream"></a>

The downstream system might need the source IP addresses of the one or two MediaLive streams, so that they can allow these addresses to connect to them. If the downstream system is MediaConnect, it definitely needs this information.

**On an AWS Cloud channel**

Read this information if your organization doesn't deploy MediaLive Anywhere.
+ After you have created the channel, select the channel by its name. The channel details appear.

  In the **Destinations** tab, find the **Egress endpoints** section. Copy the one or two IP addresses. There is one set of addresses for the channel, not one set for each output. 
+ Make a note of the IP addresses and label them correctly as pipeline 0 and pipeline 1. Give them to the downstream operator. 

**On a MediaLive Anywhere channel**

Read this information if your channel is a MediaLive Anywhere channel, which means that it is running on an on-premises hardware, not in the AWS Cloud.
+ Obtain the IP address of the Gateway into the network. You might need to speak to the network administrator in your organization. Give this address to the downstream operator.