OvenMediaEngine supports multiple protocols that can be 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.
From version 0.10.4, MPEG-2 TS input is supported as a beta version. 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.
This version supports MPEG-2 TS over UDP. MPEG-2 TS over TCP or MPEG-2 TS over SRT will be supported soon.
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.
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_4000
HLS
http://192.168.0.1:8080/app/stream_4000/playlist.m3u8
MPEG-DASH
http://192.168.0.1:8080/app/stream_4000/manifest.mpd
From version 0.10.4, RTSP Pull input is supported as a beta version. The supported codecs are H.264, AAC(ADTS). Supported codecs will continue to be added.
This function pulls a stream from an external RTSP server and operates as an RTSP client.
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.
The pull-type provider is activated by the publisher's streaming request. And if there is no client playing for 30 seconds, the provider is automatically disabled.
According to the above setting, the RTSP pull provider operates for the following streaming URLs.
Protocol
URL
WebRTC
ws:://ome.com:3333/app_name/rtsp_stream_name
HLS
http://ome.com:8080/app_name/rtsp_stream_name/playlist.m3u8
DASH
http://ome.com:8080/app_name/rtsp_stream_name/manifest.mpd
LL DASH
http://ome.com:8080/app_name/rtsp_stream_name/manifest_ll.mpd
Providers
ingest 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 <Application>
, a stream is automatically created in the <Application>
. The generated stream is passed to Encoder and Publisher.
If you set up a live stream using 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:
Allowing the duplicated stream name feature can cause several problems. Player connections may be lost when a new stream is inputted. Most encoders can automatically reconnect when it is disconnected from the server. As a result, the two encoders can compete and disconnect from each other, causing serious problems with streaming.
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, <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 the 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 may 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 up OBS as follows:
You can set the Stream Key that can be set 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
HLS
http://192.168.0.1:8080/app/stream/playlist.m3u8
MPEG-DASH
http://192.168.0.1:8080/app/stream/manifest.mpd
Value
Description
true
Default
rejects a new stream inputted as overlap, and it maintains the existing stream.
false
Accepts a new stream inputted as overlap, and it disconnects the existing stream.