3 Pitfalls to Server-Side Ad Insertion Architecture


Cable cutters are here to stay. The ever-increasing adoption of streaming services signals a permanent shift in viewing habits with live-streamed video traffic predicted to surpass non-live traffic by 2024. Adapting to the new reality of internet-based media consumption means reengineering the basic infrastructure behind media delivery. Advertising has always served as an important vehicle… Continue reading 3 Pitfalls to Server-Side Ad Insertion Architecture

Cable cutters are here to stay. The ever-increasing adoption of streaming services signals a permanent shift in viewing habits with live-streamed video traffic predicted to surpass non-live traffic by 2024. Adapting to the new reality of internet-based media consumption means reengineering the basic infrastructure behind media delivery.

Advertising has always served as an important vehicle for selling goods and services while providing consistent funding for media broadcasters. IP-based live streaming services offer advanced opportunities for microtargeting audiences far beyond the capabilities of traditional broadcast TV.

In fact, a recent survey of more than 200 advertisers and agencies conducted by Comcast’s advertising support firm FreeWheel, found that 52% of agencies were buying from OTT TV as well as traditional TV inventory in 2019, and 91% planned to do so by 2021.

While personalized ad targeting has already proven itself to be a valuable technique for monetizing live-streaming video services, the prevailing CDN-based infrastructure is an ineffective approach. Targeted ad placements are hard to execute, create high latency, and don’t meet performance parameters advertisers are accustomed to with broadcast TV. And there’s a whole realm of monetization opportunities associated with real-time interactive video streaming that is completely out of reach.

The best approach to advertising on OTT platforms is through server-side ad insertion (SSAI). Also known as ad stitching, SSAI is the process of combining content and ads into a single stream of video before delivering it to the player. SSAI eliminates buffering and avoids ad blockers unlike the alternative client-side ad insertion (CSAI) which uses a third-party ad server to deliver ads directly to the client. Since CSAI sends a separate file alongside the video content, it causes buffering and can be detected by ad blockers.

However, the current use of traditional CDN infrastructure for live stream delivery can cause issues with SSAI. As CDNs create high latency, this creates an issue for synchronization. Furthermore, they were developed with the intent of delivering static content. As such they are not equipped to fully respond to modern demands of dynamically generated, live-streaming content.


As we’ve said before, latency is a problem for live-streaming video. While it’s key to creating an interactive experience, it’s also important to ensure smooth delivery of your live stream.

Take for example this year’s broadcast of America’s largest sporting event, the Superbowl where the fastest latency was 28 seconds. Some even saw the game with around a minute of latency. That’s plenty of time for someone at the stadium or watching on a broadcast network to text or tweet spoilers to one of the world’s most-watched events, certainly nowhere near real-time streaming. Not to mention the issues this could create for gambling. Forget spoilers, that’s just plain cheating.

Real-time latency is opening up interactive features that extend beyond passive viewing such as a fan wall or watch party with your friends. The NBA, for example, is one of the major interests behind bringing fans into the stadium virtually. This entails creating a video panel that displays selfie videos of fans as they’re enjoying, score dependent, the game. By capturing audience feedback in real time, crowds can actually cheer as something happens. Not only does this improve the fan experience, but the players enjoy it too. Other live events such as concerts and stand-up comedy performances can benefit from the same technology.

A real-time latency of under 500 milliseconds ensures that everything stays in sync. However, HTTP-based CDN delivery cannot achieve this as they depend upon caching content in order to facilitate the process of delivering it. The protocols used by traditional CDNs result in a latency of over 1 second at the very fastest. That is far too high. The only way to achieve real-time latency is with WebRTC.

As such, high-latency causes issues when SSAI is used with CDNs. In order to deliver the correct ad to each client, a CDN manipulates the manifest file for each video to pull the ad from remote ad servers and insert them at CDN edge points. This leads to costly placement misses and adds, at a minimum, several seconds to stream latency.

The scope of the problem is reflected in statistics that show HTTP-based ad performance falls far short of the long-established norms in legacy TV advertising. Data from advertising metrics tracker Conviva revealed that ads failed to play as intended at least once in 36.5% of the viewing sessions. Most of these failures involved long buffering delays but also included complete misses stemming from mismatches in formatting or errors in ad selection.

Additionally, there’s a growing problem impacting latency caused by mismatches between the personalized ads delivered by ad servers and the ad breaks they are meant to fill.

While default modes in ABR-based SSAI operations assume ad servers will return ads perfectly fitted to the break window, that’s frequently not the case owing to the difficulties of maintaining accuracy in the fast-paced live-streaming environment. As long as there is unfilled ad space in ad breaks, no matter how short, and there are ads available for clients to call from servers, the system will insert an ad, adding tens of seconds of unexpected latency.

Moreover, added latency is introduced when multiple ad servers are involved, as is often the case, especially in programmatic ad operations. It can take many seconds before a client manifest directs the call to the right ad server.

Data Synchronization

Latency is closely tied to synchronization. While one way to create synchronization is to add a buffer to allow extra time for everything to catch up, this adds latency which is a problem for live content. Rather, it is better to deliver everything as quickly as possible.

As discussed above, the use of WebRTC creates this real-time latency. A cloud-based infrastructure consisting of edge and origin servers, such as the ones used by emerging XDN technology, ensures that all audio-visual (A/V) content, data, and ads are delivered in unbroken streams from origin servers to edge nodes, where servers leveraging intelligence about each user can combine and stream the different elements in perfectly synchronized per-session configurations.

However, there is a potential issue that could arise from real-time stream delivery. It is impossible to predict the amount of time it will take to retrieve an ad from a third-party service which could mean that an ad break comes up faster than content is available. As such, there needs to be a configurable back-up video ad or slate to be played in the case that the service does not return the ad in time. A group of personalized ads scheduled for a slot in an ad break can be streamed in real time just prior to the ad break for brief caching at each edge node, where they can be inserted in precise sync with the streams as they are unicast to each user.

Multidirectional Streaming with Full Geographic Distribution

Setting up an XDN consists of a server software stack deployed in a hierarchy organized in three-tiered clusters across one or more private or public cloud environments. Each cluster consists of one or more origin nodes where encoded content is ingested and streamed to relay nodes, each of which serves an array of edge nodes that deliver live unicast streams to their assigned service areas. All nodes can be deployed on low-power consuming virtual machines anywhere in the world to deliver real-time experiences with video simultaneously at any distance to any number of clients, from one to millions.

The multidirectional flexibility of this architecture can be applied so that whenever anyone at any moment of a streamed session chooses to deliver a video communication, that user’s stream will be conveyed along with any marketing enhancements to everyone else. Because any participant in a viewing session can be enabled to stream content to participants anywhere, the SSAI capabilities of an XDN can be applied to insert ads on those streams as well as the core content streams. This is useful for use cases such as watch parties where user-generated streams won’t necessarily be coming directly from the main origin server sending out the broadcast content that all the participants are watching.

With unicast delivery of streamed video, dynamic insertion of ads based on geographic, demographic, or more personalized profiles is easier to execute and scale than was ever the case in TV advertising.  Running the process on edge servers allows for the insertion of the appropriate ads based on the region where the server is deployed or individually targeted for each viewer. The XDN clustered architecture involves groups of servers deployed in different regions. In this way, each video stream viewer can connect to a geographically close server to have the best performance. Instances deployed in a certain region, for example US East, are likely to serve mostly users located around that geographic region. Therefore, the edges in each region could retrieve and insert into the live stream an ad targeted for that region that may be different than that of other regions.

What’s Next for SSAI?

XDN technology is designed to meet the needs of modern live streaming as an effective server-side ad insertion infrastructure. Although advertisements are an essential part of generating revenue for media broadcasts, the new and ever-increasing adoption of streaming services means users are much less tolerant of advertisements in general.

The issue may stem from how traditional cable was an established part of the media landscape and benefitted from the feeling that “this is how it’s always been.” The emergence of paid streaming services have given consumers a chance to reexamine how they were paying for a service that still served them advertisements. However, the reality is that you can’t get good content for free; someone has to pay for it. As such consumers accept advertisements on free products but tend to be frustrated by ads on paid content.

The emergence of ad personalization is an opportunity to show the benefits of advertisements not just for broadcasters but for viewers as well. No matter how we feel about ads, we all love to buy things. The impetus lies in creating a smoother process for ad insertion.

Importantly, XDN technology unlocks new avenues for personalized ad insertion making the ad content both relevant and valuable to each user. Take for example the case of ad overlays which can be produced by independent entities in partnership with core content providers. Overlays can be applied at XDN edge nodes with each unicast stream positioned anywhere on viewers’ displays to deliver any combination of text, graphic, or video messaging.

The placement may be on an overlayed strip at the bottom or elsewhere on the screen, or it can be implemented as a standalone element within the video frames. It might appear in a small video window or as a text message floating over the scene.

Advanced processing of live streams can identify flat plains or visual areas that do not include content of interest such as a wall behind a person in the video frame. Or it might be an ad placed in a location designated in production for such messaging, such as a sign on a fence at the ballpark or a billboard along a NASCAR track.

When combined with geographic distribution, ads can be swapped out depending upon where each viewer is watching. For example, if a Boston Bruins fan is watching a hockey game played in the Montreal Canadians home rink, they can be served ads for their beloved Dunkin Donuts rather than the Canada-based Tim Hortons.

Making ads valuable to consumers as well as content producers will make everyone happy. The advanced capabilities of XDN technology are creating new opportunities for increasing the value of advertising.

Interested in taking advantage of these opportunities yourself? Let us show you what Red5 Pro can do by sending an email to info@red5.net or schedule a call.