SSAI in live video streaming

Looking back at Lumenalta, and at building a server-side ad insertion platform for live sports with MediaTailor, Go and real-time bidding.

4 min read

  • Career
  • Ad tech
  • AWS

Tomorrow I start a new chapter. Before I do, I want to look back at my time at Lumenalta and at the project that taught me the most: building server-side ad insertion for live sports streaming.

Remote, long before it was normal

Lumenalta, known as Clevertech until 2024, has been fully remote since it was founded in 2000, two decades before the pandemic made remote work mainstream. That experience shows in everything: how teams communicate, how trust is built, and how people grow.

I never met a single colleague in person, yet the bonds we formed were strong. The people are truly amazing, from the CEO to the coaches, engineers and managers. I especially loved the training. The idea that everyone is a leader runs through all of it, and playing Factorio together in a leadership training session is a memory I will keep.

Over the years I worked on many projects, helping different companies reach their goals. The one I spent the most time on, and learned the most from, was an ad server.

Building an ad server from scratch

Our client was a large US sports streaming service, at the time the second most-watched channel on Roku. We built their ad server from scratch, so that every ad break in a live game could be a customized experience for each viewer.

AWS was our workhorse, with AWS Elemental MediaTailor at the centre, and we wrote the ad decisioning service in Go.

What SSAI is

With traditional, client-side ad insertion, the video player does the work. When a break comes, the player pauses the stream, asks an ad server for an ad, and plays it from a different source. That often means buffering, ads blocked by ad blockers, and a different experience on every device.

Server-side ad insertion (SSAI), also called ad stitching, moves that work to the server. The ads are stitched into the video stream itself, so the viewer receives one continuous stream. Ads play as smoothly as the game, look the same on a Roku, a smart TV or a phone, and are much harder to block.

With MediaTailor, a live break works like this:

  1. The break is marked. The live encoder marks each ad break in the stream with a cue, usually an SCTE-35 marker.
  2. Every viewer gets a session. The player requests the stream through MediaTailor, which creates a personal session and a personal manifest, the playlist of video segments, for each viewer.
  3. The ad server decides. When a break comes up, MediaTailor calls the ad decision server with details about the session. Ours was the Go service we built.
  4. The answer comes back as VAST. The ad server replies with a VAST response, the standard XML format that lists the ads to fill the break.
  5. The ads are stitched in. MediaTailor prepares the ads for streaming and rewrites that viewer’s manifest so the ad segments sit between the game segments. It also reports which ads were seen.

If the ad server is too slow or returns nothing, MediaTailor falls back to a slate, so the stream never breaks. That makes speed a hard requirement.

Real-time bidding in the blink of an eye

Many of the ads in a break are not booked in advance. They are sold in an auction that runs while the viewer is watching. That is real-time bidding (RTB):

  1. The publisher offers the slot. A supply-side platform (SSP) represents the publisher, in our case the streaming service. It sends a bid request, usually in the OpenRTB format, describing the opportunity: the length of the break, the content, the device and the region.
  2. Advertisers bid. Demand-side platforms (DSPs) represent advertisers. Each one decides, in a fraction of a second, whether the opportunity fits one of its campaigns and how much to bid.
  3. The best bid wins. The highest bid wins, and the winning ad is returned as a VAST creative, ready to be stitched into the stream.

The whole auction has to finish in well under a second, before the break starts. Live sports make it harder: thousands of viewers reach the same break at the same moment, and every one of them is a separate auction. On top of that, a break is usually filled with several ads, called an ad pod, and each pod has to respect rules such as not showing two competing brands back to back.

Working with the giants

To build our own network of DSPs and SSPs, we integrated with many demand and supply platforms. That gave me the chance to work with engineers from Google, Amazon and many other companies that are giants in this space. I learned a great deal from them, and from the problem itself.

Thank you

Many great engineers from around the world worked on the projects I led, and I will always have fond memories of our time together.

A big thank you to Lumenalta’s leadership, to the engineers, and to the clients who trusted us to bring them closer to their goals.

Tomorrow, a new chapter begins at Neo Financial.