Manage mid-roll ad insertion for DAI

Dynamic Ad Insertion (DAI) supports mid-rolls for both video on demand (VOD) and live linear video content.

For VOD, 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 desired 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 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 for you to precondition your content

Define the preconditioned attribute as true for the ingestURL element in the MRSS feed. Your MRSS feed must also specify cue points in order for mid-roll ads to show up properly. These requirements apply to both HLS and DASH VOD content.


  • Build HLS manifest to split content
  • Place #EXT-X-PLACEMENT-OPPORTUNITY marker in the HLS stream file
  • Define the preconditioned attribute as true for the ingestURL element in the MRSS feed.
  • There should be the same number of cue-points as there are #EXT-X-PLACEMENT-OPPORTUNITY markers in the HLS stream.


  • 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 align with a keyframe/IDR frame and it must be at the beginning of the period.

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

Conditioned content

If your 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