Only available in Google Ad Manager 360.

Manage mid-roll ads for video on demand

Dynamic Ad Insertion (DAI) supports mid-roll ad insertion for video on demand (VOD) content.

Mid-rolls are only supported when the IMA SDK is used, not with server-side beaconing (SSB).

To correctly display mid-rolls for DAI, you must complete the following:

  1. Create a content source and activate mid-rolls
  2. Either create a mid-roll CDN configuration (supported for HLS only) or ensure your content is conditioned to handle desired ad break timing
  3. Configure your Ad Manager ad rules to return a list of ads at the appropriate times

Ensure your content is conditioned to handle ad break timing

Mid-roll ad breaks for DAI may not fall on the typical video segment boundaries for your stream.

The process of dividing a content video segment to activate an ad break is called "content conditioning." In order to support the insertion of ads at the desired ad break locations, you must either provide content that is preconditioned or content that is able to be conditioned by Ad Manager.

All DASH VOD content must be preconditioned.


Your content may normally be divided into 10-second segments, but you may require an ad break at 0:36 (36 seconds). In this case, you need to divide a 10-second video into 2 separate segments that are 6 seconds and 4 seconds, respectively, allowing for an ad to be inserted at the correct time.

Preconditioned content

Content is considered "preconditioned" if the video stream is segmented precisely to align with the cue points where ads will be inserted. Preconditioning is required to activate mid-rolls for DASH VOD content and as alternative to having DAI conditioning for HLS VOD content.

Criteria to ingest preconditioned content

For both HLS and DASH VOD content, you must define the preconditioned attribute as true for the ingestURL element in the MRSS feed. Also, your MRSS feed must specify cue points in order for mid-roll ads to show up properly.

  • Build HLS manifest to split content
  • Define the preconditioned attribute as true for the ingestURL element in the MRSS feed
  • Place markers in the HLS stream file to indicate ad placement opportunities. Available markers are:
      • The number of #EXT-X-PLACEMENT-OPPORTUNITY markers must equal the number of cue points
    • #EXT-X-CUE-OUT and #EXT-X-CUE-IN  (Beta) 
      • Any content that exists between the #EXT-X-CUE-OUT and #EXT-X-CUE-IN markers will be cut out and replaced by DAI stitched ads
      • Any #EXT-X-CUE-OUT and #EXT-X-CUE-IN markers at the beginning or end of the playlist are ignored as these markers are only for mid-roll ad insertion 
      • The number of#EXT-X-CUE-OUT and #EXT-X-CUE-IN marker pairs must equal the number of cue points
  • Media presentation must be broken into multiple periods with each mid-roll cue point falling on a period boundary
  • Content segments at the beginning and end of each period must be prepared so that every frame in the segment is included in the period
  • Cue points must be followed by a period starting with a keyframe/IDR frame

Learn more about the requirements for the preconditioned attribute of the ingestURL feed element.

Unconditioned content

If your HLS content is not preconditioned, Ad Manager can condition it for you when the following criteria is met.

Criteria for Ad Manager to be able to condition your content

See a sample VMAP response with mid-rolls (VOD)
<vmap:VMAP xmlns:vmap="" version="1.0">
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll‑ad‑1" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
<vmap:AdBreak timeOffset="00:00:15.000" breakType="linear" breakId="midroll‑1">
<vmap:AdSource id="midroll‑1‑ad‑1" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
<vmap:AdBreak timeOffset="end" breakType="linear" breakId="postroll">
<vmap:AdSource id="postroll‑ad‑1" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
For any issues related to DAI troubleshooting or outages, contact publisher support.
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center