Ad insertion and placement

There are a few ways to determine ad insertion and ad placement.

Ad insertion

Here is an overview of the process used to determine ad insertion:

  1. Opportunity detection: The TVSDK uses stream information to detect possible and desired locations for ads.
  2. Ad resolution: The TVSDK communicates with an advertisement server to retrieve the ads to splice into the content.
  3. Ad placement: The TVSDK loads the specified ads and places them in ad breaks on the content timeline at the specified locations and recomputes the virtual timeline, if necessary.

Ad placement

The TVSDK can get locations for possible ad placement from the following sources:

  • Manifest metadata/cues

    The TVSDK detects the cues, extracts the necessary information from these cues, and communicates with an advertising server to get the corresponding ads. This source is common for live/linear streams.

    The TVSDK usually replaces main content with the ads at the location that is indicated by the metadata/cues; otherwise, the client would drop more and more behind the actual live point.

  • The advertising server map

    Usually, metadata about these streams is registered in the advertising server before playback. The TVSDK retrieves the ad timeline and corresponding ads from the server. This source is common for VOD streams.

    The TVSDK usually inserts the resolved ads into the main content as indicated by the server map.


By default, the TVSDK uses manifest cues for live/linear streams and advertising server maps for VOD streams. However, to support full-event replay for live events, your application must take extra steps.

On this page