Skip to content

Ad insertion markers

The dynamic ad insertion (DAI) technique is used for adding commercials into linear live streams, such as TV broadcasts. A regional TV provider can, by using DAI, embed "local" advertising into a broadcast.

The dynamic ad insertion method uses ad insertion markers to prepare a stream for ad insertion. Markers are stream's metadata that signals about the ad insertion event. This event means that you can embed a commercial of a certain duration in a certain place of a video stream. This place (a cue splice point) in a stream allows smooth switching to another stream (such as a commercial) and back to the main video.

Ad insertion markers are created according to various standards, the most popular standard is SCTE-35. Technically, they are tags in a client manifest, that is why markers must be added for each video transmission protocol (adaptive sreaming). Flussonic can do that.

Flussonic works with markers in the SCTE-35, SCTE-104, and AWS formats and recognizes the metadata about the splice_insert events.

The following marker formats are read from streams of different types:

  • HLS — markers in formats: SCTE-35, AWS (learn more in AWS Documentation ), or simple cue-in and cue-out markers.
  • MPEG-TS — SCTE-35 markers.
  • Video from Decklink or DekTec capture cards — SCTE-104 markers.
  • M4F/M4S — SCTE-35 markers.

Converting ad insertion markers with Flussonic

When input and output stream formats are the same, the markers pass through Flussonic without changes. If the output format is different, Flussonic can convert ad insertion markers that come with an input stream into another format and pass them to the output stream.

Input stream format Ad insertion marker Output stream and marker format
MPEG-TS (over any protocol including SRT, HTTP/UDP) SCTE-35 MPEG-TS SCTE-35, HLS AWS, HLS SCTE-35, SDI VANC SCTE-104, DASH AWS

Usage example: You need to read the SCTE-35 markers in MPEG-TS transport stream and convert them for broadcasting via HLS.
Flussonic can detect markers in the ingested stream, convert them to a specified standard, and add them to a client's requested manifest.

Setting up conversion of ad insertion markers

To set up ad markers conversion:

  • Enable reading of ad insertion markers from the input stream.
  • (HLS only) Specify the desired format of the markers for the output stream.

This can be done by editing the input stream settings.

Reading markers from the input stream

To enable markers processing:

  • for MPEG-TS or M4F/M4S input: no additional options are required; SCTE-35 markers are read automatically.
  • for SDI input: SCTE-104 markers are automatically read from VANC.
  • for HLS input: add ad=true option to the input to enable the processing of ad markers from an HLS input stream; simple SCTE-35 cue markers and AWS markers are supported.

    input hls://IP-ADDRESS:PORT/STREAM_NAME ad=true;

    That way Flussonic will read ad markers from the input HLS stream.

Markers format for HLS output

The next step is to specify the format of markers for output HLS streams.


Ad insertion markers (SCTE-35 or AWS respectively) will be passed to output MPEG-TS or DASH automatically.

SCTE-104 ad insertion markers from VANC will also be passed to output MPEG-TS, HLS and DASH automatically.

To enable markers conversion add hls_scte35 to the input stream settings.


hls_scte35 aws|scte35|rfc8216;


  • aws - AWS ad markers for HLS output
  • scte35 - SCTE-35 ad markers for HLS output
  • rfc8216 - SCTE-35 ad markers for HLS output complying with the RFC 8216 standard. Such markers are passed in the EXT-X-DATERANGE tag. This format is supported by Apple devices.


hls_scte35 scte35;

Flussonic will add SCTE-35 cue markers to the output HLS stream.

hls_scte35 is used specifically for HLS output.

Two-part example

In this example we will: 1. Read SCTE-35 markers from MPEG-TS 2. Convert them to HLS AWS markers to use in the output HLS stream.

Reading MPEG-TS SCTE-35 markers, transform them into AWS format for playing the stream via HLS (hls_scte35 aws):

stream STREAM_NAME {
    input tshttp://IP-ADDRESS:PORT/INPUTSTREAM/mpegts;
    hls_scte35 aws;

Now when you access this stream via HLS, it will contain AWS ad markers.

Let's access the resulting stream via HLS locally, read the markers from it and specify the option to convert it to the SCTE-35 format when playing this stream via HLS:

    input hls://FLUSSONIC-IP:PORT/STREAM_NAME/tracks-v1a1/mono.m3u8 ad=true;
    hls_scte35 scte35;

Checking that a stream has SCTE-35 markers

If you want to make sure the output stream contains SCTE-35 markers, check the Flussonic log. Flussonic raises the 'scte35' event that belongs to the standard log level. The logs in /var/log/flussonic/flussonic.log will show mpegts_scte35 messages.

To raise the scte35 event, add these lines to the configuration:

event_sink events {
  url log:///var/log/flussonic/example.log;
  only event=scte35;

An alternative way of detecting the cue markers in the HLS stream is to look at this HLS manifest. It is less convenient and you will also need to wait for them to appear in real time playback.