# Publish via SRT

`SRT` (Secure Reliable Transport) is a protocol designed to deliver stable live streams even in network conditions where quality is hard to predict. Because it can maintain relatively robust contribution quality in segments with packet loss or jitter, it is especially useful for scenarios with high network variability, such as on-site production or long-distance transmission.

You can publish a stream to OvenMediaEngine Enterprise on AWS via `SRT`. For live contribution, the **stream is received in an MPEG-2 TS container**, which is more flexible than RTMP in carrying various codecs. If needed, you can also leverage a simulcast setup.

This guide walks you through the SRT publishing procedure and the basic verification steps after publishing, in order.

<table><thead><tr><th width="151">Item</th><th>Supported</th></tr></thead><tbody><tr><td>Container</td><td>MPEG-2 TS</td></tr><tr><td>Transport</td><td>SRT</td></tr><tr><td>Codec</td><td>H.264, H.265, AAC</td></tr></tbody></table>

## Start Publishing an SRT Stream <a href="#start-publishing-an-srt-stream" id="start-publishing-an-srt-stream"></a>

In this example, we use OBS Studio, one of the most commonly used live encoder applications.

{% stepper %}
{% step %}

### Publish with a Live Encoder (OBS Studio) <a href="#streaming-with-a-live-encoder" id="streaming-with-a-live-encoder"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/bNiAvgzgbPB96n9FrSRV/image.png" alt=""><figcaption></figcaption></figure>

1. Launch Open Broadcaster Software (OBS) Studio.
   * If OBS Studio is not installed, download it from the official page (<https://obsproject.com/download>).
2. Add a media source you want to publish (e.g., Media Source, Camera, or Screen Capture).
3. Click <mark style="color:yellow;">\[Settings]</mark> in the bottom-right corner of OBS.
   {% endstep %}

{% step %}

### Configure Streaming in OBS <a href="#configure-streaming-in-obs" id="configure-streaming-in-obs"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/1BOhJaKeqynZiuJNyZOr/image.png" alt=""><figcaption></figcaption></figure>

4. On the left side of the Settings window, select the <mark style="color:yellow;">\[Stream]</mark> tab.
5. Under <mark style="color:yellow;">\[Service]</mark>, select <mark style="color:$primary;">**\[Custom]**</mark>, then enter the SRT Ingress URL in the <mark style="color:yellow;">Server</mark> field.
   * SRT URL Format: <mark style="color:$primary;">**`srt://`**</mark>`{Public IPv4 or Domain}:`<mark style="color:$primary;">**`9999?streamid=`**</mark>`{host}/{app}/{stream}`

{% hint style="info" %}
If you are not sure about the SRT Input URL pattern, create a \[Managed Stream] in the Web Console and check it in the <mark style="color:yellow;">\[URLs]</mark> tab.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/3b7AZS5g10RG6BdObhSX/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
6\. Next, in the <mark style="color:yellow;">\[Output]</mark> tab, we recommend setting the <mark style="color:$primary;">**`Keyframe Interval`**</mark> to <mark style="color:$primary;">**1-second**</mark> and <mark style="color:$primary;">**`B-frames`**</mark> to <mark style="color:$primary;">**0**</mark> for smooth sub-second latency and low-latency streaming.

{% hint style="success" %}
Setting <mark style="color:yellow;">B-frames</mark> to <mark style="color:yellow;">0</mark> (`bframes=0`) helps reduce playback stuttering in `WebRTC` output. The example above shows the configuration when using the `x264` encoder. Depending on the selected encoder, available options and layout may vary. When using `WebRTC` as the output, <mark style="color:yellow;">setting B-frames to 0 is recommended</mark>.
{% endhint %}

7. Adjust additional settings as needed in \[Audio], \[Video], and other tabs, then click <mark style="color:yellow;">\[OK]</mark> to return to the main OBS window.
8. When all settings are ready, click <mark style="color:yellow;">\[Start Streaming]</mark> to begin publishing.
   {% endstep %}

{% step %}

### Check Stream Status and Playback in the Web Console <a href="#check-stream-status-and-playback-in-the-web-console" id="check-stream-status-and-playback-in-the-web-console"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/J0pOzVoeppD4mcYljzkQ/image.png" alt=""><figcaption></figcaption></figure>

9. In the <mark style="color:yellow;">Web Console</mark>, check whether the stream published from OBS or the OvenPlayer Demo appears in the list.
   {% endstep %}
   {% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/aws-marketplace/publish-streams/publish-via-srt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
