❆ Creating a Content Replacement Service
How to activate Content Replacement on a video live stream
A content replacement service is based on a main live source. The service replaces, for a dedicated period (a “slot”), the main stream with an alternative stream : the replacement content. This content can be a live, an asset or a slate source. In this article, we will go through the following steps:
- Creating a main live source
- Creating a replacement source
- Creating a content replacement service
- Previewing the service and creating a first slot
- Creating more slots
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.
Creating a main live source
Sample : https://origin.broadpeak.io/bpk-tv/cycling/default/index.m3u8
This source delivers the main video stream, that will be modified by broadpeak.io.
- From the Source tab of the web app, click Create New.
- Select the Live source type.
- Give a name to your source.
- Enter a URL.
Note that it has to be a Live source. If not, broadpeak.io won't let you finalize your source creation.
Creating a replacement source
Sample : https://origin.broadpeak.io/bpk-tv/bo2/default/index.m3u8
Guess what? The process is the same! The only difference here is that you can choose other types of video sources, when it comes to replacement source. That may be an asset (VOD), a slate or a Live source. For this example, we have a live source as a replacement content.
You just have to pay attention to the compatibility between this replacement source and the main source. To read more about sources compatibility (HLS vs DASH, codec versions, same server origin, clock synchronization, HTTP vs HTTPS…), please check this page for guidelines.
Creating a Content replacement service
Now, we need to implement the service itself, to ask the platform to replace, during given periods, the main content by a replacement one.
- From the Service tab, click Create New.
- Select the Content Replacement service type.
- Give a name to your service.
- Select your live source as original content, and the replacement source as replacement content.
Note that the replacement content is a default content. It will be used for any content replacement slot, in case no other replacement source is identified.
At the end of the creation process, we get an output URL that will display the desired replacement service. We can use it in any compatible video player.
But without any forecasted slot, we may not be able to check that the content replacement service is operational. Let's see how we can do that.
Previewing the service and creating a 1st slot
Once the service is created, we can preview it and create a test slot. From the service tab, we can access to a preview page to compare the main live source and broadpeak.io’s output stream. This output stream will display the content replacement slot; the main live source won’t.
From there, the button Create content replacement slot creates a first slot of 30 seconds in 30 seconds. We just have to wait and see the content replacement to happen.
To go further, we can get the output URL from the service and past it in any compatible video player.
Creating more slots
Now, we may want to be able to create more slots and choose a start time and duration.
- From the Services tab, click the icon just next to the preview button in the service list.
From there, we can check the created slots, for example the one that has just been created for the test slot, and create new slots.
- Click Create New.
3. Choose a duration for your slot or choose a end-time. These two fields are dependant on each other.
4. Identify a source for the replacement content that has to be displayed during the slot. If no source is identified there, the default content will be used during the slot.
The most curious may have noticed that there is an option regarding categories. This option is related to personalization: only a certain part of the audience may be. But it's a another story.
For now, our service is set, and ready to operate! Well done!
Updated 10 months ago