# Publish via RTSP Pull (CCTV)

If you need to convert your `RTSP`-based videos, such as CCTV, IP camera, etc., into real-time streams in your service, you can use the RTSP Pull feature in OvenMediaEngine Enterprise on AWS.

With this approach, OvenMediaEngine **connects directly to an external RTSP (media source) and pulls the video (pulling)**, allowing you to build a streaming environment easily without any additional streaming tools.

<table><thead><tr><th width="151">Item</th><th>Supported</th></tr></thead><tbody><tr><td>Container</td><td>RTP</td></tr><tr><td>Transport</td><td>UDP / TCP</td></tr><tr><td>Codec</td><td>H.264, H.265, Opus, AAC</td></tr></tbody></table>

## Start Publishing an RTSP Pull Stream <a href="#start-publishing-an-rtsp-pull-stream" id="start-publishing-an-rtsp-pull-stream"></a>

{% stepper %}
{% step %}

### Create an RTSP Pull Stream and enter information <a href="#create-an-rtsp-pull-stream" id="create-an-rtsp-pull-stream"></a>

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

1. Stream List on the Web Console (main page), click <mark style="color:yellow;">\[+]</mark> in the page, then select <mark style="color:yellow;">\[Add RTSP pull stream]</mark> from the menu.

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

2. Enter a <mark style="color:yellow;">\[Stream Name]</mark> that is easy to identify, and the <mark style="color:yellow;">\[RTSP URL]</mark> to connect to.

{% hint style="success" %}
A typical RTSP URL format is `rtsp://{ID}:{Password}@{IP}:{Port}/path`, but formats may vary by product. Please check the RTSP URL format recommended by your vendor.
{% endhint %}
{% endstep %}

{% step %}

### Ensuring stability with Advanced Settings (Optional) <a href="#ensuring-stability-with-advanced-settings" id="ensuring-stability-with-advanced-settings"></a>

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

* You can additionally use <mark style="color:yellow;">\[Advanced Settings]</mark> to configure streaming behavior optimized for your network environment.

{% hint style="info" %}
If you are using RTSP Pull Streams for the first time, we recommend creating the stream using the default system settings. If further optimization is needed for your environment later, update the stream after adjusting the relevant options.
{% endhint %}

<table><thead><tr><th width="154" align="center">Value</th><th width="159.5555419921875" align="center">Input Range</th><th>Description</th></tr></thead><tbody><tr><td align="center">Create persistent stream</td><td align="center"><p>Yes | No</p><ul><li><mark style="color:yellow;">Default: No</mark></li></ul></td><td><p>Keeps the stream persistent</p><ul><li><mark style="color:yellow;">If set to <code>Yes</code>, the stream will not be deleted automatically after creation and will remain until an explicit <code>Delete</code> request is made.</mark></li></ul></td></tr><tr><td align="center">No input failover timeout (ms)</td><td align="center"><p>0~</p><ul><li><mark style="color:yellow;">Default: 3000</mark></li></ul></td><td><p>If no media source is received as input (ingress) for the specified period (milliseconds), the stream is deleted.</p><ul><li><mark style="color:yellow;">This rule is ignored if <code>Create persistent stream</code> is set to <code>Yes</code>.</mark></li></ul></td></tr><tr><td align="center">Unused streams deletion timeout (ms)</td><td align="center"><p>0~</p><ul><li><mark style="color:yellow;">Default: 60000</mark></li></ul></td><td><p>If there is no output (egress) for the specified period (milliseconds), the stream is deleted.</p><ul><li><mark style="color:yellow;">This rule is ignored if <code>Create persistent stream</code> is set to <code>Yes</code>.</mark></li></ul></td></tr><tr><td align="center">Ignore RTCP SR timestamp</td><td align="center"><p>Yes | No</p><ul><li><mark style="color:yellow;">Default: No</mark></li></ul></td><td><p>Selects whether to wait for RTCP SR (Sender Report), which includes timestamp information.</p><ul><li><mark style="color:yellow;">If set to <code>Yes</code>, the stream starts immediately without waiting for RTCP SR, so the first video appears faster. However, stability may vary depending on any device.</mark></li></ul></td></tr></tbody></table>
{% endstep %}

{% step %}

### Verify stream output and status <a href="#verify-stream-output-and-status" id="verify-stream-output-and-status"></a>

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

3. Stream List on the Web Console, verify that the media source pulled via RTSP is being delivered successfully through OvenMediaEngine Enterprise.

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

4. You can view various metadata on the stream details page.
   {% endstep %}
   {% endstepper %}
