Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
OvenMediaEngine has an XML configuration file. If you start OvenMediaEngine by systemctl start ovenmediaengine
, the configuration file is loaded from the following path.
If you run it directly from the command line, it loads the configuration file from the following location:
If you run it in docker container, the configuration file is in the following path:
Server
is the root element of the configuration file. The version
attribute indicates the version of the configuration file. OvenMediaEngine uses this version information to check if the configuration file is a compatible version.
The IP address that the OvenMediaEngine will bind to. If you set *, all IP addresses of the system are used. If you input a specific IP, the Host use only that IP.
Bind
is configuration for server port that will be used. Bind consists of Providers and Publishers. The Providers is server for stream input, the Publishers is server for streaming.
The meanings of each element are shown in the following table.
HLS and DASH can be set to the same port, but all other protocols have to use different ports. The ability for all protocols to use the same port will be updated in the future.
VirtualHosts
is a way of operating more than one streaming server on a single machine. OvenMediaEngine supports IP based virtual host and Domain based virtual host. The "IP based" means that you can separate the streaming servers into multiples by setting different IP addresses and the "Domain based" means that even if the streaming servers use the same IP address, you can split the streaming servers into multiples by setting different domain names.
VirtualHosts
consists of Domain, Origins and Applications.
The Domain has Names and TLS. The Names can be either domain address or IP address. Setting * means it can accept all domains and IP addresses.
Origins (sometimes called OriginMap) is a feature to pull streams from external servers. The protocols for pulling now supports OVT and RTSP. The OVT is a protocol defined by OvenMediaEngine for Origin-Edge communication. It allows OvenMediaEngine to relay a stream from other OvenMediaEngines that have OVP Publisher turned on. Using RTSP, OvenMediaEngine pulls a stream from a RTSP server and create the stream. RTSP stream from external server can stream by WebRTC, HLS and MPEG-Dash.
The Origin has Location and Pass elements. The Location is a URI pattern for incoming request. If the incoming URL request matches the Location, OvenMediaEngine will pull the stream according to the Pass element. In the pass element, you can set the protocol and Urls of the origin stream.
To run edge server, Origin creates application and stream if there isn't those when user request. For more information about Origin-Edge, see the Live Source chapter.
<Application>
consists of various elements that can define the operation of the stream including Stream input, Encoding, and Stream output. In other words, you can create as many <Application>
as you want and build a variety of streaming environments.
<Application>
needs to set <Name>
and <Type>
as follows:
<Name>
is used to configure the Streaming URL.
<Type>
defines the operation of the <Application>
. Currently, there is only live
type.
Providers
ingests streams that comes from media source.
If you want to get more information about the <Providers>
, please refer to the Live Source chapter.
<Encode>
has profiles that encode the Input Streams coming in via <Providers>
. You can set up multiple profiles in <Encode>
.
You can create a new Output Stream by grouping the encoded results in the <Stream>
setting.
<Name>
is the Stream Name when you use to configure the Streaming URL.
<Stream>
can be combined with multiple <Profile>
and output as Multi Codec or Adaptive.
<Profile>
is <Encode><Name>
and maps the Transcoding profile.
For more information about the Encodes and Streams, please see the Transcoding chapter.
You can configure the Output Stream operation in <Publishers>
. <ThreadCount>
is the number of threads used by each component responsible for the <Publishers>
protocols.
You need many threads to transmit streams to a large number of users at the same time. Therefore, it is recommended to use a higher core CPU and set the ThreadCount
equal to the number of CPU cores.
​OvenMediaEngine currently supports WebRTC, HLS, MPEG-DASH and Low-Latency MPEG-DASH. If you do not want to use any protocol then you can delete that protocol setting, the component for that protocol is not initialized. As a result, you can save system resources by deleting settings for unused protocol components.
If you want to learn more about WebRTC, please visit the WebRTC Streaming chapter. And if you want to get more information about HLS, MPEG-DASH, Low-Latency MPEG-DASH, please refer to the chapter on HLS & MPEG-DASH Streaming.
Finally, Server.xml
will be configured as follows:
Element
Description
RTMP
RTMP Port for incoming RTMP stream
OVT
OVT Port for origin server
OVT is a protocol defined by OvenMediaEngine for Origin-Edge communication. For more information about Origin-Edge, see the Origin-Edge Clustering chapter.
HLS
HTTP(s) Port for HLS Streaming
DASH
HTTP(s) Port for MPEG-Dash Streaming including Low-Latency MPEG-Dash
WebRTC
Ports for WebRTC, For more information. If you want more information about WebRTC port, see WebRTC Streaming chapter.
OvenMediaEngine supports HTTP based streaming protocols such as HLS, MPEG-DASH(Hereafter DASH) and Low-Latency MPEG-DASH with CMAF(Hereafter LLDASH).
OvenMediaEngine will support Low-Latency HLS in the near future. We are monitoring an Apple's situation.
To use HLS, Dash and LLDash, you need to add the <HLS>
and<DASH>
elements to the <Publishers>
in the configuration as shown in the following example.
Most browsers and players prohibit accessing other domain resources in the currently running domain. You can control this situation through Cross-Origin Resource Sharing (CORS) or Cross-Domain (CrossDomain). You can set CORS and Cross-Domain as <CrossDomain>
element.
You can set it using the <Url>
element as shown above, and you can use the following values:
LLDASH, DASH and HLS Streaming are ready when a live source is inputted and a stream is created. Viewers can stream using OvenPlayer or other players.
Also, you need to set H.264 and AAC in the Transcoding profile because MPEG-DASH and HLS use these codecs.
When you create a stream as shown above, you can play LLDASH, DASH and HLS through OvenPlayer with the following URL:
If you use the default configuration, you can start streaming with the following URL:
https://[OvenMediaEngine IP]:80/app/<stream name>_o/playlist.m3u8
http://[OvenMediaEngine IP]:80/app/<stream name>_o/playlist.m3u8
https://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest.mpd
http://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest.mpd
https://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest_ll.mpd
http://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest_ll.mpd
We have prepared a test player that you can quickly see if OvenMediaEngine is working. Please refer to the Test Player for more information.
OvenMediaEngine supports live sources from RTMP, a real-time messaging protocol supported by most popular encoders such as OBS, XSplit, and others.
Providers
ingests streams that comes from media source. OvenMediaEngine supports RTMP protocol. You can set it in the configuration as follows:
When a live source inputs to the <Application>
, a stream is automatically created in the <Application>
. The created stream is passed to Encoder and Publisher.
If you set up a live stream using an RTMP-based encoder, you need to set the following in Server.xml
:
<BlockDuplicateStreamName>
is a policy for streams that are inputted as overlaps.
<BlockDuplicateStreamName>
works with the following rules:
To allow duplicated stream name feature can cause several problems. When a new stream is input, the player may be disconnected. Most encoders has the ability to automatically reconnect when it is disconnected from the server. As a result, two encoders compete and disconnect each other, which can cause serious problems in playback.
If you want to publish the source stream, you need to set the following in the Encoder:
URL
RTMP://<OvenMediaEngine IP>[:<RTMP Listen Port>]/<App Name]>
Stream Key
Stream Name
If you use the default configuration, the <RTMP><ListenPort>
is 1935, which is the default port for RTMP. So it can be omitted. Also, since the Application named app
is created by default in the default configuration, you can enter app
in the [App Name]
. You can define a Stream Key and use it in the Encoder, and the Streaming URL will change according to the Stream Key.
Moreover, some encoders can include a stream key in the URL, and if you use these encoders, you need to set it as follows:
URL
RTMP://<OvenMediaEngine IP>[:<RTMP Listen Port>/<App Name>/<Stream Name>
If you use the default configuration, set the OBS as follows:
You can set the Stream Key to any name you like at any time.
If you use the default configuration, you can stream with the following streaming URLs when you start broadcasting to OBS:
WebRTC
ws://192.168.0.1:3333/app/stream_o
HLS
http://192.168.0.1:8080/app/stream_o/playlist.m3u8
MPEG-DASH
http://192.168.0.1:8080/app/stream_o/manifest.mpd
OvenMediaEngine has embedded live transcoder. The live transcoder can decode the incoming live source and encode it to the appropriate codec to be published or can encode it in multi bitrates by adjusting the quality.
OvenMediaEngine currently supports the following codecs:
You can re-encode the incoming video source through the <Encode>
setting and make the encoded video and audio into a new stream. The newly created stream can be used according to the streaming URL format.
By the above setting, Video and Audio encoded with <Encode><Name>
of FHD and HD are newly created and included in <Stream><Name>
named ${OriginStreamName}_o
. In other words, if a stream inputted as app/stream
is transcoded, <Stream><Name>
named stream_o
is created.
Also, the newly created stream is used in the following URL format:
WebRTC
ws://192.168.0.1:3333/app/stream_o
HLS
http://192.168.0.1:8080/app/stream_o
/playlist.m3u8
MPEG-DASH
http://192.168.0.1:8080/app/stream_o
/manifest.mpd
Low-Latency MPEG-DASH
http://192.168.0.1:8080/app/stream_o
/manifest_ll.mpd
You can set the video profile as below:
The meaning of each property is as follows:
You can set the audio profile as below:
The meaning of each property is as follows:
You can configure Video and Audio to bypass transcoding as follows:
You need to consider codec compatibility with some browsers. For example, chrome only supports OPUS codec for audio to play WebRTC stream. If you set to bypass incoming audio, audio will not play on chrome.
WebRTC does not support AAC, so if video bypasses transcoding, audio must be encoded in opus.
Even if you set up multiple codecs, there is a codec that matches each streaming protocol supported by OME, so it can automatically select and stream codecs that match the protocol. However, if you do not set a codec that matches the streaming protocol you want to use, it will not be streamed.
The following is a list of codecs that match each streaming protocol:
Therefore, you set it up as shown in the table. If you want to stream using HLS or MPEG-DASH, you need to set up H.264 and AAC, and if you want to stream using WebRTC, you need to set up Opus.
Also, if you are going to use WebRTC on all platforms, you need to configure both VP8 and H.264. This is because different codecs are supported for each browser, for example, VP8 only, H264 only, or both.
However, you do not worry. If you set the codecs correctly, OME automatically sends the stream of codecs requested by the browser.
Currently, OME does not support adaptive streaming on HLS, MPEG-DASH. However, it will be updated soon.
OvenMediaEngine uses WebRTC to provide sub-second latency streaming. WebRTC uses RTP for media transmission and provides various extensions.
OvenMediaEngine provides the following features:
If you want to use the WebRTC feature, you need to add <WebRTC>
element to the <Publishers>
and <Ports> in the Server.xml
configuration file, as shown in the example below.
WebRTC uses ICE for connections and specifically NAT traversal. The web browser or player exchanges the Ice Candidate with each other in the Signalling phase. Therefore, OvenMediaEngine provides an ICE for WebRTC connectivity.
If you set IceCandidate to *: 10000-10005/udp
, as in the example above, OvenMediaEngine automatically gets IP from the server and generates IceCandidate
using UDP ports from 10000 to 10005. If you want to use specific IP as IceCandidate, specify a specific IP. You can also use only one 10000 UDP Port, not a range, by setting it to *: 10000.
OvenMediaEngine has embedded a WebSocket-based signalling server and provides our defined signalling protocol. Also, OvenPlayer supports our signalling protocol. WebRTC requires signalling to exchange Offer SDP and Answer SDP, but this part is not standardized. If you want to use SDP, you need to create your exchange protocol yourself.
If you want to change the signaling port, change the value of <Ports><WebRTC><Signalling>
.
The Signalling protocol is defined in a simple way:
If you want to use a player other than OvenPlayer, you need to develop the signalling protocol as shown above and can integrate OvenMediaEngine.
Add WebRTC
element to Publisher to provide streaming through WebRTC.
WebRTC Streaming starts when a live source is inputted and a stream is created. Viewers can stream using OvenPlayer or players that have developed or applied the OvenMediaEngine Signalling protocol.
Also, the codecs supported by each browser are different, so you need to set the Transcoding profile according to the browser you want to support. For example, Safari for iOS supports H.264 but not VP8. If you want to support all browsers, please set up VP8, H.264 and Opus codecs in all transcoders.
WebRTC does not support AAC, so when trying to bypass transcoding RTMP input, audio must be encoded as opus. See the settings below.
Some browsers support both H.264 and VP8 to send Answer SDP to OvenMediaEngine, but sometimes H.264 cannot be played. In this situation, if you write the VP8 above the H.264 code line in the Transcoding profile setting, you can increase the priority of the VP8.
Using this manner so that some browsers, support H.264 but cannot be played, can stream smoothly using VP8. This means that you can solve most problems with this method.
If you created a stream as shown in the table above, you can play WebRTC on OvenPlayer via the following URL:
If you use the default configuration, you can stream to the following URL:
ws://[OvenMediaEngine IP]:3333/app/stream_o
wss://[OvenMediaEngine IP]:3333/app/stream_o
We have prepared a test player to make it easy to check if OvenMediaEngine is working. Please see the Test Player chapter for more information.
OvenMediaEngine provides docker image to Docker Hub in the airensoft/ovenmediaengine repository. After installing Docker, you can simply run the following command:
You can set the following environment variables.
OvenMediaEngine works in concert with a variety of open source and library. First, install them on your clean Linux machine as described below. We think that OvenMediaEngine can support most Linux packages, but the tested platforms we use are Ubuntu 18+, Fedora 28+, and CentOS 7+.
If the prerequisites.sh script fails, proceed with the manual installation.
You can build OvenMediaEngine sources using the following command.
In addition, we recommend that you permanently set environment variables as follows.
if systemctl start ovenmediaengine
fails in Fedora, selinux may be the cause. See Check SELinux section of Troubleshooing.
The default configuration uses the following ports, so you need to open them in your firewall settings.
You can open the port of the firewall as shown in the following example.
You can live streaming using live encoders such as OBS, XSplit. Please set the RTMP URL as below:
rtmp://<Server IP>[:<RTMP Port>]/<Application name>/<Stream name>
The meanings of each item are as follows:
<Server IP>
: The IP address or domain of the OvenMediaEngine server.
<RTMP Port>
: You can use <Port>
of <Provider>
in the above Server.xml
file. If you use the default configuration, the RTMP default port (1935) is used. Also, If you set the default port, you can omit the port.
<Application name>
: This value corresponds to <Name>
of <Application>
in conf/Server.xml
. If you use the default configuration, you can use the app
.
<Stream name>
: The name of the stream you defined.
After you enter the above RTMP URL into the encoder and start publishing, you will have an environment in which the player can view the live stream.
The server address in OBS needs to use the <Application name>
generated in Server.xml
. If you use the default configuration, the app
has already been created, and you can use it.
Install OBS on your PC and run it.
Click "File" in the top menu, then "Settings" (or press "Settings" on the bottom-right).
Select the "Stream" tab and fill in the settings.
Go to the "Output" tab.
Set the following entries.
For lower latency we recommend you to use Hardware Encoder as follows. NVENC provides a Low-Latency preset, which encodes with very low latency. Setting the MAX B-bframe to 0 is also important for lower latency.
If Hardware Encoder is not installed in your PC, it is recommended to set x264 as follows. We highly recommend setting bframes = 0 for lower latency. And set the threads= option to 8 or less. Chrome does not handle more than 10 Nal Units. Setting threads=8 is the best way to avoid this.
We recommend checking the "Enable new networking code" and "Low latency mode" as follows.
We have prepared a test player so that you can easily check that the OvenMediaEngine is working well. For more information, see the Test Player chapter.
Please note that the WebRTC Signalling URL is similar to the RTMP URL and consists of the following:
ws://<Server IP>:[<Signalling Port>/<Application name>/<Output Stream name>
<Server IP>
: The IP address or domain of the OvenMediaEngine server.
<Signalling Port>
: You can use the value of <Signalling><ListenPort>
in Server.xml
above. If you use the default configuration, the WebRTC signalling default port (3333) is used.
<Application name>
: This value corresponds to <Name>
of <Application>
in conf/Server.xml
. If you use the default configuration, you can use the app
.
<Output Stream name>
: You have to use an output stream name for streaming. If you are using the default configuration, an output stream named <Stream Name>_o
is automatically generated when stream is input.
If you use the default configuration, and the RTMP publishing URL is rtmp://192.168.0.1:1935/app/stream
,
WebRTC URL will be
ws://192.168.0.1:3333/app/stream_o
In addition,
HLS streaming URLwill be
:
http://192.168.0.1/app/stream_o/playlist.m3u8
MPEG-Dash streaming URL :
http://192.168.0.1/app/stream_o/manifest.mpd
Low-Latency MPEG-Dash streaming URL :
http://192.168.0.1/app/stream_o/manifest_ll.mpd
If you want to build OvenPlayer in your environment, see OvenPlayer Quick Start.
Most browsers can not load resources via HTTP and WS (WebSocket) from HTTPS web pages secured with TLS. Therefore, if the player is on an HTTPS page, the player must request streaming through https and wss URLs secured with TLS. In this case, you must apply the TLS certificate to the OvenMediaEngine.
You can set the port for TLS in TLSPort
. Currently, only HLS, DASH, and WebRTC Signaling support TLS.
Add your certificate files to as follows:
To configure an HTTPs for HLS, DASH and WebRTC Signalling servers, the TLS element must be enabled. The CertPath has to indicate server certificate and the KeyPath has to indicate private key file. They can be set to absolute paths or relative paths from the executable. If the server certificate is issued using intermediate certificate, some browsers may complain about a certificate. In this case, you should set a bundle of chained certificates provided by a Certificate Authority in ChainCertPath.
If you set up TLS, you cannot set IP or * into <Name>. You can only set Domains that the certificate contains. If you have a certificate for *.host.com, it means you can set domains such as aaa.host.com, bbb.host.com and * .host.com.
If the certificate settings are completed correctly, WebRTC streaming can be played wss://url
with HLS and DASH streaming https://url
.
The current version of OvenMediaEngine does not yet support SNI. This means that you cannot set multiple TLS. So currently OvenMediaEngine can only set TLS on the first VirtualHost. We will support SNI next version.
OvenMediaEngine supports clustering and ensures high availability (HA) and scalability.
OvenMediaEngine supports the Origin-Edge structure for cluster configuration and provides scalability. Also, you can set Origin as Primary
and Secondary
in OvenMediaEngine for HA.
The OvenMediaEngine running as edge pulls a stream from external server when an user requests it. The external server could be another OvenMediaEngine with OVT enabled or another stream server that supports RTSP.
OvenMediaEngine provides OVT protocol for passing streams from the origin to the edge. To run OvenMediaEngine as Origin, OVT port and OVT Publisher must be enabled as follows :
The role of the edge is to receive and distribute streams from an origin. You can configure hundreds of Edge to distribute traffic to your players. As a result of testing, a single edge can stream 4-5Gbps traffic by WebRTC based on AWS C5.2XLarge. If you need to stream to thousands of people, you can configure and use multiple edges.
The edge supports OVT and RTSP to pull stream from an origin. In the near future, we will support more protocols. The stream pulled through OVT or RTSP are bypassed without being encoded.
In order to re-encode the stream created by OVT and RTSP, the function to put into existing application will be supported in the future.
To run OvenMediaEngine as Edge, you need to add Origins elements to the configuration file as follows:
The <Origin>
is a rule about where to pull a stream from for what request.
The <Origin>
has the ability to automatically create an application with that name if the application you set in <Location>
does not exist on the server. If an application exists in the system, a stream will be created in the application.
The automatically created application by <Origin>
enables all providers but if you create an application yourself, you must enable the provider that matches the setting as follows.
For a detailed description of Origin's elements, see:
Origin is already filtered by domain because it belongs to VirtualHost. Therefore, in Location, set App, Stream, and File to match except domain area. If a request matches multiple Origins, the top of them runs.
Pass consists of Scheme and Url.
<Scheme>
is the protocol that will use to pull from the Origin Stream. It currently can be configured as OVT
or RTSP
.
If the origin server is OvenMediaEngine, you have to set OVT
into the <Scheme>
.
You can pull the stream from the RTSP server by setting RTSP
into the<Scheme>
. In this case, the <RTSPPull>
provider must be enabled. Applicaiton automatically generated by Origin does not need to worry because all providers are enabled.
Urls
is the address of origin stream and can be consisted of multiple Url.
The final address to be requested by OvenMediaEngine is generated by combining the configured Url and user's request except of Location. For example, if the following is set
The OVT is a protocol defined by OvenMediaEngine to relay stream between Origin-Edge and OVT can be run over SRT and TCP. For more information on the SRT Protocol, please visit the site.
If a user requests , OvenMediaEngine makes an address to ovt: //origin.com: 9000/origin_app/stream.
When you are configuring Load Balancer, you need to use third-party solutions such as L4 Switch, LVS, or GSLB, but we recommend using DNS Round Robin. Also, services such as cloud-based , , or can be a good alternative.
Title
Functions
Delivery
HTTP for HLS and DASH HTTP 1.1 chunked transfer for LLDash
Security
TLS (HTTPS)
Format
TS for HLS
ISOBMFF for DASH
CMAF for LLDASH
Codec
H.264, AAC
Element
Decsription
Bind
Set the HTTP port to provide HLS and DASH. LLDASH and DASH are provided on the same port, and DASH and HLS can be set to the same port.
SegmentDuration
Set the length of the segment in seconds. The shorter the <SegmentDuration>
, the lower latency can be streamed, but it is less stable during streaming. Therefore, we are recommended to set it to 3 to 5 seconds.
SegmentCount
Set the number of segments to be exposed to *.mpd
. The smaller the number of <SegmentCount>
, the lower latency can be streamed, but it is less reliable during streaming. Therefore, it is recommended to set this value to 3.
It does not need to set SegmentCount for LLDASH because LLDASH only has one segment on OvenMediaEngine.
CrossDomain
Control the domain in which the player works through <CorssDomain>
. For more information, please refer to the CrossDomain section.
Url Value
Decsription
*
Allows requests from all Domains
domain
Allows both HTTP and HTTPS requests from the specified Domain
http://domain
Allows HTTP requests from the specified Domain
https://domain
Allows HTTPS requests from the specified Domain
Protocol
URL format
LLDASH
http://<Server IP>[:<DASH Port]/<Application Name>/<Stream Name>/manifest_ll.mpd
Secure LLDASH
https://<Domain>[:<DASH Port]/<Application Name>/<Stream Name>/manifest_ll.mpd
DASH
http://<Server IP>[:<DASH Port]/<Application Name>/<Stream Name>/manifest.mpd
Secure DASH
https://<Domain>[:<DASH Port]/<Application Name>/<Stream Name>/manifest.mpd
HLS
http://<Server IP>[:<HLS Port]/<Application Name>/<Stream Name>/playlist.m3u8
Secure HLS
https://<Domain>[:<HLS Port]/<Application Name>/<Stream Name>/playlist.m3u8
Value
Description
true
Default
Rejects the new stream inputted as overlap and maintains the existing stream.
false
Accepts a new stream inputted as overlap and disconnects the existing stream.
Video Decoding
Audio Decoding
Video Encoding
Audio Encoding
H.264 (Baseline)
AAC
H.264 (Baseline)
AAC
VP8
Opus
Property
Description
Codec
Specifies the vp8
or h.264
codec to use
Width
Width of resolution
Height
Height of resolution
Bitrate
Bit per second
Framerate
Frames per second
Property
Description
Codec
Specifies the opus
or aac
codec to use
Bitrates
Bits per second
Samplerate
Samples per second
Channel
The number of audio channels
Protocol
Supported Codec
WebRTC
VP8, H.264, Opus
HLS
H.264, AAC
Low-Latency MPEG-Dash
H.264, AAC
Title
Functions
Delivery
RTP / RTCP
Security
DTLS, SRTP
Connectivity
ICE
Error Correction
ULPFEC (VP8, H.264), In-band FEC (Opus)
Codec
VP8, H.264, Opus
Signalling
Self-Defined Signalling Protocol and Embedded Web Socket-Based Server
Protocol
URL format
WebRTC Signalling
http://<Server IP>[:<Signalling Port]/<Application name>/<Stream name>
Secure WebRTC Signalling
https://<Server IP>[:<Signalling Port]/<Application name>/<Stream name>
Env
Default Value
OME_ORIGIN_PORT
9000
OME_RTMP_PROV_PORT
1935
OME_HLS_PUB_PORT
8080
OME_DASH_PUB_PORT
8080
OME_ICE_CANDIDATES
*:10000-10005/udp
OME_SIGNALLING_PORT
3333
Env
Default Value
OME_AUDIO_BITRATE
128000
OME_AUDIO_SAMPLERATE
48000
OME_AUDIO_CHANNEL
2
OME_VIDEO_WIDTH
640
OME_VIDEO_HEIGHT
360
OME_VIDEO_BITRATE
500000
OME_VIDEO_FRAMERATE
30
Port
Purpose
1935/TCP
RTMP Input
9000/UDP
Origin Listen
80/TCP
HLS & MPEG-Dash Streaming
3333/TCP
WebRTC Signalling
10000 - 10005/UDP
WebRTC Ice candidate
prerequisites.sh
Script FailedIf you have problems with the prerequisites.sh
script we have provided, please install it manually as follows.
systemctl start ovenmediaengine
failedIf SELinux is running on your system, SELinux can deny execution of OvenMediaEngine.
You can choose between two methods of adding a policy to SELinux or setting SELinux to permissive mode. To add a policy, you must apply the SELinux policy file for the OvenMediaEngine service to your system as follows:
Setting SELinux to permissive mode is as simple as follows. But we do not recommend this method.
To monitor the OvenMediaEngine, you can view in real time the log files generated by the itself. You can configure log type and level by creating Logger.xml configuration file in the same location as Server.xml.
You can set up Logger.xml as shown in the following example: OvenMediaEngine prints logs separated by many tag names ans levels. Set <Tag name=".*" level="debug">
to have OvenMediaEngine print all logs and read the logs. And then it's better to disable tags that you don't need.
OvenMediaEngine generates log files. If you start OvenMediaEngine by systemctl start ovenmediaengine
, the log file is generated to the following path.
If you run it directly from the command line, it will be generated to the following location:
If you run it in docker container, the log file is in the following path:
Following is the example of real logs.
OvenMediaEngine collects following metrics for each host, application, and stream.
Bytes in/out by protocol
Connections by protocol
Maximum connections and time
Time taken to connect to origin
This is available through the mon::Monitoring class, and we use this information to generate various log files. OvenMediaEngine outputs various statistics through log files. OvenMediaEngine now prints logs for WebRTC and HTTP based streamings, but its format is for a specific purpose and is not standardized. This will be standardized in future 1.0 and will be published throughout this manual.
Currently, OvenMediaEngine outputs statistics like this:
The statistics logs are mostly different because they are collected from Bigdata's collection system and output for various purposes. OvenMediaEngine is open source, so you have the flexibility to respond in such situations. OME keeps all the metrics for Vhost, App, and Stream in the Monitoring Class, so anyone can use them.
We provide you our test player to make sure that OvenMediaEngine works well. Most browsers prohibit access to TLS-based HTTPS site through unsecured HTTP or WebSocket (WS) for security reasons. Thus, we have prepared the HTTP or HTTPS based player as follows:
When playing Low-Latency DASH, you can control the delay time in the player as shown below. Delay time is closely related to the buffering size. The smaller the value, the shorter the latency, but if it is too small, there is no buffer and playback may not be smooth. In normal network environment, it is most stable to give 2 as the delay value.
OvenMediaEngine provides P2P Delivery to be able to distribute Edge Traffic to Player. This feature is currently the Preview version, and if you want to use it, you need only to use OvenPlayer. Moreover, we plan to perform more experiments in various real-world and then upgrade it to the full version in OvenMediaEngine.
First of all, we have rules. The peer that sends the Traffic in the P2P network is called a Host Peer, and the peer that receives the Traffic from the Host Peer is called a Client Peer. Also, P2P Delivery in OvenMediaEngine does not designate the Client Peer as the Host Peer again. In other words, it only operates as 1 Depth.
According to our experiments so far, P2P Delivery provides the best performance and stability when using 1 Depth to connect between Players and connecting up to two Players to one Player.
In other words, P2P Delivery has distributed two-thirds of existing Traffic. So, this means that it can expand the Capacity of the Edge Network by three times and reduce Traffic costs by two-thirds.
You can use the P2P function of OvenMediaEngine by adding the <P2P>
element as the following settings:
Also, If you want to use P2P Delivery when your OvenMediaEngine is running in Origin-Edge Cluster Mode, you need to apply this setting to all the Edges. You can instantly test P2P Delivery with OvenPlayer.
<MaxClientPeersPerHostPeer>
sets the number of Client Peers connecting to one Host Peer.
When OvenMediaEngine receives a WebRTC connection request from a new player, it determines the Host Peer or Client Peer according to the following rules:
When any Host Peer is disconnected, OvenMediaEngine detects this situation and immediately reconnects the Client Peer connected to that Host Peer to the Edge to ensure stability.
Also, we are preparing a smarter algorithm based on user location, platform performance, and network statistical information for classifying Host Peers or Client Peers.
If you have a better idea, we hope that you improve our code and contribute to our project. Please visit OvenMediaEngine GitHub.
Our goal is to make it easier for you to build a stable broadcasting/streaming service with Ultra-Low Latency.
RTMP Input
WebRTC sub-second streaming
Embedded WebRTC Signalling Server (WebSocket based)
ICE (Interactive Connectivity Establishment)
DTLS (Datagram Transport Layer Security)
SRTP (Secure Real-time Transport Protocol)
ULPFEC (Forward Error Correction) with VP8, H.264
In-band FEC (Forward Error Correction) with Opus
Low-Latency MPEG-DASH streaming (Chunked CMAF)
Legacy HLS/MPEG-DASH streaming
Embedded Live Transcoder (VP8, H.264, Opus, AAC, Bypass)
Origin-Edge structure
Monitoring
Experiment
P2P Traffic Distribution
RTSP Pull, MPEG-TS Push Input
We have tested OME on the platforms listed below. However, we think it can work with other Linux packages as well:
Ubuntu 18
CentOS 7
Fedora 28
Basic Information, FAQ, and Benchmark
Getting Started, Install, and Configuration
Test Player
OvenMediaEngine (OME) is an open-source, streaming server with sub-second latency. OME receives video via RTMP or other protocols from live encoders such as OBS, XSplit and transmits it on WebRTC and Low-Latency DASH. So, sub-second latency streaming from OME can work seamlessly in your browser without plug-ins. Also, OME provides , the HTML5 standard web player.
Docker ()
Please read chapter in tutorials.
Without TLS
:
Based on TLS
:
Please see our and .
OvenMediaEngine is under the .
Site URL
Description
Player without TLS that can test all streaming URLs such as WS://
, WSS://
, HTTP://
, HTTPS://
Player with TLS that can only test WSS://
and HTTPS://
based streaming URLs
Qualification for Host Peer
Qualification for Client Peer
Device is not Mobile
OS is not Linux
Browser is not MS Edge Browser
Browser is not Unknown Browser
One of the Host Peers uses the same kind of browser
Host Peer is vacant