Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The OME Docker Launcher is a tool that simplifies the process of deploying and managing the OvenMediaEngine (OME) application using Docker containers. This tool can be used by developers and system administrators who want to quickly deploy and test the OME application in a Docker environment.
The OME Docker Launcher provides a set of commands that allow users to easily manage the OME Docker container. These commands include:
This command pulls the OME Docker image(airensoft/ovenmediaengine:latest
) from the Docker registry and copies the necessary configuration files to a specified location. This command needs to be run before starting the OME Docker container.
This command creates and starts the Docker container. Once the container is started, the OME application can be accessed through a web browser using the container's IP address.
This command launches a bash shell inside the running OME Docker container, allowing users to execute commands and interact with the container.
This command displays the status of the running OME Docker container, including information such as the container name, and running status.
This command stops the running OME Docker container.
This command stops and then starts the OME Docker container.
Using the OME Docker Launcher, you can easily set up and manage an OME Docker container, without having to manually configure and manage the Docker container. This can save time and effort, especially for users who are not familiar with Docker or who do not want to spend time manually setting up and configuring the OME application.
OME Docker Launcher has not been tested in various environments yet. Therefore, sharing any issues that occur while using it is always welcome.
Run the following command in your Linux shell.
Below is an example of execution:
OME Docker Launcher can be executed in the following format:
setup
The setup
command pulls the OME Docker image from the Docker registry and copies the necessary configuration files to the host's /usr/share/ovenmediaengine
directory. Additionally, it initializes the log path and crash dump path that will be mounted into the container when it is run.
This command prepares the host environment for running the OME Docker container and sets up the necessary directories and configurations for the container to run correctly.
If you run the "setup" command, the following files and directories will be created:
/usr/share/ovenmediaengine/conf
This directory contains the OME configuration files and is mounted into the container when it is run.
/usr/share/ovenmediaengine/logs
This directory is the log path for OME and is mounted into the container when it is run. Log files generated by OME will be stored in this directory.
/usr/share/ovenmediaengine/dumps
This directory is the crash dump path for OME and is mounted into the container when it is run. Crash dumps generated by OME will be stored in this directory.
If you want to change the configuration of OME, you can edit the /usr/share/ovenmediaengine/conf/Server.xml
file. This file contains the server configuration settings for OME, such as the server's IP address, port, and SSL settings. Once you have made changes to this file, you will need to restart the OME Docker container for the changes to take effect. You can do this by running the restart
command provided by the OME Docker Launcher.
To install a certificate in OvenMediaEngine, copy the certificate files to /usr/share/ovenmediaengine/conf with the following names:
Certificate
cert.crt
Private Key
cert.key
CA Bundle
cert.ca-bundle
If you want to change the file names, you can modify Server.xml.
start
Once the setup
phase is complete, you can use the start
command to run the OME Docker container. The start
command creates and starts the Docker container, enabling the OME application to receive stream packets using protocols such as RTMP and SRT. Before running the start
command, ensure that the necessary configuration files have been copied to the host's /usr/share/ovenmediaengine
directory by running the setup
command.
When running the OME Docker Launcher, you can specify the IP to be used as an ICE Candidate by using the OME_HOST_IP
environment variable. For instance, specifying the OME_HOST_IP
as shown below will propagate the ICE Candidate to that particular address.
The OME Docker Launcher automatically detects a list of port numbers specified in the Server.xml
file and passes them to the Docker -p
option. However, if you use the include
attribute inside the <Providers>
or <Publishers>
element, the launcher may not detect them correctly.
If you have declared the following environment variable in the shell where you run the OME Docker Launcher, this value will be used to bind the port and passed into the Docker container. This enables you to dynamically set configuration values using environment variables.
sh
The sh
command allows you to enter into the shell of the running container. You can use this command for troubleshooting purpose. Once you enter into the container's shell, you can execute any commands just like you do in a normal Linux shell. This allows you to inspect the container's internal state and debug any issues that you might be facing with the container or the application running inside it.
status
The status
command shows the current execution status of the container. If the container is running, it displays the ID and name of the container. This command helps you to verify whether the container is up and running or not. If the container is not running, you can use the start
command to start the container.
stop
The stop
command stops the running container and removes it from the list of Docker containers.
restart
The restart
command restarts the container. This is useful when you need to apply changes to the Server.xml
.
If you encounter any problems during the execution, try using the -d
option in the [OPTIONS]
to view detailed logs. This option shows the command sets and their results that are executed internally.
If OME terminates abnormally, providing the crash dump to the OME team can be helpful. The crash dump is stored in the /usr/share/ovenmediaengine/dumps
directory, which is created during the setup
phase. You can find the dump file named crash_<yyyymmdd>.dump
in this directory.
Sharing those log and dump file would be greatly appreciated and helpful for the development of OME.
Most browsers can't 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.
To link certificates from your Docker host, uncomment the example in the Docker compose file or manually connect a volume in the Docker run command, e.g. -v ~/local/cert/path:/opt/ovenmediaengine/bin/certs You can set the port for TLS in TLSPort
. Currently, LLHLS and WebRTC Signaling support TLS.
Add your certificate files to as follows:
To enable HTTP for HLS and WebRTC signaling servers, you must enable the TLS element and install the certificate file in PEM format. This involves indicating a server certificate through the CertPath
, as well as a private key file through the KeyPath
. These paths can be specified as either absolute or relative paths from the executable. However, if the server certificate was issued using an intermediate certificate, some browsers may raise concerns about the certificate's authenticity. To address this, a bundle of chained certificates provided by a Certificate Authority can be set in the ChainCertPath
.
Assuming the certificate settings are correctly configured, WebRTC streaming can then be played via the wss://url protocol, while LLHLS streaming can be accessed via https://url.
If you used certbot to create your certificates, the PEM files it creates can be linked in your Server.xml like this:
OvenMediaEngine provides Docker images from AirenSoft's Docker Hub (airensoft/ovenmediaengine) repository. You can easily use OvenMediaEngine server by using Docker image. See Getting Started with Docker for details.
OvenMediaEngine can work with a variety of open-sources and libraries. First, install them on your clean Linux machine as described below. We think that OME can support most Linux packages, but the tested platforms we use are Ubuntu 18+, Fedora 28+, Rocky Linux 9+, and AlmaLinux 9+.
If the prerequisites.sh script fails, try to run sudo apt-get update
and rerun it. If it's not enough proceed with the manual installation.
You can build the OvenMediaEngine source using the following command:
if systemctl start ovenmediaengine
fails in Fedora, SELinux may be the cause. See Check SELinux section of Troubleshooting.
The default configuration uses the following ports, so you need to open it in your firewall settings.
1935/TCP
RTMP Input
9999/UDP
SRT Input
4000/UDP
MPEG-2 TS Input
9000/TCP
Origin Server (OVT)
3333/TCP 3334/TLS
LLHLS Streaming * Streaming over Non-TLS is not allowed with modern browsers.
3333/TCP 3334/TLS
WebRTC Signaling (both ingest and streaming)
3478/TCP
WebRTC TCP relay (TURN Server, both ingest and streaming)
10000 - 10009/UDP
WebRTC Ice candidate (both ingest and streaming)
To use TLS, you must set up a certificate. See TLS Encryption for more information.
You can open firewall ports as in the following example:
We provide online demos of OvenPlayer(WebRTC/LLHLS Player) and OvenLiveKit(WebRTC Live Encoder) so that users can easily test out OvenMediaEngine.
To connect to your OvenMediaEngine in the online demo, you will need to install a certificate and use either the HTTPS or WSS protocol. Unsecured HTTP or WS protocols could not work in online demos due to browser security policies.
Site URL
Description
OvenPlayer demo (TLS not enabled)
OvenPlayer demo
OvenLiveKit (WebRTC Live Encoder) demo
OvenSpace offers a fast and easy way to experience the powerful tools of OvenMediaEngine, OvenPlayer, and OvenLiveKit in action.
With OvenSpace, you can quickly and easily stream content with sub-second latency using WebRTC technology, or take advantage of Apple's LLHLS specification to deliver low-latency live streaming. The platform allows you to stream from various sources, including your webcam, microphone, screen, or an external live encoder that supports RTMP and SRT.
OvenSpace is available online, so you can try it out for yourself at https://space.ovenplayer.com/. You'll get a hands-on experience of how OvenMediaEngine, OvenPlayer, and OvenLiveKit work together seamlessly to deliver top-quality streaming, whether you're a developer looking to build a media service or someone who wants to experience sub-second or low-latency streaming firsthand.
OvenSpace is also available on Github as open source. It will be a good reference when developing media services using OvenMediaEngine, OvenPlayer and OvenLiveKit.
This page provides the fastest way to check playback of WebRTC and LLHLS using OvenMediaEngine. For installation and detailed settings, please refer to other pages.
Run docker with the command below. OME_HOST_IP
must be an IP address accessible by the player.
Publish your live stream to OvenMediaEngine using a live encoder like OBS.
The RTMP publishing address is :
Server rtmp://Your.Docker.Host.IP:1935/app
Stream Key stream
The settings below are recommended for ultra-low latency.
Keyframe Interval
1s (DO NOT set it to 0)
CPU Usage Preset
ultrafast
Profile
baseline
Tune
zerolatency
Open the installed OvenPlayer Demo page in your browser.
http://Your.Docker.Host.IP:8090/
Add ws://Your.Docker.Host.IP:3333/app/stream
to the Playback URL and click the ADD SOURCE and LOAD PLAYER button to play the live stream with WebRTC.
Add http://Your.Docker.Host.IP:3333/app/stream/llhls.m3u8
to the Playback URL and click the ADD SOURCE and LOAD PLAYER button to play the live stream with LLHLS.
You can set the following environment variables.
When you need to install a certificate in OME or apply a complex configuration, you can do it by following the procedure below to modify Server.xml inside Docker.
OvenMediaEngine docker container loads configuration files from the following path.
There are many ways to change files inside a Docker container, but this document describes how to change them using Docker's bind mounts.
The command below will make your OvenMediaEngine docker container run with $OME_DOCKER_HOME/conf/Server.xml and $OME_DOCKER_HOME/conf/Logger.xml files on your host. It will also create $OME_DOCKER_HOME/logs/ovenmediaengine.log file.
OvenMediaEngine provides the Docker image from (airensoft/ovenmediaengine) repository. After installing , you can simply run the following command:
If a certificate is not installed in OvenMediaEngine, some functions (WebRTC Ingest, LLHLS playback) may not work due to the browser's security policy. Please refer to section to install the certificate.
Copy your PEM certificate files to the path below if you need to enable TLS. The destination file names must match if using the default configuration. If you want to change the file name, you can do so by editing the Server.xml configuration file. See for details.
OME_HOST_IP
*
OME_ORIGIN_PORT
9000
OME_RTMP_PROV_PORT
1935
OME_SRT_PROV_PORT
9999/udp
OME_MPEGTS_PROV_PORT
4000/udp
OME_LLHLS_STREAM_PORT
3333
OME_LLHLS_STREAM_TLS_PORT
3334
OME_WEBRTC_SIGNALLING_PORT
3333
OME_WEBRTC_SIGNALLING_TLS_PORT
3334
OME_WEBRTC_TCP_RELAY_PORT
3478
OME_WEBRTC_CANDIDATE_PORT
10000-10004/udp
Server.xml
/opt/ovenmediaengine/bin/origin_conf/Server.xml
Logger.xml
/opt/ovenmediaengine/bin/origin_conf/Logger.xml
Server Certificate
/opt/ovenmediaengine/bin/origin_conf/cert.crt
Server certificate file in PEM format. The intermediate certificate must not be included.
Private Key
/opt/ovenmediaengine/bin/origin_conf/cert.key
This is the private key file of the certificate.
CA Bundle
/opt/ovenmediaengine/bin/origin_conf/cert.ca-bundle
A file containing root and intermediate certificates.
User can send video/audio from web browser to OvenMediaEngine via WebRTC without plug-in. Of course, you can use any encoder that supports WebRTC transmission as well as a browser.
OvenMediaEngine supports self-defined signaling protocol and WHIP for WebRTC ingest.
You can set the port to use for signaling in <Bind><Provider><WebRTC><Signaling>
. <Port>
is for setting an unsecured HTTP port, and <TLSPort>
is for setting a secured HTTP port that is encrypted with TLS.
For WebRTC ingest, you must set the ICE candidates of the OvenMediaEnigne server to <IceCandidates>
. The candidates set in <IceCandate>
are delivered to the WebRTC peer, and the peer requests communication with this candidate. Therefore, you must set the IP that the peer can access. If the IP is specified as *, OvenMediaEngine gathers all IPs of the server and delivers them to the peer.
<TcpRelay>
means OvenMediaEngine's built-in TURN Server. When this is enabled, the address of this turn server is passed to the peer via self-defined signaling protocol or WHIP, and the peer communicates with this turn server over TCP. This allows OvenMediaEngine to support WebRTC/TCP itself. For more information on URL settings, check out WebRTC over TCP.
WebRTC input can be turned on/off for each application. As follows Setting enables the WebRTC input function of the application. The <CrossDomains>
setting is used in WebRTC signaling.
OvenMediaEnigne supports self-defined signaling protocol and WHIP for WebRTC ingest.
The signaling URL for WebRTC ingest uses the query string ?direction=send
as follows to distinguish it from the url for WebRTC playback. Since the self-defined WebRTC signaling protocol is based on WebSocket, you must specify ws[s] as the scheme.
ws[s]://<host>[:signaling port]/<app name>/<stream name>?direction=send
For ingest from the WHIP client, put ?direction=whip
in the query string in the signaling URL as in the example below. Since WHIP is based on HTTP, you must specify http[s] as the scheme.
http[s]://<host>[:signaling port]/<app name>/<stream name>?direction=whip
WebRTC transmission is sensitive to packet loss because it affects all players who access the stream. Therefore, it is recommended to provide WebRTC transmission over TCP. OvenMediaEngine has a built-in TURN server for WebRTC/TCP, and receives or transmits streams using the TCP session that the player's TURN client connects to the TURN server as it is. To use WebRTC/TCP, use transport=tcp query string as in WebRTC playback. See WebRTC/tcp playback for more information.
ws[s]://<host>[:port]/<app name>/<stream name>?direction=send&transport=tcp
http[s]://<host>[:port]/<app name>/<stream name>?direction=whip&transport=tcp
To use WebRTC/tcp, <TcpRelay>
must be turned on in <Bind>
setting.
If <TcpForce>
is set to true, it works over TCP even if you omit the ?transport=tcp
query string from the URL.
Simulcast is a feature that allows the sender to deliver multiple layers of quality to the end viewer without relying on a server encoder. This is a useful feature that allows for high-quality streaming to be delivered to viewers while significantly reducing costs in environments with limited server resources.
OvenMediaEngine supports webrtc simulcast since 0.18.0. OvenMediaEngine only supports simulcast with WHIP signaling, and not with OvenMediaEngine's own signaling. Simulcast is only supported with WHIP signaling, and is not supported with OvenMediaEngine's own defined signaling.
You can test this using an encoder that supports WHIP and simulcast, such as OvenLiveKit or OBS. You can usually set the number of layers as below, and if you use the OvenLiveKit API directly, you can also configure the resolution and bitrate per layer.
When multiple input video Tracks exist, it means that several Tracks with the same Variant Name are present. For example, consider the following basic OutputProfile and assume there are three input video Tracks. In this case, three Tracks with the Variant Name video_bypass
will be created:
How can we structure Playlists with multiple Tracks? A simple method introduces an Index
concept in Playlists:
VideoIndexHint
and AudioIndexHint
specify the Index of input video and audio Tracks, respectively.
However, when using the above configuration, if the encoder broadcasts 3 video tracks with Simulcast, it is inconvenient to change the configuration and restart the server to provide HLS/WebRTC streaming with 3 ABR layers. So I implemented a dynamic Rendition tool called RenditionTemplate.
The RenditionTemplate
feature automatically generates Renditions based on specified conditions, eliminating the need to define each one manually. Here’s an example:
This configuration creates Renditions for all bypassed videos and uses audio Tracks with the aac_audio
Variant Name.
The following macros can be used in the Name of a RenditionTemplate:
${Width}
| ${Height}
| ${Bitrate}
| ${Framerate}
| ${Samplerate}
| ${Channel}
You can specify conditions to control Rendition creation. For example, to include only videos with a minimum resolution of 280p and bitrate above 500kbps, or to exclude videos exceeding 1080p or 2Mbps:
We provide a demo page so you can easily test your WebRTC input. You can access the demo page at the URL below.
The getUserMedia API to access the local device only works in a secure context. So, the WebRTC Input demo page can only work on the https site **** https://demo.ovenplayer.com/demo_input.html. This means that due to mixed content you have to install the certificate in OvenMediaEngine and use the signaling URL as wss to test this. If you can't install the certificate in OvenMediaEngine, you can temporarily test it by allowing the insecure content of the demo.ovenplayer.com URL in your browser.
To create a custom WebRTC Producer, you need to implement OvenMediaEngine's Self-defined Signaling Protocol or WHIP. Self-defined protocol is structured in a simple format and uses the same method as WebRTC Streaming.
When the player connects to ws[s]://host:port/app/stream?direction=send through a web socket and sends a request offer command, the server responds to the offer sdp. If transport=tcp exists in the query string of the URL, iceServers information is included in offer sdp, which contains the information of OvenMediaEngine's built-in TURN server, so you need to set this in RTCPeerConnection to use WebRTC/TCP. The player then setsRemoteDescription and addIceCandidate offer sdp, generates an answer sdp, and responds to the server.
Starting from version OME v0.15.1, IPv6 is supported.
To use IPv6, you need to change the settings of the Server.xml
file as follows:
You can use /Server/IP
to support IPv6. In versions prior to v0.15.0, only one /Server/IP
setting could be specified, but in versions after v0.15.1, multiple settings can be specified. That is, if you add an /Server/IP
element for IPv6 to the existing configuration as follows, you can accept IPv6 requests from clients:
*
means 0.0.0.0
(INADDR_ANY
) in IPv4, and ::
means ::0
(in6addr_any
) in IPv6.
Of course, you can also specify a specific IP address of an interface instead of ::
.
OME listens to the 1935 port for RTMP as follows:
OME listens to the 1935 port for RTMP as follows:
OME listens to the 1935 port for RTMP as follows:
IceCandidates
(for WebRTC)When you specify IPv6 interface /Server/IP
, most Providers/Publishers will work with IPv6, but WebRTC will not. While the WebSocket server used as the WebRTC Signalling server works well with the above setting, but more setting is required for ICE Candidates that actually transmit/receive data.
To use IPv6 ICE Candidate, you need to add an IPv6 IceCandidate
to /Server/Bind/(Providers|Publishers)/WebRTC/IceCandidates
.
To support IPv6 in URL format settings, use [::]
instead of ::
The IceCandidate
settings for Providers and Publishers are the same.
By setting up as above, OME is ready to use ICE Candidates for IPv6 as well as IPv4. The ICE Candidate generated here can be viewed in the signaling step of the web browser.
<Origin>
Now you can set up the OME edge to look at an origin with an IPv6 IP address. To do this, you can set /Server/VirtualHosts/VirtualHost/Origins/Origin/Pass/Urls/Url
as follows:
This configuration creates a stream that refers an RTSP source provided on port 1234 of an origin which has an IPv6 address of 1:2:3:4:5:6:7:8
.
<AdmissionWebhooks>
You can also specify an IPv6 address for the server that AdmissionWebhooks
is using. To do this, set the value of /Server/VirtualHosts/VirtualHost/AdmissionWebhooks/ControlServerUrl
as follows:
The above configuration asks whether the client has the permission to publish or playback using http://[1:2:3:4:5:6:7:8]:7000/a/b/c
.
Our goal is to make it easier for you to build a stable broadcasting/streaming service with sub-second latency.
Ingest
Push: WebRTC, WHIP (Simulcast), SRT, RTMP, MPEG-2 TS
Pull: RTSP
Scheduled Channel (Pre-recorded Live)
Multiplex Channel (Duplicate stream / Mux tracks)
Adaptive Bitrate Streaming (ABR) for HLS, LLHLS and WebRTC
Low-Latency Streaming using LLHLS
DVR (Live Rewind)
Dump for VoD
ID3v2 timed metadata
DRM (Widevine, Fairplay)
Sub-Second Latency Streaming using WebRTC
WebRTC over TCP (with embedded TURN server)
Embedded WebRTC Signaling Server (WebSocket based)
Retransmission with NACK
ULPFEC (Uneven Level Protection Forward Error Correction)
VP8, H.264
In-band FEC (Forward Error Correction)
Opus
HLS (version 3) Streaming support for legacy devices
MPEG-2 TS Container
Audio/Video Muxed
DVR (Live Rewind)
Sub-Second Latency Streaming using SRT
Secure Reliable Transport
MPEG-2 TS Container
Audio/Video Muxed
Embedded Live Transcoder
Video: VP8, H.264, H.265(Hardware encoder only), Pass-through
Audio: Opus, AAC, Pass-through
Clustering (Origin-Edge Structure)
Monitoring
Access Control
AdmissionWebhooks
SignedPolicy
File Recording
Push Publishing using SRT, RTMP and MPEG2-TS (Re-streaming)
Thumbnail
REST API
We have tested OvenMediaEngine on platforms, listed below. However, we think it can work with other Linux packages as well:
Ubuntu 18+
Rocky Linux 9+
AlmaLinux 9+
Fedora 28+
Thank you so much for being so interested in OvenMediaEngine.
We always hope that OvenMediaEngine will give you good inspiration.
Test Player
(OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. With OME, you can create platforms/services/systems that transmit high-definition video to hundreds-thousand viewers with sub-second latency and be scalable, depending on the number of concurrent viewers.
OvenMediaEngine can receive a video/audio, video, or audio source from encoders and cameras such as , OBS, XSplit, and more, to WebRTC, SRT, RTMP, MPEG-2 TS, and RTSP as Input. Then, OME transmits this source using LLHLS (Low Latency HLS) and WebRTC as output. Also, we provide , an Open-Source and JavaScript-based WebRTC/LLHLS Player for OvenMediaEngine.
Docker ()
Please read chapter in the tutorials.
We need your help to keep and develop our open-source project, and we want to tell you that you can contribute in many ways. Please see our , , and .
Without TLS:
With TLS:
OvenMediaEngine is licensed under the . However, if you need another license, please feel free to email us at .
OvenMediaEngine can pull RTSP Stream in two ways. The first way is to use the Stream creation API, and the second way is to use OriginMap or OriginMapStore. The supported codecs are H.264, AAC(ADTS). Supported codecs will continue to be added.
You can create a stream by pulling an RTSP stream using the Stream Creation API. For more information on using the REST API, check out that chapter.
If OriginMapStore is configured and Redis Server provides an rtsp URL, OvenMediaEngine pulls the RTSP URL when a playback request comes in. Check out OriginMapStore for more details.
RTSP Pull is provided through OriginMap configuration. OriginMap is the rule that the Edge server pulls the stream of the Origin server. Edge server can pull a stream of origin with RTSP and OVT (protocol defined by OvenMediaEngine for Origin-Edge) protocol. See the Clustering section for more information about OVT.
For example, in the above setup, when a player requests "ws://ome.com/app_name/rtsp_stream_name" to stream WebRTC, it pulls the stream from "rtsp://192.168.0.200:554" and publishes it to WebRTC.
If the app name set in Location isn't created, OvenMediaEngine creates the app with default settings. The default generated app doesn't have an OPUS encoding profile, so to use WebRTC streaming, you need to add the app to your configuration.
Pulling type providers are activated by streaming requests from publishers. And by default, the provider is automatically disabled after 30 seconds of no client playback. If you want to change this setting, check out the Clustering chapter.
When a playback request comes in from the following URL, RTSP pull starts working according to Origins settings.
Protocol
URL
WebRTC
ws[s]:://host.com[:port]/app_name/rtsp_stream_name
LLHLS
http[s]://host.com[:port]/app_name/rtsp_stream_name/llhls.m3u8
OvenMediaEngine supports multiple protocols for input from various live sources, without compromising basic usability. This allows you to publish a variety of live sources with sub-second latency. See the sub-page for more information.
The <OutputProfile>
setting allows incoming streams to be re-encoded via the <Encodes>
setting to create a new output stream. The name of the new output stream is determined by the rules set in <OutputStreamName>
, and the newly created stream can be used according to the streaming URL format.
According to the above setting, if the incoming stream name is stream
, the output stream becomes stream_bypass
and the stream URL can be used as follows.
WebRTC
ws://192.168.0.1:3333/app/stream_bypass
LLHLS
http://192.168.0.1:8080/app/stream_bypass/llhls.m3u8
HLS
http://192.168.0.1:8080/app/stream_bypass/ts:playlist.m3u8
You can set the video profile as below:
Codec*
Type of codec to be encoded See the table below
Bitrate*
Bit per second
Name*
Encode name for Renditions No duplicates allowed
Width
Width of resolution
Height
Height of resolution
Framerate
Frames per second
KeyFrameInterval
Number of frames between two keyframes (0~600) default is framerate (i.e. 1 second)
BFrames
Number of B-frames (0~16) default is 0
Profile
H264 only encoding profile (baseline, main, high)
Preset
Presets of encoding quality and performance See the table below
ThreadCount
Number of threads in encoding
Lookahead
Number of frames to look ahead default is 0 x264 is 0-250
nvenc is 0-31 xma is 0-20
Modules
An encoder library can be specified; otherwise, the default codec See the table below
* required
Video
VP8
vp8
SW: libvpx*
H.264
h264
SW: openh264*, x264
HW: nv, xma
H.265 (Hardware Only)
h265
HW: nv, xma
A table in which presets provided for each codec library are mapped to OvenMediaEngine presets. Slow presets are of good quality and use a lot of resources, whereas Fast presets have lower quality and better performance. It can be set according to your own system environment and service purpose.
slower
QP( 10-39)
p7
best
slow
QP (16-45)
p6
best
medium
QP (24-51)
p5
good
fast
QP (32-51)
p4
realtime
faster
QP (40-51)
p3
realtime
References
https://trac.ffmpeg.org/wiki/Encode/VP8
https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/
You can set the audio profile as below:
Codec*
Type of codec to be encoded See the table below
Bitrate*
Bits per second
Name*
Encode name for Renditions No duplicates allowed
Samplerate
Samples per second
Channel
The number of audio channels
Modules
An encoder library can be specified; otherwise, the default codec See the table below
* required
It is possible to have an audio only output profile by specifying the Audio profile and omitting a Video one.
Audio
AAC
aac
SW: fdkaac*
Opus
opus
SW: libopus*
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, it can't play on chrome.
WebRTC doesn't support AAC, so if video bypasses transcoding, audio must be encoded in OPUS.
If the codec or quality of the input stream is the same as the profile to be encoded into the output stream. there is no need to perform re-transcoding while unnecessarily consuming a lot of system resources. If the quality of the input track matches all the conditions of BypassIfMatch, it will be Pass-through without encoding
Codec (Optional)
eq
Compare video codecs
Width (Optional)
eq, lte, gte
Compare horizontal pixel of video resolution
Height (Optional)
eq, lte, gte
Compare vertical pixel of video resolution
SAR (Optional)
eq
Compare ratio of video resolution
* eq: equal to / lte: less than or equal to / gte: greater than or equal to
Codec (Optional)
eq
Compare audio codecs
Samplerate (Optional)
eq, lte, gte
Compare sampling rate of audio
Channel (Optional)
eq, lte, gte
Compare number of channels in audio
* eq: equal to / lte: less than or equal to / gte: greater than or equal to
To support WebRTC and LLHLS, AAC and Opus codecs must be supported at the same time. Use the settings below to reduce unnecessary audio encoding.
If a video track with a lower quality than the encoding option is input, unnecessary upscaling can be prevented. SAR (Storage Aspect Ratio) is the ratio of original pixels. In the example below, even if the width and height of the original video are smaller than or equal to the width and height set in the encoding option, if the ratio is different, it means that encoding is performed without bypassing.
If you want to transcode with the same quality as the original. See the sample below for possible parameters that OME supports to keep original. If you remove the Width, Height, Framerate, Samplerate, and Channel parameters. then, It is transcoded with the same options as the original.
To change the video resolution when transcoding, use the values of width and height in the Video encode option. If you don't know the resolution of the original, it will be difficult to keep the aspect ratio after transcoding. Please use the following methods to solve these problems. For example, if you input only the Width value in the Video encoding option, the Height value is automatically generated according to the ratio of the original video.
The software decoder uses 2 threads by default. If the CPU speed is too low for decoding, increasing the thread count can improve performance.
From version 0.10.4, MPEG-2 TS input is supported. The supported codecs are H.264, AAC(ADTS). Supported codecs will continue to be added. And the current version only supports basic MPEG-2 TS with 188 bytes packet size. Since the information about the input stream is obtained using PAT and PMT, the client must send this table information as required.
To enable MPEG-2 TS, you must bind the ports fist and map the bound ports and streams.
To use multiple streams, it is necessary to bind multiple ports, so we provide a way to bind multiple ports as in the example below. You can use the dash to specify the port as a range, such as Start port-End port
, and multiple ports using commas.
First, name the stream and map the port bound above. The macro ${Port} is provided to map multiple streams at once. Check out the example below.
This is an example of publishing using FFMPEG.
Giving the -pes_payload_size 0 option to the AAC codec is very important for AV synchronization and low latency. If this option is not given, FFMPEG bundles several ADTSs and is transmitted at once, which may cause high latency and AV synchronization errors.
Now with Multiplex Channel, you can configure ABR by combining multiple input streams into one, or duplicate external streams and send them to other applications.
Multiplex Channel takes tracks from other local streams and organizes them into its own tracks. This will pull in tracks that have already been encoded, which can be useful if you want to change codecs or adjust the quality once again. And the Multiplex Channel is sent to the publisher, unconditionally bypassing the encoder.
To use this feature, enable Multiplex Provider in Server.xml.
Multiplex Channels are created through .mux files or API. MuxFilesDir is the path where the .mux files are located and can be set to an absolute system path or relative to the path where the Server.xml configuration is located.
The Multiplex Provider monitors the MuxFilesDir path, and when a mux file is created, it parses the file and creates a multiplex channel. When the mux file is modified, the channel is deleted and created again, and when the mux file is deleted, the channel is deleted.
mux files can be created or deleted while the system is running. This works dynamically. The mux file has the format below.
OutputStream
This is information about the stream to be newly created. It must be the same as the file name. <stream name>.mux
SourceStreams
Specifies the internal stream to be muxed. You can also load streams from other VHosts or applications in the format stream://<vhost name>/<app name>/<stream name>
. Because multiple streams are muxed into one stream, track names may be duplicated. Therefore, it is necessary to change the Track name for each SourceStream through <TrackMap>
. <SourceTrackName>
is either <OutputProfile><Encodes><Video><Name>
or <OutputProfile><Encodes><Audio><Name>
.
Playlist
The same format as <OutputProfile>
must be used, and the Playlist must be constructed using the newly mapped Track name in SourceStreams' TrackMap. The Playlist configured here exists only in this stream. The Playlist's FileName must be unique throughout the application.
MultiplexChannel can also be controlled via API. Please refer to the page below.
Scheduled Channel that allows you to create a live channel by scheduling pre-recorded files has been added to OvenMediaEngine. Other services or software call this Pre-recorded Live or File Live, but OvenMediaEngine plans to expand the function to organize live channels as a source, so we named it Scheduled Channel.
To use this feature, activate Schedule Provider as follows.
MediaRootDir
Root path where media files are located. If you specify a relative path, the directory where the config file is located is root.
ScheduleFileDir
Root path where the schedule file is located. If you specify a relative path, the directory where the config file is located is root.
Scheduled Channel creates/updates/deletes streams by creating/editing/deleting files with the .sch extension in the ScheduleFileDir path. Schedule files (.sch) use the following XML format. When a <Stream Name>.sch
file is created in ScheduleFileDir, OvenMediaEngine analyzes the file and creates a Schedule Channel with <Stream Name>
. If the contents of <Stream Name>.sch
are changed, the Schedule Channel is updated, and if the file is deleted, the stream is deleted.
Stream (required)
This is the stream information that the Channel needs to create.
Stream.Name (optional)
It's the stream's name. This is a reference value extracted from the file name for usage. It's recommended to set it same for consistency, although it's for reference purposes.
Stream.BypassTranscoder (optional, default: false)
Set to true if transcoding is not desired.
Stream.VideoTrack (optional, default: true)
Determines whether to use the video track. If VideoTrack is set to true and there's no video track in the Item, an error will occur.
Stream.AudioTrack (optional, default: true)
Determines whether to use the audio track. If AudioTrack is set to true and there's no audio track in the Item, an error will occur.
Stream.AudioMap (optional, default: false)
To enable multiple audio tracks (multilingual audio) in ScheduleChannel, enable AudioMap. It is important that all scheduled live sources and file sources provide audio tracks equal to or greater than the number of audio tracks defined in AudioMap. If you define 3 AudioMaps, but the file source or live source provides less than 3 audio tracks, the Program will generate an error. If you provide more audio tracks than the defined AudioMaps, they will be mapped in order and the rest will be ignored.
FallbackProgram (optional)
It is a program that switches automatically when there is no program scheduled at the current time or an error occurs in an item. If the program is updated at the current time or the item returns to normal, it will fail back to the original program. Both files and live can be used for items in FallbackProgram. However, it is recommended to use a stable file.
Program (optional)
Schedules a program. The name
is an optional reference value. If not set, a random name will be assigned. Set the start time in ISO8601 format in the scheduled
attribute. Decide whether to repeat the Items
when its playback ends.
Program.Item (optional)
Configures the media source to broadcast.
The url
points to the location of the media source. If it starts with file://
, it refers to a file within the MediaRootDir directory. If it starts with stream://
, it refers to another stream within the same OvenMediaEngine. stream:// has the following format: stream://vhost_name/app_name/stream_name
For 'file' cases, the start
attribute can be set in milliseconds to indicate where in the file playback should start.
duration
indicates the playback time of that item in milliseconds. After the duration ends, it moves to the next item.
Both 'start' and 'duration' are optional. If not set, start
defaults to 0, and duration
defaults to the file's duration; if not specified, the media file will be played until its full duration.
The Scheduled Channel supports multiple audio tracks. This is automatically applied to the LLHLS Publisher. You can configure the AudioMap settings as follows to prepare multiple audio tracks in a Scheduled Channel.
A Scheduled Channel creates streams in advance and copies tracks from files or other streams. Therefore, all source content used in a Scheduled Channel with multiple audio tracks must provide at least the same number of audio tracks. Otherwise, the content will not be scheduled.
This function is a scheduling channel, but it can be used for applications such as creating a permanent stream as follows.
This channel normally plays default/app/input
, but when live input is stopped, it plays the file in FallbackProgram. This will last forever until the .sch file is deleted. One trick was to set the origin program's schedule time to year 2000 so that this stream would play unconditionally.
You may experience some buffering when going from file to live. This is unavoidable due to the nature of the function and low latency. If this is inconvenient, buffering issues can disappear if you add a little delay in advance by setting PartHoldBack in LLHLS to 5 or more. It is a choice between delay and buffering.
ScheduledChannel can also be controlled via API. Please refer to the page below.
Providers
ingests streams that come from a 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:
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.
To allow the duplicated stream name feature can cause several problems. When a new stream is an input the player may be disconnected. Most encoders have 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 are using the default configuration, press the URL button in the top right corner of OvenStreamEnoder, and enter the URL as shown below:
Also, <App name>
and <Stream name>
can be changed and used as desired in the configuration.
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.
OvenMediaEngine supports Live Transcoding for Adaptive Bitrate(ABR) streaming and protocol compatibility. Each protocol supports different codecs, and ABR needs to change resolution and bitrate in different ways. Using OutputProfile, codecs, resolutions, and bitrates can be converted, and ABR can be configured as a variety of sets using a Playlist.
This document explains how to configure encoding settings, set up playlists.
This section explains how to define output streams, change the codec, bitrate, resolution, frame rate, sample rate, and channels for video/audio, as well as how to use the bypass method.
This section explains how to use a Playlist to assemble ABR streams by selecting tracks encoded in various qualities.
The transcoding webhook feature is used when dynamic changes to encoding and ABR configuration are needed based on the type or quality of the input stream.
These are the types of supported decoding and encoding codecs.
Video
VP8, H.264, H.265
Audio
AAC, Opus, MP3
Video
VP8, H.264, H.265
Audio
AAC, Opus
Image
Jpeg, Png, WebP
These are the types of hardware accelerators officially supported.
NVIDIA GPU
Xilinx Alveo U30 MA
NILOGAN (experiment)
Quick Sync Video (deprecated)
OvenMediaEngine has an XML configuration file. If you start OvenMediaEngine with systemctl start ovenmediaengine
, the config file is loaded from the following path.
If you run it directly from the command line, it loads the configuration file from:
If you run it in Docker container, the path to the configuration file is:
The 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 config file is a compatible version.
The IP address
is OvenMediaEngine will bind to. If you set *, all IP addresses of the system are used. If you enter a specific IP, the Host uses that IP only.
PrivacyProtection is an option to comply with GDPR, PIPEDA, CCPA, LGPD, etc. by deleting the client's personal information (IP, Port) from all records. When this option is turned on, the client's IP and Port are converted to xxx.xxx.xxx.xxx:xxx
in all logs and REST APIs.
OvenMediaEngine needs to know its public IP in order to connect to the player through WebRTC. The server must inform the player of the IceCandidates and TURN server addresses when signaling, and this information must be the IP the player can connect to. However, in environments such as Docker or AWS, public IP cannot be obtained through a local interface, so a method of obtaining public IP using stun server is provided (available from version 0.11.1).
If OvenMediaEngine obtains the public IP through communication with the set stun server, you can set the public IP by using * or ${PublicIP} in IceCandidate and TcpRelay.
The Bind
is the configuration for the server port that will be used. Bind consists of Providers
and Publishers
. The Providers are the server for stream input, and the Publishers are the server for streaming.
The meaning of each element is shown in the following table:
<Managers><API>
REST API Server port
RTMP
RTMP port for incoming RTMP stream.
SRT
SRT port for incoming SRT stream
MPEG-TS
MPEGTS ports for incoming MPEGTS/UDP stream.
WebRTC
OVT
OVT port for an origin server.
LLHLS
HTTP(s) port for LLHLS streaming.
VirtualHosts
are a way to run more than one streaming server on a single machine. OvenMediaEngine supports IP-based virtual host and Domain-based virtual host. "IP-based" means that you can separate streaming servers into multiples by setting different IP addresses, and "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
consist of Name
, Host
, Origins
, SignedPolicy
, and Applications
.
The Domain has Names
and TLS. Names can be either a domain address or an IP address. Setting * means it allows all domains and IP addresses.
SignedPolicy is a module that limits the user's privileges and time. For example, operators can distribute RTMP URLs that can be accessed for 60 seconds to authorized users, and limit RTMP transmission to 1 hour. The provided URL will be destroyed after 60 seconds, and transmission will automatically stop after 1 hour. Users who are provided with a SingedPolicy URL cannot access resources other than the provided URL. This is because the SignedPolicy URL is authenticated. See the SignedPolicy chapter for more information.
Origins (also we called OriginMap) are a feature to pull streams from external servers. It now supports OVT and RTSP for the pulling protocols. 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 an RTSP server and creates a stream. RTSP stream from external servers can stream by WebRTC, HLS, and MPEG-DASH.
The Origin has Location
and Pass
elements. Location is a URI pattern for incoming requests. If the incoming URL request matches Location, OvenMediaEngine pulls the stream according to a Pass element. In the Pass element, you can set the origin stream's protocol and URLs.
To run the Edge server, Origin creates application and stream if there isn't those when user request. For more learn 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 like and build various streaming environments.
<Application>
needs to set <Name>
and <Type>
as follows:
<Name>
is used to configure the Streaming URL.
<Type>
defines the operation of <Application>
. Currently, there is only a live
type.
<OutputProfile>
is a configuration that creates an output stream. Output stream name can be set with <OutputStreamName>
, and transcoding properties can be set through <Encodes>
. If you want to stream one input to multiple output streams, you can set multiple <OutputProfile>
.
For more information about the OutputProfiles, please see the Transcoding chapter.
Providers
ingest streams that come from a media source.
If you want to get more information about the <Providers>
, please refer to the Live Source chapter.
You can configure the Output Stream operation in <Publishers>
. <ThreadCount>
is the number of threads used by each component responsible for the <Publishers>
protocol.
You need many threads to transmit streams to a large number of users at the same time. So it's better to use a higher core CPU and set <ThreadCount>
equal to the number of CPU cores.
​OvenMediaEngine currently supports WebRTC, Low-Latency DASH, MEPG-DASH, and HLS. If you don't want to use any protocol then you can delete that protocol setting, the component for that protocol isn't initialized. As a result, you can save system resources by deleting the settings of unused protocol components.
If you want to learn more about WebRTC, visit the WebRTC Streaming chapter. And if you want to get more information on Low-Latency DASH, MPEG-DASH, and HLS, refer to the chapter on HLS & MPEG-DASH Streaming.
Finally, Server.xml
is configured as follows:
Secure Reliable Transport (or SRT in short) is an open source video transport protocol and technology stack that optimizes streaming performance across unpredictable networks with secure streams and easy firewall traversal, bringing the best quality live video over the worst networks. We consider SRT to be one of the great alternatives to RTMP, and OvenMediaEngine can receive video streaming over SRT. For more information on SRT, please visit the SRT Alliance website.
SRT uses the MPEG-TS format when transmitting live streams. This means that unlike RTMP, it can support many codecs. Currently, OvenMediaEngine supports H.264, H.265 and AAC codecs received by SRT.
Set the SRT listen port as follows:
SRT input can be turned on/off for each application. As follows Setting enables the SRT input function of the application.
There are various encoders that support SRT such as FFMPEG, OBS Studio, and srt-live-transmit. Please check the specifications of each encoder on how to transmit streams through SRT from the encoder. We describe an example using OBS Studio.
OvenMediaEngine classifies each stream using SRT's streamid. This means that unlike MPEG-TS/udp, OvenMediaEngine can receive multiple SRT streams through one port. For more information on streamid, see Haivision's official documentation.
Therefore, in order for the SRT encoder to transmit a stream to OvenMediaEngine, the following information must be included in the streamid as percent encoded.
streamid = percent_encoding("srt://{host}[:port]/{app name}/{stream name}[?query=value]")
The streamid contains the URL format, so it must be percent encoded****
OBS Studio 25.0 or later supports SRT. Please refer to the OBS official documentation for more information. Enter the address of OvenMediaEngine in OBS Studio's Server as follows: When using SRT in OBS, leave the Stream Key blank.
srt://{full domain or IP address}:port?streamid=srt%3A%2F%2F{full domain or IP address}[%3APort]%2F{App name}%2F{Stream name}&latency=2000000
The streamid
has to be the urlencoded address of the server name as specified in the ome server configuration plus the app name and the stream name, each separated by /
. The latency
configures the size of the server-side recive buffer and the time limit for SRT in nanoseconds. Typical value for latency are 150000 (150ms) for stremaing to a server in the local network, 600000 (600ms) for streaming to a server over the internet in the local region, and 2000000 (2 seconds) when stremaing over long distance.
For configuring a Blackmagic Web Presenter, ATEM Mini Pro or similar device to stream to OvenMediaEngine over SRT, choose the "Custom URL H264/H265" platform option with the following syntax:
The default streaming profiles work well, and there are more advanced configuration options available if you edit the streaming.xml settings file
The SRT Provider supports multiple audio track inputs. This is automatically applied to the LLHLS Publisher.
If you want to label the input audio tracks, configure them as follows. This affects the player's audio selection UI when playing LLHLS.
You can configure SRT's socket options of the OvenMediaEngine server using <Options>
. This is particularly useful when setting the encryption for SRT, and you can specify a passphrase by configuring as follows:
For more information on SRT socket options, please refer to https://github.com/Haivision/srt/blob/master/docs/API/API-socket-options.md#list-of-options.
OvenMediaEngine supports GPU-based hardware decoding and encoding. Currently supported GPU acceleration devices are Intel's QuickSync and NVIDIA. This article explains how to install the drivers for OvenMediaEngine and set up the configuration to use your GPU.
Please refer to the link for how to build and run.
Intructions on running Docker
you must include the --gpus all option when running Docker
To use hardware acceleration, set the HardwareAcceleration option to true under OutputProfiles. If this option is enabled, a hardware codec is automatically used when creating a stream, and if it is unavailable due to insufficient hardware resources, it is replaced with a software codec.
The codecs available using hardware accelerators in OvenMediaEngine are as shown in the table below. Different GPUs support different codecs. If the hardware codec is not available, you should check if your GPU device supports the codec.
D : Decoding, E : Encoding
TranscodeWebhook allows OvenMediaEngine to use OutputProfiles from the Control Server's response instead of the OutputProfiles in the local configuration (Server.xml). OvenMediaEngine requests OutputProfiles from the Control Server when streams are created, enabling the specification of different profiles for each individual stream.
Enable (required) You can enable or disable TranscodeWebhook settings.
ControlServerUrl (required) It's the URL of the Control Server, and it supports both HTTP and HTTPS.
SecretKey (optional) This is the Secret Key used to pass authentication for the Control Server. To pass security authentication, an HMAC-SHA1 encrypted value of the HTTP Payload is added to the HTTP Header's X-OME-Signature. This Key is used for generating this value.
Timeout (optional, default: 1500) This is the Timeout value used when connecting to the Control Server.
UseLocalProfilesOnConnectionFailure(optional, default: true) This determines whether to use the OutputProfiles from Local settings in case of communication failure with the Control Server. If it's set to "false," a communication failure with the Control Server will result in a failure to create the Output stream.
UseLocalProfilesOnServerDisallow (optional, default: false) When the Control Server responds with a 200 OK, but "allowed" is set to "false," this policy is followed.
UseLocalProfilesOnErrorResponse (optional, default: false) When the Control Server responds with error status codes such as 400 Bad Request, 404 Not Found, 500 Internal Error, OvenMediaEngine follows this policy.
OvenMediaEngine sends requests to the Control Server in the following format.
The Control Server responds in the following format to specify OutputProfiles for the respective stream.
The "outputProfiles" in the JSON is identical to the configuration in Server.xml, and the format is as follows.
Apple supports Low-Latency HLS (LLHLS), which enables low-latency video streaming while maintaining scalability. LLHLS enables broadcasting with an end-to-end latency of about 2 to 5 seconds. OvenMediaEngine officially supports LLHLS as of v0.14.0.
LLHLS is an extension of HLS, so legacy HLS players can play LLHLS streams. However, the legacy HLS player plays the stream without using the low-latency function.
To use LLHLS, you need to add the <LLHLS>
elements to the <Publishers>
in the configuration as shown in the following example.
HTTP/2 outperforms HTTP/1.1, especially with LLHLS. Since all current browsers only support h2, HTTP/2 is supported only on TLS port. Therefore, it is highly recommended to use LLHLS on the TLS port.
LLHLS can deliver adaptive bitrate streaming. OME encodes the same source with multiple renditions and delivers it to the players. And LLHLS Player, including OvenPlayer, selects the best quality rendition according to its network environment. Of course, these players also provide option for users to manually select rendition.
LLHLS is ready when a live source is inputted and a stream is created. Viewers can stream using OvenPlayer or other players.
When you create a stream, as shown above, you can play LLHLS with the following URL:
http[s]://domain[:port]/<app name>/<stream name>/llhls.m3u8
If you use the default configuration, you can start streaming with the following URL:
https://domain:3334/app/<stream name>/llhls.m3u8
You can create as long a playlist as you want by setting <DVR>
to the LLHLS publisher as shown below. This allows the player to rewind the live stream and play older segments. OvenMediaEngine stores and uses old segments in a file in <DVR><TempStoragePath>
to prevent excessive memory usage. It stores as much as <DVR><MaxDuration>
and the unit is seconds.
TargetStreamName
The name of the stream to dump to. You can use * and ? to filter stream names.
Playlists
The name of the master playlist file to be dumped together.
OutputPath
The folder to output to. In the OutputPath you can use the macros shown in the table below. You must have write permission on the specified folder.
OvenMediaEngine supports Multiple Audio Tracks in LLHLS. When multiple audio signals are input through a Provider, the LLHLS Publisher can utilize them to provide multiple audio tracks.
By simply sending multiple audio signals through SRT or Scheduled Channel, the LLHLS Publisher can provide multiple audio tracks. For example, to send multiple audio signals via SRT from OBS, you need to select multiple Audio Tracks and configure the Advanced Audio Properties to assign the appropriate audio to each track.
Since the incoming audio signals do not have labels, you can enhance usability by assigning labels to each audio signal as follows.
To assign labels to audio signals in the SRT Provider, configure the AudioMap as shown below:
OvenMediaEngine supports Widevine and Fairplay in LLHLS with simple setup since version 0.16.0.
Currently, DRM is only supported for H.264 and AAC codecs. Support for H.265 will be added soon.
To include DRM information in your LLHLS Publisher configuration, follow these steps. You can set the InfoFile path as either a relative path, starting from the directory where Server.xml is located, or as an absolute path.
The separation of the DRMInfoFile is designed to allow dynamic changes to the file. Any modifications to the DRMInfoFile will take effect when a new stream is generated.
Here's how you should structure your DRM Info File:
Multiple <DRM>
can be set. Specify the VirtualHost, Application, and StreamName where DRM should be applied. StreamName supports wildcard regular expressions.
Currently, CencProtectScheme only supports "cbcs" since FairPlay also supports only cbcs. There may be limited prospects for adding other schemes in the near future.
KeyId, Key, Iv and Pssh values are essential and should be provided by your DRM provider. FairPlayKeyUrl is only need for FairPlay and if you want to enable FairPlay to your stream, it is required. It will be also provided by your DRM provider.
OvenPlayer now includes DRM-related options. Enable DRM and input the License URL. Your content is now securely protected.
To integrate Pallycon, configure the DRMInfo.xml file as follows.
Set DRMProvider
to Pallycon. Then, set the necessary information as shown in the example. KMSUrl
and KMSToken
are values provided by the Pallycon console. ContentId
can be created using VHostName, AppName, and StreamName macros.
Port for WebRTC. If you want more information on the WebRTC port, see the and chapters.
OVT is a protocol defined by OvenMediaEngine for Origin-Edge communication. For more information about Origin-Edge, see the chapter.
If you are using an NVIDIA graphics card, please refer to the following guide to install the driver. The OS that supports installation with the provided script are CentOS 7/8 and Ubuntu 18/20 versions. If you want to install the driver in another OS, please refer to the manual installation guide document.
CentOS environment requires the process of uninstalling the nouveau driver. After uninstalling the driver, the first reboot is required, and a new NVIDIA driver must be installed and rebooted. Therefore, two install scripts must be executed.
How to check driver installation
After the driver installation is complete, check whether the driver is operating normally with the nvidia-smi command.
If you have finished installing the driver to use the GPU, you need to reinstall the open source library using Prerequisites.sh . The purpose is to allow external libraries to use the installed graphics driver.
Please refer to the NVIDIA Driver installation guide written previously.
To use GPU acceleration in Docker, you need to install NVIDIA drivers on your host OS and install the NVIDIA Container Toolkit. This toolkit includes container runtime libraries and utilities for using NVIDIA GPUs in Docker containers.
A Docker Image build script that supports NVIDIA GPU is provided separately. Please refer to the previous guide for how to build
Please refer to the Netint documentation to install XCODER.
How to check driver installation
After the driver installation is complete, check if the libxcoder exist: the CLI must return something like libxcoder_logan.so (libc6,x86-64) => /usr/local/lib/libxcoder_logan.so
If you have finished installing the driver to use the VPU, you need to reinstall the open source library using Prerequisites.sh . The purpose is to allow external libraries to use the installed graphics driver. You also have to unzip the ffmpeg patch provide by netint in a specfic path
NVIDIA NVDEC Video Format :
NVIDIA NVENV Video Format :
CUDA Toolkit Installation Guide :
NVIDIA Container Toolkit :
Quick Sync Video format support:
Xilinx Video SDK :
See the section for how to configure renditions.
For information on CrossDomains, see chapter.
If your input stream is already h.264/aac, you can use the input stream as is like below. If not, or if you want to change the encoding quality, you can do .
We have prepared a test player that you can quickly see if OvenMediaEngine is working. Please refer to the for more information.
ID3 Timed metadata can be sent to the LLHLS stream through the .
You can dump the LLHLS stream for VoD. You can enable it by setting the following in <Application><Publishers><LLHLS>
. Dump function can also be controlled by .
Pallycon is no longer supported by the Open Source project and is only supported in the version. For more information, see this .
OvenMediaEngine integrates with , allowing you to more easily apply DRM to LLHLS streams.