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:
- Creating a VOD catalog as a Source
- Creating an ad server as a Source
- Creating an ad insertion Service
- Previewing the service and retrieving the output URL
If you want to implement a Service but you don’t have any 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 parameters are part of the request made to the ad server. Some of them usually come from the player's request, to match ads with user 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 created our two main components - an asset catalog and an ad server - 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 useful when ads are not already encoded. In such a 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 two 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 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 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 3 days ago