Push Publishing
OvenMediaEngine Enterprise supports Push Publishing function that can restreaming live streams to other systems. The protocol supports widely used protocols such as SRT, RTMP, and MPEG-2 TS.
The StreamMap feature has been added, and it now automatically re-streaming based on predefined conditions. You can also use the Rest API to control and monitor it.
Configuring Push Publishing
Push Publisher
To use Push Publishing, you need to configure <Push> under <Applications><Publishers> in Server.xml.
<Applications>
<Application>
...
<Publishers>
...
<Push>
<!-- [Optional] -->
<StreamMap>
<Enable>false</Enable>
<Path>path/to/map.xml</Path>
</StreamMap>
</Push>
...
</Publishers>
</Application>
</Applications>StreamMap
<StreamMap> is used for automatically pushing content based on user-defined conditions. The XML file path should be specified relative to <ApplicationPath>/conf.
XML Elements
<StreamName>
Required
Used to match the output stream name.
Wildcard characters (
*) are supported.
<VariantNames>
Required
Used to select specific tracks. If <VariantNames> is not specified, all tracks are transmitted by default.
Multiple variants can be specified using commas (
,).
<Protocol>
Required
Supported protocols are srt, mpegts, and rtmp.
When using
SRTorMPEG-TS, consider the network environment (e.g., firewalls, ports, packet loss, etc.).When using
RTMP, using H.264 + AAC is strongly recommended.
<Url>
Required
Specifies the destination address.
Macros are supported.
<StreamKey>
Optional
Specifies the stream key when required: RTMP
Macros are supported.
<TimestampMode>
Optional
(Enterprise Only)
Defines how timestamps are set for outgoing packets.
ZeroBased: Sends timestamps starting from 0 (zero) at the beginning of transmission.Original(default): Sends timestamps identical to the original stream’s timestamps.
Macros
To improve automation and operational efficiency, we recommend actively using macros.
${Application}
Application name
${SourceStream}
Source stream name
${Stream}
Output stream name
API Interface
Start Push Publishing
Request
Responses
id
Required
A unique ID string used to identify the Push Publishing task.
Duplicate IDs are not allowed.
stream
Required
The output target stream information object.
stream.name
Required
Output stream name.
Example:
"myStreamOut".
stream.variantNames
Optional
A list of track (variant) names to transmit.
If omitted or empty, the default behavior applies: all tracks are transmitted, or for
RTMP, the first video track and the first audio track are selected.
protocol
Required
The protocol used for Push Publishing.
Example:
"srt","mpegts","rtmp".
url
Required
Destination URL.
The format differs by protocol, and query string options can be used.
streamKey
Optional
Stream key for RTMP transmission.
Can be omitted for MPEG-TS transmission.
timestampMode
Optional
Configures the timestamp mode for outgoing packets.
ZeroBased: Sends timestamps starting from 0 (zero) at the beginning of transmission.Original(default): Sends timestamps identical to the original stream’s timestamps.
Stop Push Publishing
Request
Responses
Get Push Publishing State
Request
Responses
State of Push Publishing
ready
Waiting for the stream to be created.
connecting
Connecting to destination
pushing
Connected and streaming
stopping
Disconnection / stop in progress
stopped
Push is disconnected / stopped
error
Push encountered an error
Last updated
Was this helpful?