# Configuration Structure

OvenMediaEngine은 XML 설정 파일을 사용합니다. 만약 `systemctl start ovenmediaengine` 명령어로 OvenMediaEngine을 시작했다면, 설정 파일은 다음 경로에서 로드됩니다.

```bash
/usr/share/ovenmediaengine/conf/Server.xml
```

커맨드 라인에서 직접 실행하는 경우, 다음 경로에서 설정 파일을 로드합니다:

```bash
/<OvenMediaEngine Binary Path>/conf/Server.xml
```

Docker 컨테이너에서 실행하는 경우, 설정 파일의 경로는 다음과 같습니다:

```markup
# For Origin mode
/opt/ovenmediaengine/bin/origin_conf/Server.xml
# For Edge mode
/opt/ovenmediaengine/bin/edge_conf/Server.xml
```

## Server

`<Server>`는 설정 파일의 루트 엘리먼트입니다. `version` 속성은 설정 파일의 버전을 나타냅니다. OvenMediaEngine은 이 버전 정보를 사용하여 설정 파일이 호환 가능한 버전인지 확인합니다.

```markup
<?xml version="1.0" encoding="UTF-8"?>
<Server version="8">
    <Name>OvenMediaEngine</Name>
    <IP>*</IP>
    <PrivacyProtection>false</PrivacyProtection>
    <StunServer>stun.l.google.com:19302</StunServer>
    <Bind>...</Bind>
    <VirtualHosts>...</VirtualHosts>
</Server>
```

### IP

```xml
<Server>
    ...
    <IP>*</IP>
    ...
</Server>
```

`IP address`는 OvenMediaEngine이 바인딩될 주소입니다. `*`로 설정하면 시스템의 모든 IP 주소를 사용합니다. 특정 IP를 입력하면 해당 Host는 해당 IP만 사용합니다.

### PrivacyProtection

PrivacyProtection은 모든 기록에서 클라이언트의 개인 정보(IP, Port)를 삭제하여 GDPR, PIPEDA, CCPA, LGPD 등을 준수하기 위한 옵션입니다. 이 옵션을 켜면 모든 로그와 REST API에서 클라이언트의 IP와 Port가 `xxx.xxx.xxx.xxx:xxx`로 변환됩니다.

### StunServer

OvenMediaEngine은 WebRTC를 통해 플레이어에 연결하기 위해 자신의 공인 IP(Public IP)를 알아야 합니다. 서버는 시그널링 시 플레이어에게 `<IceCandidates>`와 TURN 서버 주소를 알려줘야 하며, 이 정보는 플레이어가 접속할 수 있는 IP여야 합니다. 그러나 Docker나 AWS와 같은 환경에서는 로컬 인터페이스를 통해 공인 IP를 얻을 수 없으므로, STUN 서버를 사용하여 공인 IP를 얻는 방법을 제공합니다 (버전 0.11.1부터 사용 가능).

OvenMediaEngine이 설정된 STUN 서버와의 통신을 통해 공인 IP를 획득하면, `<IceCandidate>` 및 `<TcpRelay>`에서 `*` 또는 `${PublicIP}`를 사용하여 공인 IP를 설정할 수 있습니다.

```xml
<Server>
    <StunServer>stun.l.google.com:19302</StunServer>
</Server>
```

## Bind

`<Bind>`는 사용할 서버 포트에 대한 설정입니다. Bind는 `<Providers>`와 `<Publishers>`로 구성됩니다. Providers는 스트림 입력을 위한 서버이고, Publishers는 스트리밍 출력을 위한 서버입니다.

{% code overflow="wrap" %}

```xml
<Server>
    <!-- Settings for the ports to bind -->
    <Bind>
        <!-- Enable this configuration if you want to use API Server -->
        <!--
        <Managers>
            <API>
                <Port>8081</Port>
                <WorkerCount>1</WorkerCount>
            </API>
        </Managers>
        -->

        <Providers>
            <!-- Pull providers -->
            <RTSPC>
                <WorkerCount>1</WorkerCount>
            </RTSPC>
            <OVT>
                <WorkerCount>1</WorkerCount>
            </OVT>
            <!-- Push providers -->
            <RTMP>
                <Port>1935</Port>
                <WorkerCount>1</WorkerCount>
            </RTMP>
            <SRT>
                <Port>9999</Port>
                <WorkerCount>1</WorkerCount>
            </SRT>
            <MPEGTS>
                <!--
                    Listen on port 4000~4005 (<Port>4000-4004,4005/udp</Port>)
                    This is just a demonstration to show that you can configure the port in several ways
                -->
                <Port>4000/udp</Port>
            </MPEGTS>
            <WebRTC>
                <Signalling>
                    <Port>3333</Port>
                    <TLSPort>3334</TLSPort>
                    <WorkerCount>1</WorkerCount>
                </Signalling>

                <IceCandidates>
                    <IceCandidate>*:10000/udp</IceCandidate>
                    <!-- 
                        If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
                        This uses the TURN protocol, which delivers the stream from the built-in TURN server to the player's TURN client over TCP. 
                        For detailed information, refer https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
                    -->
                    <TcpRelay>*:3478</TcpRelay>
                    <!-- TcpForce is an option to force the use of TCP rather than UDP in WebRTC streaming. (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set, playback may fail. -->
                    <TcpForce>true</TcpForce>
                    <TcpRelayWorkerCount>1</TcpRelayWorkerCount>
                </IceCandidates>
            </WebRTC>
        </Providers>

        <Publishers>
            <OVT>
                <Port>9000</Port>
                <WorkerCount>1</WorkerCount>
            </OVT>
            <LLHLS>
                <!-- 
                OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS ports. 
                LLHLS works with higher performance over HTTP/2, 
                so it is recommended to use a TLS port.
                -->
                <Port>3333</Port>
                <!-- If you want to use TLS, specify the TLS port -->
                <TLSPort>3334</TLSPort>
                <WorkerCount>1</WorkerCount>
            </LLHLS>
            <WebRTC>
                <Signalling>
                    <Port>3333</Port>
                    <TLSPort>3334</TLSPort>
                    <WorkerCount>1</WorkerCount>
                </Signalling>
                <IceCandidates>
                    <IceCandidate>*:10000-10005/udp</IceCandidate>
                    <!-- 
                        If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
                        This uses the TURN protocol, which delivers the stream from the built-in TURN server to the player's TURN client over TCP. 
                        For detailed information, refer https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
                    -->
                    <TcpRelay>*:3478</TcpRelay>
                    <!-- TcpForce is an option to force the use of TCP rather than UDP in WebRTC streaming. (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set, playback may fail. -->
                    <TcpForce>true</TcpForce>
                    <TcpRelayWorkerCount>1</TcpRelayWorkerCount>
                </IceCandidates>
            </WebRTC>
        </Publishers>
    </Bind>
</Server>

```

{% endcode %}

각 엘리먼트의 의미는 다음 표와 같습니다:

| Element        | Description                                                                                                                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Managers/API` | REST API 서버 포트                                                                                                                                                                                 |
| `RTMP`         | RTMP 스트림 입력을 위한 RTMP 포트                                                                                                                                                                        |
| `SRT`          | SRT 스트림 입력을 위한 SRT 포트                                                                                                                                                                          |
| `MPEGTS`       | MPEGTS/UDP 스트림 입력을 위한 MPEGTS 포트                                                                                                                                                                |
| `WebRTC`       | WebRTC를 위한 포트. 자세한 정보는 [WebRTC Ingest](/guide/ko-kr/features/live-source/webrtc-whip.md) 및 [WebRTC Streaming](/guide/ko-kr/features/streaming-and-distribution/webrtc-streaming.md) 챕터를 참조하세요. |
| `OVT`          | Origin 서버를 위한 OVT 포트. OVT는 Origin-Edge 통신을 위해 OvenMediaEngine에서 정의한 프로토콜입니다. 자세한 정보는 [Origin-Edge Clustering](/guide/ko-kr/features/high-availability/clustering.md) 챕터를 참조하세요.                |
| `LLHLS`        | LLHLS 스트리밍을 위한 HTTP(s) 포트                                                                                                                                                                      |

## Virtual Host

`<VirtualHosts>`는 단일 머신에서 하나 이상의 스트리밍 서버를 실행하는 방법입니다. OvenMediaEngine은 IP 기반 가상 호스트와 도메인 기반 가상 호스트를 지원합니다. "IP 기반"은 서로 다른 IP 주소를 설정하여 스트리밍 서버를 여러 개로 분리하는 것을 의미하며, "도메인 기반"은 스트리밍 서버가 동일한 IP 주소를 사용하더라도 서로 다른 도메인 이름을 설정하여 분리하는 것을 의미합니다.

`<VirtualHosts>`는 `<Name>`, `<Host>`, `<Origins>`, `<SignedPolicy>`, 그리고 `<Applications>`로 구성됩니다.

```xml
<!-- /Server -->
<VirtualHosts>
    <VirtualHost>
        <Name>default</Name>
        <Host>
        ...
        </Host>

        <Origins>
        ...
        </Origins>

        <SignedPolicy>
        ...
        </SignedPolicy>

        <Applications>
        ...
        </Applications>
    </VirtualHost>
</VirtualHosts>
```

### Host

Domain은 `<Names>`와 `<TLS>`를 가집니다. `<Names>`는 도메인 이름이나 IP 주소가 될 수 있습니다. `*`로 설정하면 모든 도메인과 IP 주소를 허용함을 의미합니다.

```xml
<!-- /Server/VirtualHosts -->
<VirtualHost>
    <Host>
        <Names>
            <!--
                You can specify domain names/IP addresses

                <Name>stream1.airensoft.com</Name>
                <Name>stream2.airensoft.com</Name>
                <Name>*.sub.airensoft.com</Name>
                <Name>192.168.0.160</Name>
            -->
            <Name>*</Name>
        </Names>
        <TLS>
            <CertPath>path/to/file.crt</CertPath>
            <KeyPath>path/to/file.key</KeyPath>
            <ChainCertPath>path/to/file.crt</ChainCertPath>
        </TLS>
    </Host>
</VirtualHost>
```

### SignedPolicy

`SignedPolicy`는 사용자의 권한과 시간을 제한하는 모듈입니다. 예를 들어, 운영자는 인증된 사용자에게 60초 동안 접속 가능한 RTMP URL을 배포하고 RTMP 전송을 1시간으로 제한할 수 있습니다. 제공된 URL은 60초 후에 파기되며, 1시간 후에 전송이 자동으로 중단됩니다. SignedPolicy URL을 제공받은 사용자는 인증되었기 때문에 제공된 URL 이외의 리소스에는 접근할 수 없습니다. 자세한 내용은 [SignedPolicy](/guide/ko-kr/features/access-control-and-security/signedpolicy.md) 챕터를 참조하세요.

### Origins

Origins(우리는 `OriginMap`이라고도 부름)은 외부 서버에서 스트림을 가져오는(Pull) 기능입니다. 현재 Pull 프로토콜로 OVT와 RTSP를 지원합니다. OVT는 Origin-Edge 통신을 위해 OvenMediaEngine에서 정의한 프로토콜로, OVP Publisher가 켜진 다른 OvenMediaEngine으로부터 스트림을 중계할 수 있게 해줍니다. RTSP를 사용하면 외부 RTSP 서버에서 스트림을 가져와 스트림을 생성합니다. 이렇게 가져온 스트림은 WebRTC, HLS, MPEG-DASH로 스트리밍 될 수 있습니다.

Origin은 `<Location>`과 `<Pass>` 엘리먼트를 가집니다. Location은 들어오는 요청에 대한 URI 패턴입니다. 요청 URL이 Location과 일치하면 OvenMediaEngine은 Pass 엘리먼트에 따라 스트림을 가져옵니다. Pass 엘리먼트에서 원본 스트림의 프로토콜과 URL을 설정할 수 있습니다.

Edge 서버를 실행하기 위해, Origin은 사용자 요청 시 Application이나 스트림이 없는 경우 이를 생성합니다. Origin-Edge에 대한 자세한 내용은 [Live Source](/guide/ko-kr/features/live-source.md) 챕터를 참조하세요.

```xml
<!-- /Server/VirtualHosts -->
<VirtualHost>
    <Origins>
        <Origin>
            <Location>/app/stream</Location>
            <Pass>
                <Scheme>ovt</Scheme>
                <Urls><Url>origin.com:9000/app/stream_720p</Url></Urls>
            </Pass>
        </Origin>
        <Origin>
            <Location>/app/</Location>
            <Pass>
                <Scheme>ovt</Scheme>
                <Urls><Url>origin.com:9000/app/</Url></Urls>
            </Pass>
        </Origin>
        <Origin>
            <Location>/rtsp/stream</Location>
            <Pass>
                <Scheme>rtsp</Scheme>
                <Urls><Url>rtsp-server.com:554/</Url></Urls>
            </Pass>
        </Origin>
        <Origin>
            <Location>/</Location>
            <Pass>
                <Scheme>ovt</Scheme>
                <Urls><Url>origin2.com:9000/</Url></Urls>
            </Pass>
        </Origin>
    </Origins>
</VirtualHost>
```

### Application

`<Application>`은 스트림 입력, 인코딩, 스트림 출력을 포함하여 스트림의 동작을 정의할 수 있는 다양한 엘리먼트로 구성됩니다. 즉, 원하는 만큼 많은 `<Application>`을 생성하고 다양한 스트리밍 환경을 구축할 수 있습니다.

```markup
<!-- /Server/VirtualHosts/VirtualHost -->
<Applications>
    <Application>
        ...
    </Application>
    <Application>
        ...
    </Application>
    ...
</Applications>
```

`<Application>`은 다음과 같이 `<Name>`과 `<Type>`을 설정해야 합니다:

```markup
<!-- /Server/VirtualHosts/VirtualHost/Applications -->
<Application>
    <Name>app</Name>
    <Type>live</Type>
    <OutputProfiles>...</OutputProfiles>
    <Providers>...</Providers>
    <Publishers>...</Publishers>
</Application>
```

* `<Name>`은 스트리밍 URL을 구성하는 데 사용됩니다.
* `<Type>`은 `<Application>`의 동작을 정의합니다. 현재는 `live` 타입만 존재합니다.

#### OutputProfiles

`<OutputProfile>`은 출력 스트림을 생성하는 설정입니다. 출력 스트림 이름은 `<OutputStreamName>`으로 설정할 수 있으며, 트랜스코딩 속성은 `<Encodes>`를 통해 설정할 수 있습니다. 하나의 입력을 여러 출력 스트림으로 스트리밍하려는 경우 여러 개의 `<OutputProfile>`을 설정할 수 있습니다.

```markup
<!-- /Server/VirtualHosts/VirtualHost/Applications -->
<Application>
    <OutputProfiles>
        <OutputProfile>
            <Name>bypass_stream</Name>
            <OutputStreamName>${OriginStreamName}</OutputStreamName>
            <Encodes>
                <Audio>
                    <Bypass>true</Bypass>
                </Audio>
                <Video>
                    <Bypass>true</Bypass>
                </Video>
                <Audio>
                    <Codec>opus</Codec>
                    <Bitrate>128000</Bitrate>
                    <Samplerate>48000</Samplerate>
                    <Channel>2</Channel>
                </Audio>
                <!--
                <Video>
                    <Codec>vp8</Codec>
                    <Bitrate>1024000</Bitrate>
                    <Framerate>30</Framerate>
                    <Width>1280</Width>
                    <Height>720</Height>
                </Video>
                -->
                ...
            </Encodes>
        </OutputProfile>
    </OutputProfiles>
</Application>
```

`<OutputProfiles>`에 대한 자세한 정보는 [트랜스코딩](/guide/ko-kr/features/transcoding-and-processing.md) 챕터를 참조하세요.

#### Providers

`<Providers>`는 미디어 소스에서 들어오는 스트림을 수신(Ingest)합니다. 자세한 정보는 [Live Source](/guide/ko-kr/features/live-source.md) 챕터를 참조하세요.

```xml
<!-- /Server/VirtualHosts/VirtualHost/Applications -->
<Application>
    <Providers>
        <RTMP />
        <WebRTC />
        <SRT />
        <RTSPPull />
        <OVT />
        <MPEGTS>
            <StreamMap>
                ...
            </StreamMap>
        </MPEGTS>
    </Providers>
</Application>
```

#### Publishers

`<Publishers>`에서 출력 스트림 동작을 설정할 수 있습니다. `<Publishers>/<ThreadCount>`는 각 프로토콜 구성 요소에서 사용하는 스레드 수입니다.

{% hint style="info" %}
동시에 많은 사용자에게 스트림을 전송하려면 많은 스레드가 필요합니다. 따라서 코어 수가 많은 CPU를 사용하고 `<ThreadCount>`를 CPU 코어 수와 동일하게 설정하는 것이 좋습니다.
{% endhint %}

```xml
<!-- /Server/VirtualHosts/VirtualHost/Applications -->
<Application>
    <Publishers>
        <OVT />
        <LLHLS />
        <WebRTC />
    </Publishers>
</Application>
```

OvenMediaEngine은 현재 WebRTC, Low-Latency DASH, MPEG-DASH 및 HLS를 지원합니다. 특정 프로토콜을 사용하지 않으려면 해당 설정을 삭제할 수 있으며, 그러면 해당 프로토콜을 위한 구성 요소가 초기화되지 않습니다. 결과적으로 사용하지 않는 프로토콜 설정을 삭제함으로써 시스템 리소스를 절약할 수 있습니다.

WebRTC에 대해 자세히 알아보려면 [WebRTC Streaming](/guide/ko-kr/features/streaming-and-distribution/webrtc-streaming.md) 챕터를, LL-DASH, MPEG-DASH, HLS에 대한 정보는 [HLS & MPEG-DASH Streaming](/guide/ko-kr/features/streaming-and-distribution/low-latency-hls.md) 챕터를 참조하세요.

## Configuration Example

최종적으로 `Server.xml`은 다음과 같이 구성됩니다:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<Server version="8">
    <Name>OvenMediaEngine</Name>
    <!-- Host type (origin/edge) -->
    <Type>origin</Type>
    <!-- Specify IP address to bind (* means all IPs) -->
    <IP>*</IP>
    <PrivacyProtection>false</PrivacyProtection>

    <!--
        To get the public IP address(mapped address of stun) of the local server.
        This is useful when OME cannot obtain a public IP from an interface, such as AWS or docker environment.
        If this is successful, you can use ${PublicIP} in your settings.
    -->
    <StunServer>stun.l.google.com:19302</StunServer>

    <Modules>
        <!--
            Currently OME only supports h2 like all browsers do. Therefore, HTTP/2 only works on TLS ports.
        -->
        <HTTP2>
            <Enable>true</Enable>
        </HTTP2>

        <LLHLS>
            <Enable>true</Enable>
        </LLHLS>

        <!-- P2P works only in WebRTC and is experiment feature -->
        <P2P>
            <!-- disabled by default -->
            <Enable>false</Enable>
            <MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
        </P2P>
    </Modules>

    <!-- Settings for the ports to bind -->
    <Bind>
        <!-- Enable this configuration if you want to use API Server -->
        <!--
        <Managers>
            <API>
                <Port>8081</Port>
                <TLSPort>8082</TLSPort>
                <WorkerCount>1</WorkerCount>
            </API>
        </Managers>
        -->

        <Providers>
            <!-- Pull providers -->
            <RTSPC>
                <WorkerCount>1</WorkerCount>
            </RTSPC>
            <OVT>
                <WorkerCount>1</WorkerCount>
            </OVT>
            <!-- Push providers -->
            <RTMP>
                <Port>1935</Port>
                <WorkerCount>1</WorkerCount>
            </RTMP>
            <SRT>
                <Port>9999</Port>
                <WorkerCount>1</WorkerCount>
            </SRT>
            <MPEGTS>
                <!--
                    Listen on port 4000~4005 (<Port>4000-4004,4005/udp</Port>)
                    This is just a demonstration to show that you can configure the port in several ways
                -->
                <Port>4000/udp</Port>
            </MPEGTS>
            <WebRTC>
                <Signalling>
                    <Port>3333</Port>
                    <TLSPort>3334</TLSPort>
                    <WorkerCount>1</WorkerCount>
                </Signalling>

                <IceCandidates>
                    <IceCandidate>*:10000/udp</IceCandidate>
                    <!--
                        If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
                        This uses the TURN protocol, which delivers the stream from the built-in TURN server to the player's TURN client over TCP.
                        For detailed information, refer https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
                    -->
                    <TcpRelay>*:3478</TcpRelay>
                    <!--
                        TcpForce is an option to force the use of TCP rather than UDP in WebRTC streaming.
                        (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set, playback may fail.
                    -->
                    <TcpForce>true</TcpForce>
                    <TcpRelayWorkerCount>1</TcpRelayWorkerCount>
                </IceCandidates>
            </WebRTC>
        </Providers>

        <Publishers>
            <OVT>
                <Port>9000</Port>
                <WorkerCount>1</WorkerCount>
            </OVT>
            <LLHLS>
                <!--
                    OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS ports.
                    LLHLS works with higher performance over HTTP/2,
                    so it is recommended to use a TLS port.
                -->
                <Port>3333</Port>
                <!-- If you want to use TLS, specify the TLS port -->
                <TLSPort>3334</TLSPort>
                <WorkerCount>1</WorkerCount>
            </LLHLS>
            <WebRTC>
                <Signalling>
                    <Port>3333</Port>
                    <TLSPort>3334</TLSPort>
                    <WorkerCount>1</WorkerCount>
                </Signalling>
                <IceCandidates>
                    <IceCandidate>*:10000-10005/udp</IceCandidate>
                    <!--
                        If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
                        This uses the TURN protocol, which delivers the stream from the built-in TURN server to the player's TURN client over TCP.
                        For detailed information, refer https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
                    -->
                    <TcpRelay>*:3478</TcpRelay>
                    <!--
                        TcpForce is an option to force the use of TCP rather than UDP in WebRTC streaming.
                        (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set, playback may fail.
                    -->
                    <TcpForce>true</TcpForce>
                    <TcpRelayWorkerCount>1</TcpRelayWorkerCount>
                </IceCandidates>
            </WebRTC>
        </Publishers>
    </Bind>

    <!--
        Enable this configuration if you want to use API Server

        <AccessToken> is a token for authentication, and when you invoke the API, you must put "Basic base64encode(<AccessToken>)" in the "Authorization" header of HTTP request.
        For example, if you set <AccessToken> to "ome-access-token", you must set "Basic b21lLWFjY2Vzcy10b2tlbg==" in the "Authorization" header.
    -->
    <!--
    <Managers>
        <Host>
            <Names>
                <Name>*</Name>
            </Names>
            <TLS>
                <CertPath>path/to/file.crt</CertPath>
                <KeyPath>path/to/file.key</KeyPath>
                <ChainCertPath>path/to/file.crt</ChainCertPath>
            </TLS>
        </Host>
        <API>
            <AccessToken>ome-access-token</AccessToken>

            <CrossDomains>
                <Url>*.airensoft.com</Url>
                <Url>http://*.sub-domain.airensoft.com</Url>
                <Url>http?://airensoft.*</Url>
            </CrossDomains>
        </API>
    </Managers>
    -->

    <VirtualHosts>
        <!-- You can use wildcard like this to include multiple XMLs -->
        <VirtualHost include="VHost*.xml" />
        <VirtualHost>
            <Name>default</Name>
            <!--
                Distribution is a value that can be used when grouping the same vhost distributed across multiple servers.
                This value is output to the events log, so you can use it to aggregate statistics.
            -->
            <Distribution>ovenmediaengine.com</Distribution>

            <!-- Settings for multi ip/domain and TLS -->
            <Host>
                <Names>
                    <!-- Host names
                        <Name>stream1.airensoft.com</Name>
                        <Name>stream2.airensoft.com</Name>
                        <Name>*.sub.airensoft.com</Name>
                        <Name>192.168.0.1</Name>
                    -->
                    <Name>*</Name>
                </Names>
                <!--
                <TLS>
                    <CertPath>path/to/file.crt</CertPath>
                    <KeyPath>path/to/file.key</KeyPath>
                    <ChainCertPath>path/to/file.crt</ChainCertPath>
                </TLS>
                -->
            </Host>

            <!--
                Refer to https://airensoft.gitbook.io/ovenmediaengine/signedpolicy
            -->
            <!--
            <SignedPolicy>
                <PolicyQueryKeyName>policy</PolicyQueryKeyName>
                <SignatureQueryKeyName>signature</SignatureQueryKeyName>
                <SecretKey>aKq#1kj</SecretKey>

                <Enables>
                    <Providers>rtmp,webrtc,srt</Providers>
                    <Publishers>webrtc,llhls</Publishers>
                </Enables>
            </SignedPolicy>
            -->

            <!--
            <AdmissionWebhooks>
                <ControlServerUrl></ControlServerUrl>
                <SecretKey></SecretKey>
                <Timeout>3000</Timeout>
                <Enables>
                    <Providers>rtmp,webrtc,srt</Providers>
                    <Publishers>webrtc,llhls</Publishers>
                </Enables>
            </AdmissionWebhooks>
            -->

            <!--
            <Origins>
                <Properties>
                    <NoInputFailoverTimeout>3000</NoInputFailoverTimeout>
                    <UnusedStreamDeletionTimeout>60000</UnusedStreamDeletionTimeout>
                </Properties>
                <Origin>
                    <Location>/app/stream</Location>
                    <Pass>
                        <Scheme>ovt</Scheme>
                        <Urls><Url>origin.com:9000/app/stream_720p</Url></Urls>
                    </Pass>
                    <ForwardQueryParams>false</ForwardQueryParams>
                </Origin>
                <Origin>
                    <Location>/app/</Location>
                    <Pass>
                        <Scheme>ovt</Scheme>
                        <Urls><Url>origin.com:9000/app/</Url></Urls>
                    </Pass>
                </Origin>
                <Origin>
                    <Location>/edge/</Location>
                    <Pass>
                        <Scheme>ovt</Scheme>
                        <Urls><Url>origin.com:9000/app/</Url></Urls>
                    </Pass>
                </Origin>
            </Origins>
            -->

            <!-- Settings for applications -->
            <Applications>
                <Application>
                    <Name>app</Name>
                    <!-- Application type (live/vod) -->
                    <Type>live</Type>
                    <OutputProfiles>
                        <!-- Enable this configuration if you want to hardware acceleration using GPU -->
                        <HardwareAcceleration>false</HardwareAcceleration>
                        <OutputProfile>
                            <Name>bypass_stream</Name>
                            <OutputStreamName>${OriginStreamName}</OutputStreamName>
                            <Encodes>
                                <Audio>
                                    <Bypass>true</Bypass>
                                </Audio>
                                <Video>
                                    <Bypass>true</Bypass>
                                </Video>
                                <Audio>
                                    <Codec>opus</Codec>
                                    <Bitrate>128000</Bitrate>
                                    <Samplerate>48000</Samplerate>
                                    <Channel>2</Channel>
                                </Audio>
                                <!--
                                <Video>
                                    <Codec>vp8</Codec>
                                    <Bitrate>1024000</Bitrate>
                                    <Framerate>30</Framerate>
                                    <Width>1280</Width>
                                    <Height>720</Height>
                                    <Preset>faster</Preset>
                                </Video>
                                -->
                            </Encodes>
                        </OutputProfile>
                    </OutputProfiles>
                    <Providers>
                        <OVT />
                        <WebRTC />
                        <RTMP />
                        <SRT />
                        <MPEGTS>
                            <StreamMap>
                                <!--
                                    Set the stream name of the client connected to the port to "stream_${Port}"
                                    For example, if a client connects to port 4000, OME creates a "stream_4000" stream
                                -->
                                <!--
                                <Stream>
                                    <Name>stream_${Port}</Name>
                                    <Port>4000,4001-4004</Port>
                                </Stream>
                                <Stream>
                                    <Name>stream_4005</Name>
                                    <Port>4005</Port>
                                </Stream>
                                -->
                                <Stream>
                                    <Name>stream_${Port}</Name>
                                    <Port>4000</Port>
                                </Stream>
                            </StreamMap>
                        </MPEGTS>
                        <RTSPPull />
                        <WebRTC>
                            <Timeout>30000</Timeout>
                        </WebRTC>
                    </Providers>
                    <Publishers>
                        <AppWorkerCount>1</AppWorkerCount>
                        <StreamWorkerCount>8</StreamWorkerCount>
                        <OVT />
                        <WebRTC>
                            <Timeout>30000</Timeout>
                            <Rtx>false</Rtx>
                            <Ulpfec>false</Ulpfec>
                            <JitterBuffer>false</JitterBuffer>
                        </WebRTC>
                        <LLHLS>
                            <ChunkDuration>0.2</ChunkDuration>
                            <SegmentDuration>6</SegmentDuration>
                            <SegmentCount>10</SegmentCount>
                            <CrossDomains>
                                <Url>*</Url>
                            </CrossDomains>
                        </LLHLS>
                    </Publishers>
                </Application>
            </Applications>
        </VirtualHost>
    </VirtualHosts>
</Server>
```

{% hint style="info" %}
향후 업데이트를 통해 OvenMediaEngine Enterprise의 웹 콘솔(Web Console)에서 모든 기능과 설정을 제어할 수 있게 될 예정입니다.
{% endhint %}


---

# 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/pre-built-package-installation/configuration-structure.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.
