# Managed and Instant Streams

## Managed Streams와 Instant Streams

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

Managed Stream과 Instant Stream은 <mark style="color:yellow;">Stream 목록에서 Stream 항목으로 분류</mark>되어 쉽게 구분할 수 있습니다. 또, Stream List에서 Managed Stream 또는 Instant Stream을 선택하여 Stream Monitoring 화면으로 이동하면 해당 Stream이 재생되고 있는 <mark style="color:yellow;">OvenPlayer 좌측 상단에 마킹</mark>되어 쉽게 확인할 수 있습니다.

## Stream Monitoring 탭 설명

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

* <mark style="color:yellow;">**Stream Playback**</mark>: Stream Monitoring 화면에서 좌측에 위치한 Output Stream, Playlist, Protocol 등의 옵션을 선택 후 내장된 OvenPlayer을 통해 Stream을 재생할 수 있습니다.
* <mark style="color:yellow;">**Status**</mark>: 해당 Stream의 Ingress 및 Egress 메타데이터 및 통계를 확인할 수 있습니다.
* <mark style="color:yellow;">**URLs**</mark>: 해당 Stream의 Ingress 및 Egress URL들을 확인할 수 있으며, OvenMediaEngine 설정에 따라 사용 가능한 Ingress 및 Egress Protocol이 표시됩니다.

{% hint style="info" %}

* 지원하는 Ingress Protocols: RTMP, WebRTC, WebRTC/TLS, WHIP, WHIP/TLS, SRT
* 지원하는 Egress Protocols: WebRTC, WebRTC/TLS, LLHLS, LLHLS/TLS, HLS
  {% endhint %}

- <mark style="color:yellow;">**Recording**</mark>: 해당 Stream의 녹화 상태를 확인할 수 있습니다.
- <mark style="color:yellow;">**Push Publishing**</mark>: 해당 Stream을 다른 플랫폼으로 전송하는 Push Publishing 상태를 확인할 수 있습니다.
- <mark style="color:yellow;">**Dump**</mark>: 해당 Stream의 LLHLS Dump 상태를 확인할수 있습니다.

## Stream 상태 모니터링

### 메타데이터 및 통계 확인

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

* <mark style="color:yellow;">**Ingress**</mark>: Ingress Stream의 Protocol, Source 위치, Track, Input Traffic 등을 확인할 수 있습니다.
* <mark style="color:yellow;">**Egress**</mark>: Egress Stream의 Output Profile, Track, Output Traffic 등을 확인할 수 있습니다.
  * *OvenMediaEngine에 Output Profile이 여러개 구성 되어있다면 ABR로 동작할 수 있습니다.*

## Stream 재생

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

Output Stream 또는 Playlist (OvenMediaEngine 설정에 따름), Protocol 선택 (LLHLS 또는 WebRTC), 인증서 여부 (TLS 또는 Non-TLS) 등 선택한 Playback 옵션에 따라 Stream의 Playback URL이 표시됩니다. 해당 <mark style="color:yellow;">Playback URL을 이용하여 OvenPlayer 또는 외부 플레이어를 통해 재생</mark>할 수 있습니다.

### 재생 URL 확인&#x20;

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

* <mark style="color:yellow;">**Ingress URL**</mark>: OvenMediaEngine에 활성화된 송출 주소들을 확인할 수 있습니다.
* <mark style="color:yellow;">**Egress URL**</mark>: OvenMediaEngine에 설정된 Output Stream, Playlist, Protocol 별 재생 주소를 확인할 수 있습니다.

{% hint style="info" %}
각 URL 끝 부분에 위치한 Copy 아이콘을 눌러 쉽게 URL을 복사할 수 있습니다.
{% endhint %}

### Playback 실패

<div><figure><img src="https://content.gitbook.com/content/Z6NWzeQyKbSWkDFSGwGx/blobs/xlQJEM2oKda88tCT8dEv/Screenshot%202024-03-18%20at%2004.18.36.JPG" alt=""><figcaption><p>OvenPlayer 재생</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/Z6NWzeQyKbSWkDFSGwGx/blobs/SDNShE2htakMTDbtsGSZ/Screenshot%202024-03-18%20at%2004.09.35.JPG" alt=""><figcaption><p>Stream 재생 실패시, OvenPlayer 하단에 원인 표시</p></figcaption></figure></div>

선택한 Playback URL은 OvenMediaEngine Enterprise에 포함된 OvenPlayer를 사용하여 재생할 수 있으나 재생에 실패한 경우, <mark style="color:yellow;">시스템이 자동으로 원인과 해결 방법을 OvenPlayer 하단에 제공</mark>합니다. 문제가 발생하면 해당 정보를 참조하십시오.

## Recording 상태 확인하기

<figure><img src="https://content.gitbook.com/content/Z6NWzeQyKbSWkDFSGwGx/blobs/qkexuE37QMvDVYe4F0FZ/image.png" alt=""><figcaption><p>Stream 목록에서 Recording 시 표시되는 마킹</p></figcaption></figure>

Recording은 해당 Stream이 Live 중일 때 녹화하는 기능으로 해당 Stream이 <mark style="color:yellow;">녹화 중일 때 Stream 목록에서 Recording 마킹</mark>이 붙어 한 눈에 녹화 중임을 알 수 있습니다.

또한, 사용자는 Record API를 이용해 Recording 기능을 사용하고 제어할 수 있습니다.

{% hint style="info" %}

* Recording 설정 가이드: <https://docs.ovenmediaengine.com/recording>
* Recording API 가이드: <https://docs.ovenmediaengine.com/rest-api/v1/virtualhost/application/recording>
  {% endhint %}

### Recording 시작하기 | 0.17.1.2+

<figure><img src="https://content.gitbook.com/content/Z6NWzeQyKbSWkDFSGwGx/blobs/7a6zPj3LWOrXO5tVyP0P/image.png" alt=""><figcaption></figcaption></figure>

사용자는 Stream Monitoring 내 Recording 탭을 통해 상세한 Recording 상태를 확인할 수 있으며, Start/Stop Recording 기능을 이용해 Recording을 제어할 수 있습니다.

* <mark style="color:yellow;">**Id**</mark>: Recording 작업을 식별하는 고유 ID입니다.
* <mark style="color:yellow;">**Output Stream Name**</mark>: Output Stream 이름을 기반으로 Recording을 진행합니다.
* <mark style="color:yellow;">**Variant Names**</mark>: Recording할 Track 이름 배열입니다.
* <mark style="color:yellow;">**Interval**</mark>: 밀리초로 파일당 Recording 시간을 지정합니다. Recording 내 Schedule 옵션과 함께 사용할 수 없습니다.
* <mark style="color:yellow;">**Schedule**</mark>: Crontab 구문과 동일합니다. 예를들어, '10 \*/1 \*'는 매 시간의 10분마다 Recorded File을 출력한다는 의미입니다. Recording 내 Interval 옵션과 함께 사용할 수 없습니다.
* <mark style="color:yellow;">**Segmentation Rule**</mark>: 분할된 Recorded Files에서 연속 또는 불연속 Timestamp에 대한 정책을 정의합니다.
  * **continuity**: 해당 Recording 작업에서 생성되는 Recorded File의 Timestamp를 연속적으로 설정합니다.
  * **discontinuity** (default): 해당 Recording 작업에서 Timestamp가 각 Recorded File 마다 새로 시작됩니다.
* <mark style="color:yellow;">**Metadata**</mark>: Metadata는 Record Delivery 기능에서 사용됩니다. Record Delivery 설정 예시는 아래와 같습니다.

{% hint style="info" %}
aws\_access\_key\_id='xxx', aws\_secret\_access\_key='xxx', endpoint='<https://object.storage.com>', region='us-east-1', bucket\_name='bucket\_name', object\_dir='my/vod/path/',delete='true'
{% endhint %}

## Push Publishing 상태 확인하기

<figure><img src="https://content.gitbook.com/content/Z6NWzeQyKbSWkDFSGwGx/blobs/S4vbSxaRbnvaSGsUQSl6/image.png" alt=""><figcaption><p>Stream 목록에서 Push 시 표시되는 마킹 및 결과물</p></figcaption></figure>

Push Publishing은 OvenMediaEngine Enterprise에 Ingress된 해당 Stream을 다른 플랫폼으로 재송출하는 기능으로 해당 Stream이 <mark style="color:yellow;">재스트리밍 되는 동안 Stream 목록에서 Push Publishing 마킹</mark>이 붙어 한 눈에 재송출 중임을 알 수 있으며, Stream Monitoring 내 Push Publishing 탭을 통해 상세한 Push Publishing 상태를 확인할 수 있습니다.

또한, 사용자는 Push Publishing API를 이용해 Push Publishing 기능을 사용하고 제어할 수 있습니다.

{% hint style="info" %}

* Push Publishing 설정 가이드: <https://docs.ovenmediaengine.com/recording>
* Push Publishing API 가이드: <https://docs.ovenmediaengine.com/rest-api/v1/virtualhost/application/push>
  {% endhint %}

### Push Publishing 시작하기 | 0.17.1.2+

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

사용자는 Stream Monitoring 내 Push 탭을 통해 상세한 재스트리밍 상태를 확인할 수 있으며, Start/Stop Push Publishing 기능을 이용해 Push를 제어할 수 있습니다.

* <mark style="color:yellow;">**Id**</mark>: Push Publishing 작업을 식별하는 고유 ID입니다.
* <mark style="color:yellow;">**Output Stream Name**</mark>: Output Stream 이름을 기반으로 Push Publishing을 진행합니다.
* <mark style="color:yellow;">**Variant Names**</mark>: Push Publishing할 Track 이름 배열입니다. `<OutputProfile>` 설정 내 `<Encodes>` *\[Video|Audio|Data]* `<Name>`을 기준으로 인코딩하며, 해당 항목이 비어 있으면 모든 Track이 전송됩니다.
* <mark style="color:yellow;">**Protocol**</mark>: Push Publishing에 사용할 Protocol을 선택합니다.
* <mark style="color:yellow;">**URL**</mark>: Push Publishing이 전달될 대상의 주소 (Stream URL)입니다.
* <mark style="color:yellow;">**Stream Key**</mark>: RTMP를 사용할 때 Stream Key를 입력합니다. SRT 및 MPEG2-TS에서는 사용되지 않습니다.

## (LL)-HLS Dump 상태 확인하기

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

(LL)-HLS Dump는 해당 Stream이 (LL)-HLS로 재생될 때 `.m3u8`과 모든 트랙 세그먼트를 Dump하여 Live 중일 때에도 Dump된 지점까지 파일을 VoD에 즉시 제공할 수 있는 기능입니다. 해당 Stream이 Dump 되는 동안 Stream Monitoring 내 Dump 탭을 통해 상세한 Dump 상태를 확인할 수 있습니다.

또한, 사용자는 Dump API를 이용해 Dump 기능을 사용하고 제어할 수 있습니다.

{% hint style="info" %}

* LLHLS Dump 설정 가이드: <https://docs.ovenmediaengine.com/streaming/low-latency-hls#dump>
* LLHLS Dump API 가이드: <https://docs.ovenmediaengine.com/rest-api/v1/virtualhost/application/stream/hls-dump>
  {% endhint %}

### (LL)-HLS Dump 시작하기 | 0.17.1.2+

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

사용자는 Stream Monitoring 내 Dump 탭을 통해 상세한 (LL)-HLS Dump 상태를 확인할 수 있으며, Start/Stop (LL)-HLS Dump 기능을 이용해 Dump를 제어할 수 있습니다.

* <mark style="color:yellow;">**Id**</mark>: 해당 API 요청의 ID 입니다.
* <mark style="color:yellow;">**Output Stream Name**</mark>: `<OutputProfile>`에 설정한 Output Stream 이름입니다.
* <mark style="color:yellow;">**Playlists**</mark>: `<outputPath>`에 설정된 Master Playlist를 Dump합니다. Json 배열 형식으로 입력해야 하며, 여러 개의 Playlist를 지정할 수 있습니다.
* <mark style="color:yellow;">**Output Path**</mark>: Dump를 Output할 Directory 경로입니다. Directory는 OvenMediaEngine 프로세스에서 사용할 수 있어야 하며, 만약 설정한 Directory가 없으면 OvenMediaEngine이 Directory를 만듭니다.
* <mark style="color:yellow;">**Info File**</mark>: Dumped File의 정보가 업데이트되는 DB File의 이름입니다. 이 항목을 기입하지 않으면 File이 생성되지 않으며, 중복되는 이름의 File이 있으면 오류가 발생합니다.
* <mark style="color:yellow;">**User Data**</mark>: `<infoFile>`이 지정되면 Dump 데이터가 `<infoFile>`에 기록됩니다. `<infoFile>`이 지정되지 않으면 작동하지 않습니다.
