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.
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