Mid-roll ads does not work on short video

Mid-roll ads works fine on long length video but not on short time video. I got a issue like this: video time is 15s long, ads video time is around 15s as well. I set up a pre-roll ads and a mid-roll ads with the position: “pre” and position:“50%” . the mid-roll was expected to start to play at around 8 seconds in the video. But what happened is the mid-roll ads was played afterwards the pro-roll ads. I am not sure how the “50%” argument works, does ads video length will be included in calculation the length of whole video? But the 50% setting works well long length video.

ads setup code:

adConfig = {
      advertising: {
        adBreaks: [
          {
            tag: {
              url: vurl,
              type: "vmap",
            },
          },
          {
           id:"pre-roll-ads"
            position: "pre",
            tag: {
              type: "vast",
              url: vurl,
            },
          },
          {
            id: "mid-roll-ads",
            position: "50%",
            tag: {
              type: "vast",
              url: vurl,
            },
          },
        ],
      },
    };

Hi,

Thanks for reaching to our community and apologies for the delay in responding.

In the above configuration, it seems you provided a vmap Ad first in addition to the pre / mid vast Ads. And all Ads use the same vurl.

Would it be ok for you to confirm which Ad format, VMAP or VAST, is used in the vurl?. As you may already know, with the “VMAP” Ad format, the Ad timeline is predefined in the VMAP Ad XML, hence we can’t modify the Ad break position. However, if the format is “VAST”, we should have the flexibility to determine the position, like “pre” or “50%”.

With regard to your “50%” query, the ads video length will NOT be included in the calculation of the length of the whole video. As a test, I generated a 15-sec DASH output using Big Buck Bunny and also set up “pre” and “50%” VAST Ads using the IMA Sample Ad tag as shown below. I confirmed the mid-roll Ad can be started around 7.5 sec in the timeline as expected. The test DASH output is available at least for a few days, so it’d be appreciated if you can also check the below output, and please let us know if you have any question.

    var conf = {
        key: 'YOUR KEY HERE',
        advertising: {
            adBreaks: [
                {
                    id: "pre-roll-ads",
                    position: "pre",
                    tag: {
                        type: "vast",
                        url: "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",
                    },
                },
                {
                    id: "mid-roll-ads",
                    position: "50%",
                    tag: {
                        type: "vast",
                        url: "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",
                    },
                },
            ],
        },
    };
    var source = {
        dash: 'https://storage.googleapis.com/bitmovin-api-europe-west1-ci-output/encoding_test/testSimpleH264AacFmp4HlsDash/stream.mpd',
    };

Best Regards,
Kazuhide

Thanks Kazuhide, I haven’t check community for a long time but I appreciate the suggestion and will try it.