April 5, 2021

How to optimize session drift in live streams with server-side ad insertion

By Anna-Katharina Reykowski, Senior Product Manager, Verizon Media

Online distributors of sports and other live streamed events need to engage and retain viewers for optimal monetization. Many streaming service providers utilize dynamic advertising, delivering a more personalized experience to viewers than traditional broadcasts. However, when leveraging this technology, providers may notice unanticipated increases in latency or unfilled ad spaces that can negatively impact revenue. More often than not, this is a result of mismatches between program ad breaks and the duration of individual ads sent by ad servers to fill those breaks. These inconsistencies may result in longer than desired ad breaks, which lead to increases in stream latency. If left unmanaged, these increases can adversely affect the live viewing experience and may lead to user abandonment.

While the inconsistencies mentioned above will always exist, distributors relying on our Smartplay manifest generation technology can mitigate the impact. By fully managing individual viewing sessions, Smartplay offers customers complete control to optimize the tradeoffs between minimizing latency and maximizing revenue on every stream, at scale, based on their needs. Keep reading to better understand session drift and to learn about solutions that help you deliver a great user experience while optimizing monetization.

The session drift challenge

Server-side ad insertion (SSAI) is the preferred method for monetizing long-form video. The direct connection with ad servers creates fewer hops on the client-side, avoids ad blockers and improves the overall viewing experience. While SSAI technology often works on the assumption that the ad servers will return ads that perfectly fit in the allotted ad break window, in reality, this is rarely the case. Inevitable uncertainties in ad lengths can cause unintended extensions of ad breaks, known as session drift.

Session drift can introduce the “spoiler effect” that occurs when content is delivered at varying latencies depending on the distribution channel and viewing session, potentially tarnishing a live event’s appeal. Distributors typically want to avoid having viewers learn about a goal, touchdown or other exciting play through one channel while they are still watching the play unfold on another. Session drift from dynamically inserted ads can compound this problem, creating the need for technology that proactively manages the unpredictable nature of live events and dynamic ad insertion for millions of concurrent viewers.

There are many reasons mismatches between desired and actual ad break duration can occur. Sometimes there are unplanned ad breaks, such as when a player becomes injured during a live streamed sporting event. The event goes into an ad break, but the break duration is unknown when it begins. In this case, a default ad break duration prevails until an updated signal is received with the actual desired length. The default ad duration is passed to the ad server at the beginning of the ad break. The ads returned are typically intended to fill a much longer ad break than is needed. The result is a total duration of ads that exceeds the allotted time for the ad break, cueing the addition of time to the ad break before the primary content resumes.

In other scenarios, the ad break and duration are inserted into the stream almost at the same time as live content transitions to the ad break, leaving no time to contact the ad server to retrieve and process the ads. In this case, a viewer will see ad slate until the first ad is retrieved from the ad server and stitched into the manifest. Another factor adding to this challenge is the industry’s increasing adoption of programmatic advertising and the reliance on multiple ad servers to deliver those ad campaigns. It often leads to delays in selecting ads as well as locating ad servers. These delays can lead to placements of slates at the beginning of the break, followed by ads that then extend into the core content stream.

Even when ad breaks insert with sufficient advance notice, ad servers rarely deliver multiple ads that match the precise designated ad break length. The total consumption time of the delivered ads can often be longer than the intended ad break, extending session drift and opening the spoiler effect door. If time remains in the ad break, even if it is just a few seconds, the next ad delivered by the ad server is usually stitched into the stream without consideration of its length. This can increase session drift by several seconds, depending on ad length.

Solving the challenge

Verizon Media offers two approaches to controlling session drift with dynamic ad insertion in live streams. The default setting maximizes monetization and only drops ads occasionally; resumption to live content is seamless, with a direct transition from ads to live content without slate. The other solution implements a more flexible approach to mitigating session drift by providing distributors the necessary tools to balance, on a granular per-session basis, the tradeoffs of maintaining the lowest latency versus minimizing revenue loss. Customers will need to determine and set a limit, or flex buffer, for allowable seconds that each session can drift away for a given live stream. Verizon Media manages each session to meet these customer-determined goals through precise and intelligent monitoring of the ads’ duration across all viewing sessions.

Achieving optimal outcomes with flex buffering

Flex buffering is built on the intelligence, efficiency and scalability of our cloud-based Media Platform. Smartplay manifest servers manage the complex variables involved in personalizing live streams across thousands of sessions worldwide. And during peak traffic, Smartplay efficiently processes a quarter-million playlist requests per second while easily facilitating half a million ad insertions per minute during peak traffic. The intelligence essential to orchestrating the application of flex buffering with any given live streamed event across millions of simultaneous users is intrinsic to Smartplay’s 1 to 1 session management feature. (Read more about manifest technology here.)

To improve the viewing experience while maximizing monetization, each customer needs to determine the optimal session-drift limit for their live streamed program. As demonstrated in the use case examples below, campaigns with configurations that have a majority of shorter spots over longer avails will achieve better results. The rule of thumb for all customers is that, as the flex buffer’s value increases, so does monetization. In other words, the higher the allowable session drift is set, the more opportunities to deliver more ads and fewer instances of slate.

So, how much session drift is tolerable in light of latency concerns? Customers can rely on Smartplay in default mode or work with us to test scenarios and determine the degree of session drift that works best with their unique ad campaign configurations. Ads extending past the specified time will drop, returning the session to the desired latency, with slate filling any gap between the last ad until live content resumes.

As with other Smartplay settings, flex buffer activates via simple URL parameters that govern each viewer’s engagement. For example, ad.flex=2 means that the flex buffer allows two seconds of session drift, and ad.breakend=drop indicates ads exceeding the flex buffer will drop.

Flex buffering in action

Customers will want to choose a flex value that is neither too aggressive in diminishing session drift nor so lenient that drift goes beyond tolerable latency. Typical ad length durations within the campaign and the potential for underfilling should also be considered. Ad campaign configurations impact both of these. Figure 1 below shows actual results from one test comparing three flex settings over a three-hour live streaming session.

Figure 1. It is important to choose a flex value that is neither too aggressive nor too high in order to deliver the best balance of optimal viewing experience and maximum monetization.

In this example, the 2-second flex setting consistently delivers the lowest time behind live but drops nine ads and inserts 103 ad slate segments that add up to 206 seconds. A 16-second flex buffer adds significant session drift but gains nothing over the 8-second flex option. The obvious choice is the 8-second flex buffer.

The following graphics illustrate different viewing experiences resulting from a 2-second flex buffer with the same live stream but with varying ad payloads. Ad slates are inserted in 2-second lengths matching the chunk durations of the streamed core content.

Figure 2 below illustrates the results with the ad.flex=2&ad.breakend=drop URL extension with typical ad spot lengths.

Figure 2. An example of a 2-second flex buffer with varying ad payloads.

Here the 1-second extra duration of two ads ending two breaks has consumed the allotted flex time. The last ad in the third break is too long and will drop, leaving 28 seconds of ad slate and correcting the 2-second drift.

Figure 3 below looks at a scenario similar to the one in figure 2 but with longer ad durations. The sum of all the ads in the first and second break once again exhaust the allowable flex buffer, and the last ad in the third break will drop. However, this time the last ad is twice as long as in the previous example, resulting in a full 58 seconds of ad slate to correct the 2-second drift.

Figure 3. A 2-second flex buffer with longer ad payloads.

In Figure 4 below, we see the results when the ad server doesn’t return enough ads to fill break two, resulting in ad slate having to fill the gap. In this case, because the chunk lengths are 2 seconds, there’s no way to match the 59-second gap with 2-second ad slate chunks precisely. Consequently, 60 seconds of ad slate are inserted, and the 1-second drift introduced in the previous ad break cannot be corrected.

Figure 4. Because the ads are longer in this example versus the one above, this session’s viewer will see a lot more ad slate than the viewer will in figure 3 (58 seconds vs. 28 seconds).

Figure 5 below compares how the use of the 2-second flex buffers (illustrated in figures 2, 3 and 4) plays out across three different viewing sessions. While ad lengths and fill rates vary from session to session, the core content stream resumes timing after all breaks are nearly simultaneous across the three sessions. However, viewers of sessions two and three endured almost twice as much ad slate as the viewer of session one. Further evidence that the campaign configurations that avoid underfill and include shorter ads toward the end of the break are the best to minimize slate when session drift control is desirable.

Figure 5. Side-by-side comparison of figures 2, 3 and 4 for a single session.


Live-streamed content distributors who are monetizing their long-form video content with SSAI through our Media Platform are well-positioned to proactively fine-tune viewing experiences at scale and reduce unnecessary revenue losses. They can do this while ensuring optimal balance between latency, ad drops and ad slate by applying the flex buffering solution only available with Smartplay.

Customers repeatedly confirm that finding the best flex buffer delivers a high-value return on time invested. Most discover that once they’ve chosen a buffer for use with a specific session, they get satisfactory results with other live streamed events on an ongoing basis with considerable improvement over default SSAI operations. Through testing supported and guided by Verizon Media, customers can experiment with expected outcomes from various flex settings and given ad break configurations of future live streaming events. They can adjust settings to achieve the results that best suit their needs and will gain greater certainty about what to expect in an increasingly volatile advertising arena.

To learn more about the testing process and other aspects of setting optimal flex buffers, contact your account manager or connect with us today.

Contact us



Manage your account or get tools and information.

More info