# Publish via RTMP/E-RTMP

`RTMP`는 Live Encoder와 Service 간 송출에서 **가장 널리 사용되는 Protocol** 중 하나로, OBS Studio 같은 범용 Encoder와의 호환성이 뛰어나 빠르게 송출을 시작하기에 적합합니다. 나아가, E-RTMP (Enhanced RTMP)를 사용하면 인증/보안 등 운영 환경에 필요한 확장 옵션을 통해 보다 통제된 방식으로 송출을 구성할 수 있습니다.

본 Guide에서는 `RTMP`/`ERTMP`로 Stream을 Publish하는 절차와, 송출 이후 기본 재생 및 상태 확인 방법을 순서대로 안내합니다.

<table><thead><tr><th width="151">Item</th><th>Supported</th></tr></thead><tbody><tr><td>Container</td><td>FLV</td></tr><tr><td>Transport</td><td>TCP</td></tr><tr><td>Codec</td><td>H.264, AAC / H.265 (E-RTMP only)</td></tr></tbody></table>

## RTMP/E-RTMP Publish 시작하기 <a href="#start-publishing-an-rtmp-e-rtmp-stream" id="start-publishing-an-rtmp-e-rtmp-stream"></a>

본 예제에서는 가장 보편적으로 사용되는 Live Encoder Software인 OBS Studio를 사용했습니다.

{% stepper %}
{% step %}

### Live Encoder로 송출 (OBS Studio) <a href="#publish-with-a-live-encoder" id="publish-with-a-live-encoder"></a>

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

1. Open Broadcaster Software (OBS) Studio를 실행합니다.
   * OBS Studio가 설치되어 있지 않다면, 공식 링크 (<https://obsproject.com/download>)에서 다운로드하여설치하십시오.
2. 송출할 Media Source (또는 Camera, Screen Capture 등)를 추가합니다.
3. 이후 OBS 우측 하단의 <mark style="color:yellow;">\[Settings]</mark>를 클릭합니다.
   {% endstep %}

{% step %}

### OBS에서 스트리밍 설정 <a href="#configure-streaming-in-obs" id="configure-streaming-in-obs"></a>

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

4. Settings 화면 좌측에서, <mark style="color:yellow;">\[Stream]</mark> 탭을 선택합니다.
5. 그리고 <mark style="color:yellow;">\[Service]</mark>에서 <mark style="color:$primary;">**\[Custom]**</mark>을 선택한 뒤, <mark style="color:yellow;">Server</mark> 입력란에 Ingress URL을 입력합니다.
   * Ingress URL 형식: <mark style="color:$primary;">**`rtmp://`**</mark>`{Public IPv4 or Domain}:`<mark style="color:$primary;">**`1935`**</mark>`/{app}/{stream}`

{% hint style="info" %}
RTMP/E-RTMP Input 패턴을 모르는 경우, Web Conosle에서 \[Managed Stream]을 만든 후 <mark style="color:yellow;">\[URLs]</mark> 탭에서 확인할 수 있습니다.
{% endhint %}

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

6. 이후 <mark style="color:yellow;">\[Output]</mark> 탭에서 원활한 초저지연 및 저지연 스트리밍을 위해 <mark style="color:$primary;">**`Keyframe Interval`**</mark>을 <mark style="color:$primary;">**1초**</mark>로, <mark style="color:$primary;">**`B-frames`**</mark>를 <mark style="color:$primary;">**0**</mark>으로 설정할 것을 권장합니다.
   * Enhanced RTMP를 사용하는 경우, <mark style="color:$primary;">`H.265 (HEVC)`</mark>를 Video Eocnder로 적용하십시오.

{% hint style="success" %} <mark style="color:yellow;">B-frames</mark>를 <mark style="color:yellow;">0</mark>으로 설정 (`bframes=0`)하는 이유는 `WebRTC` 최종 출력 시 끊김 현상을 방지하기 위함입니다.\
위 예시는 Encoder로 `x264`를 선택했을 때의 설정 화면이며, 다른 Encoder를 선택할 경우 표시되는 항목이나 세부 구성은 달라질 수 있습니다. <mark style="color:yellow;">`WebRTC`</mark><mark style="color:yellow;">를 최종 출력</mark>으로 사용하는 경우, <mark style="color:yellow;">B-frames는 0으로 설정하는 것을 권장</mark>합니다.
{% endhint %}

7. 필요에 따라 \[Audio], \[Video] 등 각 탭에서 세부 설정을 조정한 뒤, <mark style="color:yellow;">\[OK]</mark>를 클릭하여 OBS 메인 화면으로 돌아갑니다.
8. 모든 설정이 완료되었다면, <mark style="color:yellow;">\[Start Streaming]</mark>을 클릭하여 송출을 시작합니다.
   {% endstep %}

{% step %}

### 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="/files/PNcVpitQtNFawcQlhopc" alt=""><figcaption></figcaption></figure>

9. <mark style="color:yellow;">Web Console</mark>에 OBS에서 송출한 Stream이 목록에 표시되는지 확인합니다.
   {% 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-rtmp-e-rtmp.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.
