Ad Proxy

Understand how to use built-in VMAP generator to insert several ad breaks in a VOD stream

Ad scheduling for AVOD

If your ad server does not support the generation of a VMAP schedule to tell broadpeak.io where to insert ads in the VOD content, you can use the Ad Proxy feature to define that schedule and indicate how to interact with the ad server.

Creating the Ad Server source

To use this feature, at the time of creating your ad server Source, select the “AdProxy (VMAP Generator)” template.

Next, you need to provide a set of query parameters that configure the ad proxy for your use case:

ParameterDescription
bpkio_tag
(required)
VAST tag (ie. URL to the VAST-compliant ad server) that will be called for each ad break. It is recommended to URL-encode it, in particular if itself requires query parameters
bpkio_preIf set to “true”, a pre-roll ad opportunity is added to the schedule
bpkio_postIf set to “true”, a post-roll ad opportunity is added to the schedule
bpkio_midsUse this parameter to define the time points in the asset timeline where mid-roll ad opportunities need to be added. The time points can be expressed as:
- an integer or float number, defining the time as seconds from the start of the assets (with max 3 decimals)
- an expression in the form “HH:MM:SS” or “HH:MM:SS.sss”
bpkio_mids_freqInstead of using bpkio_mids, you can use this parameter if you want regular ad breaks. This parameter needs to be set to an integer or float number, defining the interval as seconds. You must also use bpkio_asset_length in combination with it
bpkio_asset_lengthWhen used in combination with bpkio_mids_freq, it allows you to define how long the asset is (in seconds), to ensure that the full duration of the asset has the correct mid-roll opportunities
bpkio_id_keyTo allow the ad server to determine where the ad opportunity is and serve ads accordingly, the Ad Proxy will add a query parameter to the VAST tag, the value of which is set to pre, post or midX (with X the position of the mid-rolls). By default that parameter is named breakId, but you can use bpkio_id_key to choose a different name.

Any other parameter (not starting with bpkio_) added to the query string will be passed through unchanged onto the VAST tag sent to the Ad Server.

Examples

  1. A schedule with just a pre-roll and post-roll, using the VAST tag https://my-ad-server.com/vast
    • bpkio_pre=true&bpkio_post=true&bpkio_tag=https://my-ad-server.com/vast
  2. A schedule with 3 mid-rolls at specific points, using the VAST tag https://my-ad-server.com/vast?campaign=123
  3. A schedule with a pre-roll and mid-rolls every 10 minutes for an asset 45 minute long, using the VAST tag https://my-ad-server.com/vast, and additional parameters to be forwarded to the ad server

Using dynamic parameters

It is likely that you will want to have some of these parameters defined dynamically for each asset in your VOD catalog, instead of being static for all assets. The Ad Proxy (VMAP Generator) supports the same functionality as other Ad Server sources, and can use macros passed in the service URL, as documented in Ad Macros.

For example, let’s say that you want to always have pre-rolls for all assets, but the mid-roll ad insertion points and category are defined on a per-asset basis with values defined by your CMS and/or player.

You could then configure the Ad Proxy (VMAP Generator) source to use queries such as bpkio_tag=https:%2F%2Fmy-ad-server.com%2Fvast%3Fcampaign=123&bpkio_pre=true&bpkio_mids=$arg_cuepoints&category=$arg_category. At playback, the mid-roll ad opportunity timing and category value would be passed as query parameter in the service URL, for example https://stream.broadpeak.io/2ab56412b1163ee1ee25696df4a230b7/bpk-vod/voddemo/index.mpd?cuepoints=30,60,90&category=teenager