Dynamic Ad Insertion

Overview

Dynamic Ad Insertion (DAI) is one of a number of phrases used for supplementing a program stream with an alternative piece of content (an advertisement) dynamically. DAI workflows are driven by the use of SCTE-104 and SCTE-35 metadata. This page provides information on how SCTE-35 is utilized within HTTP video streaming. Whilst there are several other phrases used to describe DAI, this document aims to use consistent wording throughout. Further terminology used throughout this document can be found in the Glossary.

How does DAI work for Live?

../../_images/dai_live.png

Note

For further information regarding Live use cases please see Unified Origin - DAI.

How does DAI work for VOD?

../../_images/dai_avod.png

Note

For further information regarding VOD use cases please see Dynamic Ad Insertion (AVOD)

What is SCTE 35?

SCTE 35 messages can contain information about a program or other relevant data about the stream. For the current document it is most important that they can cue splice points in a stream, to enable Ad Insertion or Ad Replacement.

A SCTE 35 message often originates from a SCTE 104 message that has been translated/converted by an upstream contribution encoder or automation system.

When Packager or Origin ingests a SCTE 35 message and the --timed_metadata is enabled, the message will then be presented in the DASH client manifest (adhering to SCTE 214-1 (2016)) and HLS client manifest (adhering to the HTTP Live Streaming specification).

Whats the difference between SCTE-104, SCTE 35 & SCTE 214?

SCTE 104 messages are requests from an automation system to create splice markers in a program stream.

SCTE 35 messages are the fulfillment of these requests, including all of the data that a downstream system needs to take appropriate actions to condition the presentation stream.

SCTE 214-1 describes the carriage of SCTE 35 metadata within a DASH client manifest.

What's the difference between Ad Insertion and Ad Replacement

../../_images/dai_insert_vs_replace.png

Ad Replacement

  • Can be used in both Live & VOD scenarios.

  • The advertisement is used to replace a time range of the main program.

  • The advertisement is simply replacing the main program therefore the duration of the program stream doesn’t change.

Ad Insertion

  • Only applies to VOD.

  • The advertisement inserted can be any length of time defined.

  • The overall duration of the stream will be extended by whatever the length of the advertisement.

Are there any demos?

Demos using can be found at Unified Streaming SCTE35 Demos. These Live and VOD demos work in conjuctions with the following Ad vendors:

Can I use a query parameter to filter out metadata?

To explain why we made this change requires an explanation of how the origin behaves when both manifests and segments are requested, since it generates everything dynamically.

Manifest Origin receives a request for foo.ism/.mpd it reads foo.ism and looks in the '<body>' element for a list of tracks and '<head>' for relevant options to apply metadata tracks are included or excluded at this point depending on the timed_metadata option in the ism for each track, it reads the referenced media file's index to construct a list of segments it produces a manifest listing all segments for each track Adding a filter query parameter affects step 2, the requested filter is applied to each track in the list and only those that pass are included.

Media segment Origin receives a request for foo.ism/dash/video-1000000-0.dash it reads foo.ism and looks in the '<body>' element for a list of tracks and '<head>' for relevant options to apply for the track which matches the request (video-1000000) it reads the media file's index to get the location of the media data in the mdat at the requested time (0) if timed_metadata is enabled it also reads any metadata tracks based on all the options (e.g. segment duration, splice media, etc) produces a segment containing either just the media, or media + metadata (emsg) The problem with allowing metadata tracks to be filtered out is primarily that the filtering only occurs at the manifest request, and it is used to narrow down the list of tracks the origin considers when producing the manifest. Generally this isn't an issue as if a track is excluded then players which get that manifest will not request those segments.

However when it comes to metadata tracks with SCTE 35 markers in a setup that is cutting and splicing segments to enable ad insertion, the presence or not of the metadata track actually has an impact on the other tracks. For example the decision on which segments to split or merge is based on the presence of SCTE 35 splice_insert() messages. So the content and hence duration of segments around the break boundaries will differ depending on whether or not there is any metadata and if splice_media is enabled.

This causes things to break pretty badly, as the manifest with the metadata track filtered out will be announcing a segment at time n, that the origin won't serve as due to the splicing it shouldn't exist.

We considered different options to fix this problem before deciding that filtering should ignore metadata tracks and always include them.

Glossary

DAI
Dynamic Ad Insertion

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

DAR
Dynamic Ad Replacement

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

EMSG

The Event Message box ('emsg') provides signalling for generic events related to the media presentation time.

ESAM

Cablelabs Event Signaling And Management API

Fragment duration

The length of a fragment containing either 1 or multiple GOP's.

GOP

The encoding sequence or Group of Picture all the necessary data to be decoded an presented for viewing

IDR

Instant Decoder Refresh. A type of video picture used in visual encoding allow for a received device or decode to display with video without any information of any picture before or after.

SCTE-104

Requests from an automation system to create splice markers in a program stream.

SCTE-35

The fulfillment of SCTE-104 requests, containing all necessary metadata a downstream system to take appropriate actions to condition a program stream.

SGAI
Server Guided Ad Insertion

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

SGAR
Server Guided Ad Replacement

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

splice

Split and merge a media fragment at a desired point in time.

splice_insert()

This is the legacy standard for a distributor placement opportunity.

SSAI
Server Side Ad Insertion

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

SSAR
Server Side Ad Replacement

The supplementing of a program stream with an alternative piece of content (an advertisement) for monetization.

time_signal()

The time_signal() provides a time synchronized data delivery mechanism.