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:
Parameter | Description |
---|---|
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_pre | If set to “true”, a pre-roll ad opportunity is added to the schedule |
bpkio_post | If set to “true”, a post-roll ad opportunity is added to the schedule |
bpkio_mids | Use 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_freq | Instead 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_length | Used in combination with bpkio_mids_freq to define how long the asset is (in seconds). This ensures mid-roll opportunities cover the full duration of the asset. |
bpkio_id_key | To 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
- 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
- A schedule with 3 mid-rolls at specific points, using the VAST tag https://my-ad-server.com/vast?campaign=123
bpkio_tag=https:%2F%2Fmy-ad-server.com%2Fvast%3Fcampaign=123&bpkio_mids=30,200.42,00:05:23.12
- This will create 3 ad opportunities:
- A first mid-roll at 00:00:30 with VAST tag https://my-ad-server.com/vast?campaign=123&breakId=mid1
- A second mid-roll at 00:03:20.420 with VAST tag https://my-ad-server.com/vast?campaign=123&breakId=mid2
- A third and final mid-roll at 00:05:23.120 with VAST tag https://my-ad-server.com/vast?campaign=123&breakId=mid3
- No pre-roll or mid-roll
- 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
bpkio_tag=https://my-ad-server.com/vast&bpkio_pre=true&bpkio_mids_freq=600&bpkio_asset_length=2700&category=teenager&genre=sports&bpkio_id_key=position
- This creates 5 ad opportunities:
- A pre-roll with VAST tag https://my-ad-server.com/vast?category=teenager&genre=sports&position=pre
- 4 mid-rolls every 10 minutes up to 00:40:00, with VAST tags https://my-ad-server.com/vast?category=teenager&genre=sports&position=mid1 to …mid4
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
Updated 5 months ago