A Dynamic Ad insertion service has one main purpose : monetize your video Assets. This Service is based on a content - live or asset catalog - and uses an ad server to identify the ads that have to be inserted. In this article, we will set a pre-roll ad insertion Service for VOD by going through the following steps:
- Create a VOD catalog as a Source
- Create an ad server as a Source
- Create an ad insertion Service
- Preview the service & retrieve the output URL
If you want to implement a Service but you don’t have relevant Sources yet, we provide Sources samples you can use in your own tests.
& asset sample: sintel/manifest.mpd
An asset catalog is defined by a path that indicates where the assets are stored. broadpeak.io needs to have an asset sample to validate that the plateform can handle the format of the stored video assets.
We can notice that a small status box indicates that the source is valid and can be created.
The ad server is a request url that returns a VAST or VMAP file (XML). This file indicates a list of URLs to commercials that have to be inserted. In this example, we keep it simple : the VAST always indicates a single ad of 20 seconds.
Usually, the ad server is a third-party that dynamicaly returns different ads according to the user profile. This decision is made thanks to query parameters. These query params are part of the request made to the ad server. Some usually come from the player's request to match ads with user's profile. The "ad server queries" field is there to set this behavior. To keep things simple, we don't use this option in our current scenario.
Once we have our 2 main components - an asset catalog & an ad server - created as sources, we can start building our service. Several ad insertion scenarios are possible. Here we want to insert ads in each VOD stream. Choosing an asset catalog as a source for our service will lead us to this use case.
Some attentive users may have noticed a Transcoding option here. Transcoding is usefull when ads are not already encoded. In such situation, a transcoding profile is necessary to transform the original ads in a format that is compatible with the VOD asset. The transcoding profile is part of your account settings; if your account needs some, please reach the support team out. And if you are using your own sources (ad server and VOD catalog) without transcoding, be sure the encoding is the same for the 2 sources.
Is our service ready to operate ? Let's check that with the preview page, from your service list.
See, the preview uses the asset sample we declared when creating the asset catalog. broadpeak.io creates a path as service output URL. To request any video of our catalog with a pre-roll ad insertion, we just have to replace the original path by the new one in the VOD request. This VOD request can be tested in any video streaming player.
- For our sample asset, here is a comparison between original and new url:
VOD's original url : origin.broadpeak.io/bpk-vod/voddemo/default/5min/sintel/manifest.mpd
VOD url with ads : stream.broadpeak.io/xxxxhashxxxx/bpk-vod/voddemo/default/5min/sintel/manifest.mpd
- But of course that works with another asset of the same catalog
VOD's original url : origin.broadpeak.io/bpk-vod/voddemo/default/5min/cosmoslaundromat/manifest.mpd
VOD url with ads : stream.broadpeak.io/xxxxhashxxxx/bpk-vod/voddemo/default/5min/cosmoslaundromat/manifest.mpd
Updated about 1 month ago
Do you want to discover Ad insertion in detail ? Please visit our dedicated section