Ad Markers
OvenMediaEngine Enterprise supports the Ad Markers insertion feature starting with version 0.18.1.0-1.
CUE-OUT/IN
For LL-HLS/HLS
You can dynamically insert Ad Markers into LL-HLS and HLS playlists using the REST API.
When requesting the CUE-OUT event, the following tags will be added to the playlist:
#EXT-X-CUE-OUT:DURATION=<time>
…
#EXT-X-CUE-IN#EXT-X-CUE-OUT,
#EXT-X-CUE-IN
#EXT-X-CUE-OUT and #EXT-X-CUE-IN are a pair, and the entire section between the two tags will be replaced with ad content by the ad server
DURATION=<time>
DURATION=<time> is required and represents the duration of the ad.
You can request the CUE-IN event to end an inserted ad early. When the event is called, the #EXT-X-CUE-IN tag is immediately added to the playlist, and the previously added #EXT-X-CUE-IN tag is removed.
API Interface
Request
Responses
SCTE-35 Event Insertion
For LL-HLS/HLS
Using the REST API, you can insert ad markers into LL-HLS and HLS playlists as #EXT-X-DATERANGE tags. #EXT-X-DATERANGE specifies ad timing via the SCTE-35 OUT/IN attributes.
For SRT Push
Starting with OvenMediaEngine Enterprise 0.20.0.0-1, you can insert SCTE-35 events (splice_insert()) not only into LL-HLS and HLS playlists, but also into SRT Push. When you send ad start/end signals (OUT/IN) or other custom events to OvenMediaEngine Enterprise via the sendEvents API, the information is inserted into the SRT Push and propagated to other systems.
Behavior Rule
When an
OUTevent is received, anINis automatically scheduled after the specifiedduration(ms) elapses.If an
INis inserted before the duration expires, the previously auto-insertedINis removed.
Some downstream devices may fail to detect a return from ad break. We recommend sending an IN event after an OUT event.
API Interface
Request
Responses
Example: Successful Event Insertion
For LL-HLS/HLS
Below is an LL-HLS playlist sample after injecting an SCTE-35 event:
#EXT-X-DATERANGE:ID="123",START-DATE="2025-01-01T09:15:00+00:00",PLANNED-DURATION=10.0,SCTE35-OUT=0xF...
...
#EXT-X-DATERANGE:ID="123",START-DATE="2025-01-01T09:15:00+00:00",SCTE35-IN=0xFSCTE35-OUT
SCTE-35 payload indicating the start of the ad break (content → ad).
SCTE35-IN
SCTE-35 payload indicating the end of the ad break (ad → content).
PLANNED-DURATION
Ad break duration in seconds. When used with OUT, an IN is auto-inserted after this time.
ID
An identifier that ties the OUT/IN to the same break.
* 32-bit unsigned integer.
START-DATE
Ad start timestamp (ISO-8601). * yyyy-mm-ddThh:mm:ss±UTC
For SRT Push
If the OvenMediaEngine Enterprise log shows output similar to the example below, the SCTE-35 event was delivered successfully.
[11-03 21:29:02.028] D [SW-Push:2415407] FFmpegWriter | writer.cpp:523 | SCTE-35 Event: SpliceCommandType=5, ID=2025, OutOfNetwork=true, Timestamp=372370 ms, Duration=30000 ms, AutoReturn=falseLast updated
Was this helpful?