# Publish via RTSP Pull (CCTV)

사용자가 보유한 CCTV, IP 카메라 등에서 캡처하는 `RTSP` Protocol 기반 Video를 Service에서 Real-time Stream으로 전환하고자 한다면, OvenMediaEngine Enterprise on AWS의 RTSP Pull 기능을 통해 간단하게 구현할 수 있습니다.

이 방식은 OvenMediaEngine이 **외부 RTSP (Media Source)에 직접 접속해 영상을 가져오는 기술 (Pulling)**&#xB85C;, 별도의 송출 도구 없이도 손쉽게 Live Streaming 환경을 구축할 수 있습니다.

<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>

## RTSP Pull Publish 시작하기 <a href="#start-publishing-an-rtsp-pull-stream" id="start-publishing-an-rtsp-pull-stream"></a>

{% stepper %}
{% step %}

### RTSP Pull Stream 생성 및 기본 정보 입력 <a href="#create-an-rtsp-pull-stream" id="create-an-rtsp-pull-stream"></a>

<figure><img src="/files/X73HhspZdVlCGHCXNk9L" alt=""><figcaption></figcaption></figure>

1. Web Console의 Stream List 메인 화면)에서 <mark style="color:yellow;">\[+]</mark>를 눌러 나타나는 메뉴 중 <mark style="color:yellow;">\[Add RTSP pull stream]</mark>을 클릭합니다.

<figure><img src="/files/Vlx7qBz99F3eL70QYB8e" alt=""><figcaption></figcaption></figure>

2. 사용자가 식별하기 쉬운 <mark style="color:yellow;">\[Stream Name]</mark>과 연결하려는 <mark style="color:yellow;">\[RTSP URL]</mark> 주소를 입력합니다.

{% hint style="success" %}
일반적인 RTSP URL의 형식은 `rtsp://{ID}:{Password}@{IP}:{Port}/path`이지만, 세상에는 다양한 제품들이 많으므로 제조사에서 권장하는 표준 RTSP 주소 형식을 확인해 주세요.
{% endhint %}
{% endstep %}

{% step %}

### Advanced Settings를 통한 안정성 확보 (선택 사항) <a href="#ensuring-stability-with-advanced-settings" id="ensuring-stability-with-advanced-settings"></a>

<figure><img src="/files/WdB5NrcvfqKLr6Ko6DI0" alt=""><figcaption></figcaption></figure>

* 부가적으로 <mark style="color:yellow;">\[Advanced Settings]</mark> 옵션을 활용하여 Network 환경에 최적화된 Streaming 동작을 구성할 수 있습니다.

{% hint style="info" %}
처음 RTSP Pull Stream 기능을 사용한다면, System에 설정된 기본값을 그대로 이용하여 Stream을 생성하는 것을 권장하며, 이후 운영 환경에 따라 부가적인 최적화가 필요한 경우 각 항목을 수정하여 Update하는 것이 좋습니다.
{% 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>Stream을 지속적으로 유지하는 옵션입니다.</p><ul><li><mark style="color:yellow;">이 옵션을 <code>Yes</code>로 설정하면, Stream이 생성된 뒤 별도의 <code>Delete</code> 요청이 있기 전까지 해당 Stream은 자동으로 삭제되지 않습니다.</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>이 옵션에 지정된 시간 (밀리 초)동안 입력 (Input/Ingress)된 Media Soruce가 없으면 해당 Stream을 삭제합니다.</p><ul><li><mark style="color:yellow;">단, <code>Create persistent stream</code> 옵션이 <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>이 옵션에 지정된 시간 (밀리 초)동안 출력 (Output/Egress)된 Stream이 없으면 해당 Stream을 삭제합니다.</p><ul><li><mark style="color:yellow;">단, <code>Create persistent stream</code> 옵션이 <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>Timestamp 등의 정보가 포함된 RTCP SR (Sender Report) 수신 여부를 선택하는 옵션입니다.</p><ul><li><mark style="color:yellow;">이 옵션을 <code>Yes</code>로 설정하면, RTCP SR 수신을 기다리지 않고 즉시 Stream을 시작하므로 첫 화면 송출이 빠르지만, 기기에 따라 안정적이지 않을 수 있습니다.</mark></li></ul></td></tr></tbody></table>
{% endstep %}

{% step %}

### Stream 송출 및 상태 확인 <a href="#verify-stream-output-and-status" id="verify-stream-output-and-status"></a>

<figure><img src="/files/ejjVmMCz8aIOjBxZTvPT" alt=""><figcaption></figcaption></figure>

3. Web Console 의 Stream List 화면에서 RTSP Pulling으로 가져온 Media Source가 정상적으로 OvenMediaEngine Enterprise에 송출 되었는지 확인하십시오.

<figure><img src="/files/gr96WXrbRqREa1WuyjVD" alt=""><figcaption></figcaption></figure>

4. Stream 상세 보기 화면에서 다양한 Metadata를 확인할 수 있습니다.
   {% 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/ko-kr/exclusive/aws-marketplace/publish-streams/publish-via-rtsp-pull-cctv.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.
