Configuring a Live encoding service is a 3-step procedure:

1. [Step #1: Create a Live encoding service](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#step-1-create-a-live-encoding-service).
2. [Step #2: Configure the Live Encoding service](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#step-2-configure-the-live-encoding-service)
3. [Step #3: Assign a server to run the service](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#step-3-assign-a-server-to-run-the-service).

## Step #1: Create a Live encoding service

Select **Services** > **Add service** > **Live encoding**. The service **General** tab is displayed.

## Step #2: Configure the Live Encoding service

To configure Live Encoder, follow these steps:

1. [Configure service general parameters](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#configure-service-general-parameters).
2. [Configure input parameters](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#configure-input-parameters).
3. [Configure encoding parameters](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#configure-encoding-parameters).
4. [Configure output parameters](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#configure-output-parameters).

### Configure service general parameters

1. From the **General** tab, enter a service name, in our example, **st2110-eas**.

2. Enter the name of the **ESAM network interface**, in our example, we are using the management interface, **eth0**.

3. Select the **Activate** checkbox to enable the **Automation** features then configure the parameters:

   <table>
     <thead>
       <tr>
         <th style="text-align: left">Parameter</th>
         <th style="text-align: left">Value</th>
         <th style="text-align: left">Description</th>
       </tr>
     </thead>
     <tbody>
       <tr>
         <td style="text-align: left">Interface Type</td>
         <td style="text-align: left">ESAM</td>
         <td style="text-align: left">Protocol used with automation system.</td>
       </tr>
       <tr>
         <td style="text-align: left">POIS URL</td>
         <td style="text-align: left">Use the <strong>ESAM end point</strong> from the Prisma Stream Conditioning service.</td>
         <td style="text-align: left">Live Encoder sends status to this URL. Its path is <code>/api/esam/streamConditionings/&lt;ENDPOINT_ID&gt;</code>. Use the endpoint ID from <strong>Connections</strong> and the address, protocol, and port for your Prisma Controller.</td>
       </tr>
       <tr>
         <td style="text-align: left">POIS network name</td>
         <td style="text-align: left">st2110-eas</td>
         <td style="text-align: left">ID shared with the POIS for the current channel.<br>Same as the <strong>Network name</strong> in <a href="/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/stream-conditioning-configuration"><strong>Stream Conditioning</strong> &gt; <strong>Connections</strong></a>.</td>
       </tr>
       <tr>
         <td style="text-align: left">POIS zone identity</td>
         <td style="text-align: left">Zone1</td>
         <td style="text-align: left">The area ID for this channel distribution. Commonly used for regionalization.<br>Same as the <strong>Zone identity</strong> in <a href="/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/stream-conditioning-configuration"><strong>Stream Conditioning</strong> &gt; <strong>Connections</strong></a>.</td>
       </tr>
       <tr>
         <td style="text-align: left">Assets directory</td>
         <td style="text-align: left">(Leave empty)</td>
         <td style="text-align: left">You can specify the directory where assets are stored. Must be an absolute directory path (starting by "/"). For logo and blackout files, an http url is also possible.</td>
       </tr>
     </tbody>
   </table>

### Configure input parameters

1. Open the **Input** tab to configure input according to your network configuration.

2. Configure the **General parameters**: select **MediaComposer** for input **Type**.

3. Configure the **Live source management** parameters:

   <table>
     <thead>
       <tr>
         <th style="text-align: left">Parameter</th>
         <th style="text-align: left">Value</th>
         <th style="text-align: left">Description</th>
       </tr>
     </thead>
     <tbody>
       <tr>
         <td style="text-align: left">Default service ID</td>
         <td style="text-align: left">st2110-eas</td>
         <td style="text-align: left">ID of the live content that will be used at the start of the service. You can either:<br> - select an existing ID. If required, this ID can be directly modified via the <code>Edit</code> icon button.<br> - or create a new ID: either immediately by clicking the <strong>+</strong> button, or later from the <strong>Settings</strong> &gt; <strong>Live service lineup</strong> left-side menu panel.<br><strong>Note:</strong> IDs are defined in the <a href="/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/lineup">lineup configuration file</a>.</td>
       </tr>
       <tr>
         <td style="text-align: left">Default frame rate</td>
         <td style="text-align: left">50p</td>
         <td style="text-align: left">Default frame rate used when live input is not yet detected.</td>
       </tr>
     </tbody>
   </table>

4. Configure the **File source management** parameters:

   <table>
     <thead>
       <tr>
         <th style="text-align: left">Parameter</th>
         <th style="text-align: left">Value</th>
         <th style="text-align: left">Description</th>
       </tr>
     </thead>
     <tbody>
       <tr>
         <td style="text-align: left">Auto Return to Live</td>
         <td style="text-align: left">Select this checkbox.</td>
         <td style="text-align: left">If checked, returns to live at end of the offline source playlist.<br><strong>Note:</strong> Unused in Switch to Live use case.</td>
       </tr>
       <tr>
         <td style="text-align: left">Return to Live on error</td>
         <td style="text-align: left">Select this checkbox.</td>
         <td style="text-align: left">If checked, returns to live if offline source playlist cannot be loaded.<br><strong>Note:</strong> Unused in Switch to Live use case.</td>
       </tr>
     </tbody>
   </table>

5. Configure the **Sources**:

   1. Configure the **MPEG-2 TS/UDP** parameters:

      <table>
        <thead>
          <tr>
            <th style="text-align: left">Parameter</th>
            <th style="text-align: left">Value</th>
            <th style="text-align: left">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td style="text-align: left">Input redundancy</td>
            <td style="text-align: left">Active/Passive</td>
            <td style="text-align: left">Choose the redundancy settings. Two modes can be set when two multicast sources (primary and secondary) are available:<br> - In Active/Passive mode, the passive source is idle and does not even join the multicast address or capture UDP packets.<br> - In Active/Active mode, both sources capture in parallel, provide statistics on transport and demux layers, but only one source is fully decoded at any given time.</td>
          </tr>
          <tr>
            <td style="text-align: left">Primary interface</td>
            <td style="text-align: left">eth2</td>
            <td style="text-align: left">Name of the input interface used to capture the input stream.<br><strong>Note:</strong> In our example, we are using the management interface.</td>
          </tr>
          <tr>
            <td style="text-align: left">Secondary interface</td>
            <td style="text-align: left">(Leave empty)</td>
            <td style="text-align: left">Name of the input interface used to capture the input stream (secondary source).<br><strong>Note:</strong> Only necessary in case of Active/Active redundancy.</td>
          </tr>
        </tbody>
      </table>

   2. Select the **Add SMPTE ST 2110 source** button then configure the SMPTE ST 2110 parameters:

      <table>
        <thead>
          <tr>
            <th style="text-align: left">Parameter</th>
            <th style="text-align: left">Value</th>
            <th style="text-align: left">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td style="text-align: left">Input redundancy</td>
            <td style="text-align: left">None</td>
            <td style="text-align: left">Choose the redundancy settings: two modes can be set when two multicast sources (primary and secondary) are available.<br>In active/passive mode, the passive source is idle and does not even join the multicast address or capture UDP packets.<br>In active/active mode, both sources capture in parallel, provide statistics on transport and demux layers, but only one source is fully decoded at any given time.</td>
          </tr>
          <tr>
            <td style="text-align: left">NMOS Enabled</td>
            <td style="text-align: left">Leave unchecked.</td>
            <td style="text-align: left">Enables NMOS for EL service.</td>
          </tr>
          <tr>
            <td style="text-align: left">Primary network interface</td>
            <td style="text-align: left">enp175s0f1</td>
            <td style="text-align: left">Name of the input interface used to capture the input stream.<br><strong>Note:</strong> In our example, we are using the management interface.</td>
          </tr>
        </tbody>
      </table>

6. Configure the **Input streams selection**.

<blockquote data-callout="note"><strong>Note</strong><p>In our example we only have one video and one audio stream.</p></blockquote>

7. Configure the **Out of band stream** to receive information from Prisma.

   <table>
     <thead>
       <tr>
         <th style="text-align: left">Parameter</th>
         <th style="text-align: left">Value</th>
         <th style="text-align: left">Description</th>
       </tr>
     </thead>
     <tbody>
       <tr>
         <td style="text-align: left">Type</td>
         <td style="text-align: left">SCTE-35 OOB</td>
         <td style="text-align: left">Select the type of metadata.</td>
       </tr>
       <tr>
         <td style="text-align: left">Network name</td>
         <td style="text-align: left">st2110-eas</td>
         <td style="text-align: left">Corresponds to the Acquisition Point Identity defined in the ESAM specification.</td>
       </tr>
       <tr>
         <td style="text-align: left">Zone identity</td>
         <td style="text-align: left">Zone1</td>
         <td style="text-align: left">Corresponds to the Zone Identity defined in the ESAM specification.</td>
       </tr>
       <tr>
         <td style="text-align: left">Recover conditioning state if failover</td>
         <td style="text-align: left">Leave to <strong>No</strong></td>
         <td style="text-align: left">Selecting <strong>POIS</strong> enables to keep the conditioning status after an encoder failover by asking to an external system. It requires entering the POIS URL and network interface name.</td>
       </tr>
       <tr>
         <td style="text-align: left">Automation stream</td>
         <td style="text-align: left">Select this checkbox.</td>
         <td style="text-align: left">Activates Live Encoder out-of band interface to communicate with Prisma.</td>
       </tr>
     </tbody>
   </table>

   You should have the configuration for the out-of-band stream.

8. Select **OK**. Review the **Input** tab.

9. Select **Save and continue** to save your changes.

10. Leave the **Media processing** parameters unchanged.

### Configure encoding parameters

1. From the **Encoding** tab, create the following streams:
   - Video stream,
   - Audio stream,
   - Metadata stream.

2. Select **Save and continue** to save your changes.

### Configure output parameters

1. Open the **Output** tab then select **Add an output**.

2. Configure the **General parameters** according to your network configuration, especially check that **GOP signaling** is set to **EBP based** to be compliant with Live Packaging.

3. Leave the **Common MPEG-2 TS parameters** unchanged.

4. Configure the **Output stream** for this service:

   1. Scroll to **Output streams**, then select **Add**.

   2. Configure the output stream:
      - **IP Address:** address to output the stream
      - **Port:** port number to stream on

   3. Select the encodings to include in the output stream:
      - Video encoding for this output stream
      - At least one audio encoding
      - Metadata encoding

   4. Select **OK**.

5. Select **Save and exit** to save the configuration and return to **Services**.

6. Go to [Step #4: Assign a server to run the service](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/live-encoder-configuration#step-3-assign-a-server-to-run-the-service).

## Step #3: Assign a server to run the service

Services require a server to run. Select a server for each service before starting the service.

1. Display services.
2. Select the field in the **Mandatory** column to display available servers.
3. Enter a server name or select a server from the list.
4. Select `Play` icon to start the service.
5. Select `Pie chart` icon to display service details and to monitor the service.
6. Continue to [Create alternate content operations](/traditional-products-and-appliances/how-to/alternate-content/switch-st2110-mpeg2-ts/create-alternate-content-operation).
