CSAI vs SSAI understanding principles

Jan Sunavec
7 min readJan 23, 2023

Delivering video ads on connected TV (CTV) presents many technical challenges. However, using either client-side ad insertion (CSAI) or server-side ad insertion (SSAI) can help seamlessly integrate ads into the content stream.

To determine which option is best for your needs, it’s important to understand the technical differences between CSAI and SSAI.

CSAI

The ‘C’ in CSAI stands for client, which means that ads are inserted on the user’s device, typically during video playback.

From an application perspective, the basic schema for CSAI works as follows:

While the video is playing, the client application requests an ad from the ad server. Once the ad is received, a new video player appears and plays the ad, while the main video content is paused. Once the ad break is over, the ad player is hidden and the main video player is resumed. During ad playback, the client application sends out tracking events.

It’s important to carefully consider the consequences of using CSAI, as outlined in the previous lines. Let’s summarize the pros and cons of using this method.

Pros:

  • No video chunks. One of the advantages of using CSAI is that you don’t need to use video chunks — only one file is necessary. You can use an MP4 video container, which simplifies the technical stack.
  • Ads and video content are isolated in different video tags, which means you can use different video and audio codecs for video ads and for the main content.
  • CSAI also supports SIMID/VPAID, allowing you to play anything within an isolated sandbox. However, it’s important to note that not all CTV platforms support JavaScript, such as Roku with BrightScript and FireTV with an Android ecosystem. Additionally, even if a JavaScript engine is present, it doesn’t guarantee that your script will run properly on CTV devices, which may not be up-to-date.
  • Dynamic ad breaks. Another advantage of CSAI is the ability to use dynamic ad breaks. With long movies running over an hour, there are many opportunities to place ad breaks. Applications can detect how users behave during playback and their reaction to ads, which can help increase revenue if you know how to use the data effectively.

Cons

  • More resources. Using CSAI requires more resources. Two video players means twice the resources needed. This may not seem like an issue for devices with plenty of gigabytes, but it’s important to consider the amount of memory required. For example, one video frame in Full HD resolution (1920x1080) takes up approximately 6.2 megabytes of memory. This is calculated by multiplying the number of pixels in the frame (1920 x 1080) by the number of bytes per pixel (typically 3 for RGB) to get a total of approximately 6,220,800 bytes. When you want to have a buffer for at least one second, you need 150 MB. For 4K, the amount of memory required is four times more. Additionally, you need to open one new video player to play the ads and buffer them. Another technical issue is that you need two video decoders, which may be a problem for CTV devices with low resources. Use of CSAI can result in a black screen or device restart.
  • Latency and video buffering. Latency and video buffering can also be an issue with CSAI. Setting up a video player takes time and at one moment the application needs to download twice as much data — for the main video content and the ads. When an ad is present, it’s necessary to stop the main video content and play the ad. This can result in a poor user experience.
  • Different quality. Ads received from the programmatic pipeline may also be of different quality than the main video content, especially when you have ad pods user experience can be poor.
  • Ad blockers work. Another thing to consider is that ad blockers can work in the CSAI process, as the application is requesting an ad from the server. This means that there are many options on how to block this request. On the other hand, in the CTV ecosystem, there are not so many options to block ads, for example, it is not common to install ad block on TV, but still, you could change the DNS gateway.

SSAI

The ‘S’ in SSAI stands for server, which means that ads are inserted on the server side.
From an application perspective, the basic schema for SSAI works as follows:

When the user clicks the play button, a request is sent to the publisher’s backend. The backend then requests an ad from the ad server. The ad is unwrapped, encoded and stitched into the video according to the quality and codecs set in the MPEG or HLS manifest file. The modified manifest file is then returned to the user, who begins watching the video with the stitched ads.

The process of SSAI is different from CSAI, in SSAI the process of ad insertion happen on the server side, instead of on the client side, and the video is sent to the client already with the ads, unlike CSAI where the ads are inserted on the client side during the video playback.

Pros:

  • All environments. One of the benefits of using SSAI is that it can be deployed on all environments — web, mobile, and CTV. CSAI, on the other hand, has more technical requirements.
  • Better user experience. SSAI also provides a better user experience as it is similar to the TV broadcast experience.
  • Ad blocker off. Another advantage is that it’s not possible to block ads with SSAI as there are no ad requests from the client to the ad servers. The client is simply playing the video. Even if the user modifies the DNS gateway, they will still see the ads.
  • Less resources. SSAI also requires fewer resources than CSAI. On the client side, you only need a simple player with one video tag. However, there are some CTV platforms that are unable to play SSAI streams.

Cons

  • Complicated tech stack. Using SSAI has a more complicated technical stack compared to CSAI. It requires re-encoding of video, audio, and subtitles, and stitching ads into the main manifest. This process needs to be done quickly and the setup of the pipeline is more complicated than CSAI.
  • Higher bandwidth. SSAI also requires higher bandwidth as it needs independent chunks, which must start with a full frame. Each frame is the sum of differences from the previous one, resulting in a bigger encoded video. This means users need higher bandwidth, and you’ll spend more on CDN traffic. You can decrease video quality to reduce the bandwidth needs. Independent video chunks also means you have to use HLS or MPEG-DASH protocols to deliver a chunk list
  • VPAID / SIMID limited support. SSAI has limited support for VPAID/SIMID, which means it’s harder to deliver interactive ads. It is possible but with many limitations.
  • Ad buffer needed. SSAI also requires an ad buffer, especially for longer video contents with many ad breaks. This means that the bidding process needs to start sooner when the user presses the play button. For example, if there are 5 ad breaks and bidding for each takes 1 second, the user will have to wait for at least 5 seconds or more before the video actually starts playing. This is because the ads need to be re-encoded and the manifest needs to be modified. But, again, this is an issue only when you have many ad breaks

Misunderstandings and rumors

There are misunderstandings and rumors about CSAI and SSAI. Some articles claim that only CSAI is able to track a click event, but this is not true. Just like all other events, the application can fire a click event when a user clicks on the video and opens a web browser if it’s present. If it’s not present, it doesn’t matter whether you’re using CSAI or SSAI. In fact, all tracking events are fired in both solutions in the same way.

It’s important to note that not all platforms are able to play CSAI or SSAI streams. This is something that should be taken into consideration when deciding which method to use.

Which one use in the business

Which method to use depends on the specific business case. SSAI is generally more expensive and can be more complicated for longer videos, so it may be better to start with CSAI. However, it’s important to consider both methods and compare their overall impact on revenue. It’s also important to consider the demand partners you have, as some partners may only support interactive ads (SIMID/VPAID). Ultimately, the best approach is to gather data from both technologies and make a decision based on the analysis.

Consider future

When considering which method to use, it’s important to also consider the future. One of the main disadvantages of CSAI is that it requires a lot of resources. However, as technology is constantly improving, CPUs, GPUs, and RAMs are becoming more powerful. In the future, it may be possible to create a software stack using only CSAI that provides a similar user experience to SSAI.

It’s important to keep in mind that technology is always evolving and advancements will change the way we can use CSAI and SSAI.

--

--

Jan Sunavec

CTO, R&D director, Ad-Tech, Video Streaming, OTT, CTV, OpenRTB