Server-less OTT-Only Playout

We asked ourselves the question: If we would startup a TV channel for distribution only over the Internet (OTT) today, how would a technical solution for this look like? The answer to this question was elaborated around in a previous post here, and now we have at our website tv.eyevinn.technology a proof-of-concept demonstration of a fully “server-less” OTT-only TV channel playout. In this post we will describe how this was done.

Image for post
Image for post
System Architecture for a Server-less OTT-only Playout

Channel Engine

The component that dynamically stitch these VOD packages together is what we call the Channel Engine. It is a NodeJS application deployed on Heroku. Heroku is an app-engine platform that allows you to easy scale up and down to meet performance requirements.

Image for post
Image for post
server.get('/live/master.m3u8', function(req, res) {
session = generateNewSession();
res.send(
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=300000,RESOLUTION=...
master300000.m3u8;session=$session
#EXT-X-STREAM-INF:BANDWIDTH=600000,RESOLUTION=...
master600000.m3u8;session=$session
...
);
});

server.get('/live/master(\d+).m3u8;session=(.*)', function(req, res) {
bandwidth = $1;
session = $2;
vod = getCurrentVod(session);
mediaSequence = getNextMediaSequence(vod, session);
res.send(mediaSequence.m3u8);
});

Content Distribution

While the Channel Engine is responsible for providing the video players with the HLS manifests they need, the actual video segments from the VOD package is distributed over a CDN. In this solution we have placed the VOD packages in an AWS S3 bucket connected to an AWS CloudFront CDN. With this model we don’t need a web server running 24x7 as that is handled by AWS and we have a cost-model that is based on the amount of content stored in the bucket and the amount of data transferred out from the bucket over the CDN. When no-one is requesting any video segments we only pay for the cost of storage.

Frontend Distribution

In a similar fashion the frontend and user-interface (the tv.eyevinn.technology website) is distributed from an S3 bucket and CloudFront CDN. As the website doesn’t need any backend logic and only need to serve static HTML, images and Javascript files there is no need for a web server.

Content Ingest

To get content into the system, transcoded and packaged to VOD HLS packages we use an Elastic Transcoder pipeline. A Elastic Transcoder job is created by a Lambda function that triggers on an S3 bucket create object event.

Image for post
Image for post
Lambda function to trigger transcoding job

Asset Manager API

The Channel Engine is only responsible for stitching VOD assets together and to know what VOD assets to stitch together it requests a VOD via the Asset Manager API. The Asset Manager API is a Lambda function exposed through an API gateway and at the time of writing it provides an endpoint that randomly picks a VOD from the Dynamo DB. This is the area where we have a lot of potential to customize and personalize the TV channel. More on this in a later post.

Demo

To directly play “your” live HLS stream you can just put the following link in your HLS player (click on it on Apple devices): https://ott-channel-engine.herokuapp.com/live/master.m3u8 or go to our website: https://tv.eyevinn.technology/ (works best on a desktop PC or Mac).

  • Email: jonas.birme@eyevinn.se

Written by

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store