Providing an SSAI live test stream with Open Source Cloud

Eyevinn Technology
5 min readMar 12, 2024

If you have been working in the streaming industry and client app development you know it can be difficult to have a live stream available where ads are inserted on a regular basis. It is not always the case that you can allocate a live pipeline for this testing when you need it.

In this blog post we will walk you through how you can create a live stream with in-stream ads for testing using Open Source Cloud and an SSAI-provider. In this example we will use AWS MediaTailor but there is nothing that prevents you from using the SSAI-provider you already have in your solution.

The concept here is that we will use a short VOD clip that is just a couple of minutes long and loop that one. Instead of encoding a live stream in real-time we will use a manifest-manipulation technique called VOD2Live and we will use the open source FAST Channel Engine to provide this pseudo-live stream. Between the loops the engine will insert a house-ad that will be replaced by the SSAI-provider. This gives us a live stream that on a regular interval will have an ad break. The duration of the VOD clip will determine how often you get an ad break.

Ads are provided to the SSAI-provider on a deterministic basis by an open source test ad-server. The test ad-server works as a regular ad-server with the specifics that it always provides ads and the tracking pixels are pointing back to the test ad-server. The test ad-server then provides an API where you can get what events have been tracked by the client. This gives the possibility to both manually but also automatically verify that the tracking implementation in the client application is functional.

Create an account on Eyevinn Open Source Cloud

Visit https://app.osaas.io and create an account and a tenant if you haven’t already.

Once you have created an account and a tenant you can start a subscription for FAST Channel Engine and create a channel.

Create a channel by looping a VOD

Click on Create channel button and a dialog pops up where you need to enter the URL to the VOD you wish to loop and the URL to the house ad that you want to insert between the loop.

In this example we give it the name “ssaitest” and use the type “Loop” as we just wish to loop the VOD. We then enter the URL to the VOD which in this case is a trailer for a couple of minutes. For the house ad we use the preroll-functionality and specifies the URL to the house ad we want to use and also need to indicate the duration of it in milliseconds. Once everything is entered you press Create.

Setup a test adserver

Start a subscription for the test ad-server service and create an instance.

We give the test ad-server the name “test” and we now have a live channel available at https://demo.ce.prod.osaas.io/channels/ssaitest/master.m3u8 and a test ad-server at https://demo-test.eyevinn-test-adserver.auto.prod.osaas.io

Configure AWS MediaTailor

The final step is to setup a stream in AWS MediaTailor. Login to your AWS account and go to AWS MediaTailor section. Create an Ad insertion configuration with the following configuration:

For content source we use the live stream provided by the Channel Engine. Notice that you will leave out the latter part of the stream URL. For the ad decision server we will use the test ad-server where we will provide with information on the duration of the ad break in the stream and client IP. Then press Create.

For HLS playback (currently only supported) you have the playback prefix in your configuration. Just add “master.m3u8” to the URL and you have the live stream URL, in this example https://8e6f035c55a840babc51250b5e68f205.mediatailor.eu-west-1.amazonaws.com/v1/master/1b8a07d9a44fe90e52d5698704c72270d177ae74/ssaitest/master.m3u8

And that’s it! Now you have a live stream available with ad breaks at a regular interval.

You can check what ads that have been served by the test ad-server with the following curl command:

curl -X 'GET' \
'https://demo-test.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions' \
-H 'accept: application/json'

For a complete reference of the API of the test ad-server you can click on Open API docs in the Open Source Cloud web interface.

Happy testing!

What is Open Source Cloud?

A software as a service based on open source with a unique transparent model where revenue is shared with the open source authors. Open Source Cloud offers media industry companies a quick way to incorporate open source in their solutions and the option to run the same software in-house as the source code is publicly available.

--

--

Eyevinn Technology

We are consultants sharing the passion for the technology for a media consumer of the future.