Create 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 are about to walk through the following steps:
- Create a main live source
- Create a replacement source
- Create a content replacement service
- Preview the service and create a 1st slot
- Create 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.
Create 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. The “Source” tab of the web app is the place where you can create this source.
Note that it has to be a Live source. If not, broadpeak.iowon't let you finalize your source creation.
Create 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 (HLSvsDASH, codec versions, same server origin, clock synchronization, HTTPvsHTTPS…), please check this page for guidelines.
Create 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. In this purpose, we are using the “service” tab to create a new one.
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 slot froecasted, we may not be able to check that the content replacement service is operationnal. Let's see how we can do that.
Preview the service and create a 1st slot
Once the service is created, we can preview it and create a test slot. From the service tab, we can acces 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 a 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.
Create more slots
Now, we may want to be able to create some more slots and choose a desired start time and duration. Well, this is the icon just next to the preview button in the service list. From there, we can check the created slots (see, we have already the one that just has been created for the test slot) and create new slots.
When creating a slot, we have different options
- Choose a duration for your slot or choose a end-time. These 2 fields are dependant on each other.
- 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 catergories. This option is related to personalization : only a certain part of the audience may me . But it's a another story.
For now, our service is set, and ready to operate ! Well done !
Updated about 1 month ago