Adding ad opportunities to FAST channels in Open Source Cloud

Eyevinn Technology
4 min readSep 23, 2024

--

In this blog we will give an example on how you with Open Source Cloud can build FAST channels containing ad placement opportunities for a dynamic ad inserter as one way to monetize on these type of channels.

What are FAST Channels?

FAST channels offer free, ad-supported streaming TV experiences to viewers without requiring a subscription. As demand for free content grows, content creators and distributors are turning to FAST as a monetization strategy. A successful FAST channel strategy involves assembling linear content streams, ensuring high-quality delivery, and dynamically inserting ads, all while maintaining flexibility for content changes and scheduling. You can read more about FAST channel creation in Open Source Cloud in a previous blog.

Insertion of ad placement opportunities

The way this works is that we will insert a “house ad” in the source VOD that is played out by the engine. This house ad gives an opportunity to be replaced using a server-side ad inserter (Yospace, AWS MediaTailor, Nowtilus, to mention a few). The server-side ad inserter is connected to the ad server who takes decision on what ads to serve for a particular user or session.

The diagram above illustrates how a setup can look and in this case using the open source Test Adserver to emulate a real ad server. To insert the “house ads” in the source VOD we will use the HLS VOD Stitcher available in Open Source Cloud.

Create stitcher

First we need to launch an HLS VOD Stitcher instance.

This stitcher instance works as a proxy between the original source VOD and the FAST channel engine. The proxy will insert another VOD at the instructed positions. We instruct the proxy the location of the source VOD, location of the VOD to insert and at what position to insert it by constructing a payload that is passed to the proxy as a query parameter.

The payload is a base64 encoded JSON and can look like this.

{
"uri": "https://maitv-vod.lab.eyevinn.technology/UNHINGED_Trailer_2020.mp4/master.m3u8",
"breaks": [
{ "pos": 0, "duration": 15000, "url": "https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8" },
{ "pos": 20000, "duration": 15000, "url": "https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8" }
]
}

We then base64 encode the JSON and get.

ewogICJ1cmkiOiAiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9VTkhJTkdFRF9UcmFpbGVyXzIwMjAubXA0L21hc3Rlci5tM3U4IiwKICAiYnJlYWtzIjogWwogICAgeyAicG9zIjogMCwgImR1cmF0aW9uIjogMTUwMDAsICJ1cmwiOiAiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9WSU5OLm1wNC9tYXN0ZXIubTN1OCIgfSwKICAgIHsgInBvcyI6IDIwMDAwLCAiZHVyYXRpb24iOiAxNTAwMCwgInVybCI6ICJodHRwczovL21haXR2LXZvZC5sYWIuZXlldmlubi50ZWNobm9sb2d5L1ZJTk4ubXA0L21hc3Rlci5tM3U4IiB9CiAgXQp9

We can test this payload by providing it to the stitcher we created. Open up the following URL in an HLS video player:

https://eyevinn-guide.eyevinn-lambda-stitch.auto.prod.osaas.io/stitch/master.m3u8?payload=ewogICJ1cmkiOiAiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9VTkhJTkdFRF9UcmFpbGVyXzIwMjAubXA0L21hc3Rlci5tM3U4IiwKICAiYnJlYWtzIjogWwogICAgeyAicG9zIjogMCwgImR1cmF0aW9uIjogMTUwMDAsICJ1cmwiOiAiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9WSU5OLm1wNC9tYXN0ZXIubTN1OCIgfSwKICAgIHsgInBvcyI6IDIwMDAwLCAiZHVyYXRpb24iOiAxNTAwMCwgInVybCI6ICJodHRwczovL21haXR2LXZvZC5sYWIuZXlldmlubi50ZWNobm9sb2d5L1ZJTk4ubXA0L21hc3Rlci5tM3U4IiB9CiAgXQp9

When playing this you will see that at 0 and 20 seconds into the VOD you see the house ad.

Provide stitched URL to engine

When providing the engine with the URL to play out we will use the stitch-proxy URL instead. We can for example update the WebHook from previous blog.

const { randomUUID } = require('crypto');

exports.handler = async (event) => {
const channelId = event.query.channelId;
console.log(`Requesting next VOD for channel ${channelId}`);

const vods = [
'https://lab.cdn.eyevinn.technology/stswetvplus-promo-2023-5GBm231Mkz.mov/manifest.m3u8',
'https://lab.cdn.eyevinn.technology/Channel-Engine-Promo-Mar-2023-PnA8E-jw5x.mp4/manifest.m3u8',
'https://lab.cdn.eyevinn.technology/eyevinn-reel-feb-2023-_2Y7i4eOAi.mp4/manifest.m3u8'
];
const vod = vods[Math.floor(Math.random() * vods.length)];
const payload = {
"uri": vod,
"breaks": [
{ "pos": 0, "duration": 15000, "url": "https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8" },
{ "pos": 20000, "duration": 15000, "url": "https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8" }
]
};
const encodedPayload = Buffer.from(JSON.stringify(payload)).toString('base64');
return {
body: {
id: randomUUID(),
title: 'Example',
hlsUrl: 'https://eyevinn-guide.eyevinn-lambda-stitch.auto.prod.osaas.io/stitch/master.m3u8?payload=' + encodedPayload
}
};
};

Now when playing the channel we created you will find that in the beginning and 20 seconds into the VOD there will be house ad inserted. When this channel is passed to an server-side ad inserter this house ad will be replaced with ad decided by the ad server. This is outside the scope of this guide.

Conclusion

As this example shows you you can build and launch FAST channels ready for monetization based on open source software without having to build, deploy and host it yourself.

Sign up and try it out is all for free and you only need a credit card to upgrade to a paid plan.

For more detailed technical documentation and service descriptions, visit the Open Source Cloud FAST Channel Engine documentation.

--

--

Eyevinn Technology

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