Only available in Google Ad Manager 360.

HTTP Live Streaming (HLS)

HLS integration

HTTP Live Streaming (HLS) is an adaptive bitrate live streaming video protocol that enables high quality streaming of video content. DAI for Ad Manager supports HLS version 3. This integration guide details the requirements and recommendations for using HLS.

See which features are supported for live and video on demand
Any features not part of HLS version 3 must be discussed with your Ad Manager account team.
Feature Live linear Video on demand (VOD)
EXTINF Supported  Supported
EXT-X-DISCONTINUITY Supported Supported
EXT-X-ENDLIST * Supported
EXT-X-I-FRAME-STREAM-INF Supported Supported
EXT-X-I-FRAMES-ONLY Supported Supported
EXT-X-INDEPENDENT-SEGMENTS Supported Not supported
EXT-X-KEY Supported Supported
EXT-X-MEDIA (Rendition Groups) Supported Supported
EXT-X-PLAYLIST-TYPE Supported Supported
EXT-X-PROGRAM-DATE-TIME Supported Supported
EXT-X-STREAM-INF > AUDIO Supported Supported
EXT-X-STREAM-INF > BANDWIDTH Supported Supported
EXT-X-STREAM-INF > CODECS Supported Supported
EXT-X-STREAM-INF > FRAMERATE Supported Supported
EXT-X-STREAM-INF > SUBTITLES Supported Supported
EXT-X-STREAM-INF > VIDEO Supported Supported
EXT-X-TARGETDURATION Supported Supported
EXT-X-VERSION Supported Supported

* Supported in live streams for EVENT type playlists only.


Jump to a specific section

See specific details about encoding for live linear streams or for video on demand.

Playlists and rendition groups

Deliver playlists using GZIP content-encoding (recommended). Variants in master playlists and segments can use either absolute URLs or relative URLs.

All ad assets are transcoded to include I-FRAME playlists, including slates. Ad Manager DAI does not generate I-FRAME playlists from the content or generate new Rendition Groups based on combinations of video/audio.

  • For live linear: If required, I-FRAME playlists must be generated and conditioned by the encoder/packager. Rendition Groups are delivered as they're generated from the Live encoder.
  • For video on demand (VOD): If required, I-FRAME playlists must be supplied in the master manifest at ingest. Ad Manager will only raise an error if the provided I-FRAME playlist file cannot be accessed or parsed. Rendition Groups are delivered as they are provided in the master manifest.

Codecs and resolution

HLS master playlists for live streams and video on demand (VOD) assets must include the optional CODECS and RESOLUTION attributes. These attributes are used to find suitable ads that match these encoding settings. If these values are not provided, ads are matched based on bandwidth alone and may result in a mismatch of resolution and codecs between ad and content. This can lead to poor user experience and playback issues across different devices.

The CODECS attribute must contain both the audio and the video codecs. Your encoder may add or remove variants to your master playlist URL at any time.

Audio codecs

DAI supports the AAC audio codec. DAI also supports the AC-3 and E-AC-3 codecs.

Keep variant stream URLs consistent for each CODECS and RESOLUTION combination.
You should ensure that your encoder is configured to maintain consistent URLs for each variant URL to prevent playback problems for your users.


A master playlist with CODECS and RESOLUTION


Segment duration

HLS media playlists must have media segment durations declared as decimal-floating-point numbers. The duration should have floating point accuracy to help determine the precise time when an ad break will start and end. The less accurate the duration values, the less accurately the system is able to determine when ad breaks occur in the resulting stream.


A media playlist with #EXTINF


Timestamp alignment

The Presentation Timestamp (PTS) across segments in variant media playlists must align. P-frame and B-frame refers other frames to decode a frame. The H.264 codec also references frames that are not adjacent for better compression. Since these frames depend on other frames for decoding and presentation, Decode Timestamp (DTS) gives sequence by which frames are decoded and PTS gives sequence by which frames are presented. Aligning PTS is important when you adapt to different bitrate while playback of an asset. Ad insertion uses PTS to find the ad insertion position.


Any EXT-X-DISCONTINUITY in the media playlist must have EXT-X-DISCONTINUITY-SEQUENCE. The EXT‑X‑DISCONTINUITY‑SEQUENCE tag allows synchronization between different renditions of the same variant stream or different variant streams.

Media encryption

If you want to encrypt the media content, its must be encrypted with AES-128 (encrypts the entire segment), SAMPLE-AES (encrypts individual media, like audio or video), or SAMPLE-AES-CTR. Apple FairPlay stream uses SAMPLE‑AES.

Ad Manager DAI supports DRM technology for HLS streams using FairPlay and other DRMs with CMAF/fragmented MP4.


A media playlist with #EXT-X-KEY

#EXT-X-KEY:METHOD=AES-128,URI="<signature>",IV=<initialization vector>

For any issues related to DAI troubleshooting or outages, contact publisher support.

Was this helpful?

How can we improve it?
Get started with Dynamic Ad Insertion

Our guide to delivering a seamless ad experience across live, linear, and on-demand video content.
See the guide

Clear search
Close search
Google apps
Main menu