What is CMAF? The Beginner’s Guide to Ultra-Low Latency Streaming with CMAF

It’s hard to imagine life without video streaming. We’ve come to rely on it for entertainment, news, work, and more. But have you ever wondered how video streaming actually works? Much of the magic comes down to protocols – the rules that govern how data moves between devices. CMAF is arguably the best of the protocols widely available today. But what is CMAF and why does Livery use it? Let’s talk about it.

As streaming increases in popularity, we see constant work in the industry toward improving video quality, transmission, and playback. By making the files smaller, for example, transmission is easier – meaning it’s simpler to stream higher quality videos without delay or interruption. In addition, newer devices can decode the files quicker, leading to smoother playback for the viewer. CMAF is another critical step toward streaming efficiency. In this article, we’ll look at what CMAF is, the history of video streaming protocols, how Microsoft and Apple worked together to create the Collaborative Media Application Format (CMAF), and how it is changing the game.

What is CMAF?

CMAF, or the Common Media Application Format, is a relatively new standard for video delivery that simplifies the process of broadcasting to multiple devices. CMAF works with various existing codecs, making it more compatible with a broader range of devices. It also includes support for adaptive bitrate streaming, meaning that it can automatically adjust the video quality to match the viewer’s connection speed. Ultimately, CMAF aims to provide a more efficient and cost-effective way of delivering video content to a variety of devices.

A brief history of streaming

Anyone who’s ever tried to stream a video knows that it can create a strain on both your device and internet bandwidths. Your device needs a lot of information to recreate the images and sounds on a screen, which results in large file sizes. 

Before CMAF, video streaming was a bit more cumbersome. Video segment files were submitted in full to be encoded, where they would then be sent to the CDN for distribution worldwide. The player (i.e., the viewer’s device) would then pull a full segment from a local CDN server. This process was time-consuming and led to playback issues (because the full segment needed to load before it would ‌play, resulting in a several-second delay). In other words, the files were big, which made sending and viewing them an expensive and slow process.

What existed before CMAF?

One of the fundamental problems with streaming across different devices before CMAF was that each device had its own protocol. Some of the biggest included: 

  • Adobe’s protocol for Flash, HDS
  • Smooth, which was the protocol used by all Microsoft devices
  • HLS, the protocol built into Apple devices
  • MPEG DASH, an earlier attempt to create a more universal protocol 

This meant that the stream host had to have duplicated data to ensure the file was compatible across devices. To simplify delivery, Apple and Microsoft worked together to create CMAF – a format that was cross-compatible with HLS and DASH, reducing the complexity and redundancy of streaming. This, in turn, reduced the costs of streaming and video latency. 

In other words, CMAF set out to change the game by solving a few of these issues through collaboration on a standardized container. CMAF’s major accomplishment was less technical in nature, and instead, more diplomatic.

What are the benefits of CMAF?

As we touched on, CMAF was a collaboration project that set out to create a standardized format for delivery. The goals of CMAF and its adoption were to:

  • Reduce the burden of the encoding and delivery process by creating a universal/standard encryption method that each device could then easily decode. This reduces the file size and improves transmission and playback.
  • Create a standard format that allows for a more brand-agnostic playback experience.
  • Simplify the process of streaming by reducing data redundancies (each encryption/format creates a separate duplicate file).
  • Overall reducing the costs to stream by reducing the network bandwidth required to process, encode, and share video content.
  • Low latency (which is actually one of the most important benefits to CMAF and Livery’s choice to use it, but more on that next).

How does CMAF reduce latency?: CMAF low latency explained

Before we dive into how CMAF reduces latency, let’s touch on what latency (and low latency) means. Latency is a fancy word for delay or lag time in a video. When latency is low, it means that your stream is closer to real time. 

If you’ve ever seen your Fantasy Football stats update before the action hit your screen, you’ll know that livestreaming has varying degrees of latency (i.e., the video is not always in real time). For on-demand streaming, you’ll be less likely to notice high latency (outside of buffering).

In general, there are four classifications for latency. Real-time communication (RTC, milliseconds from real time), ultra-low latency (ULL, close to real time – three seconds or fewer), low latency (LL, near real time – three to seven seconds), and high latency (i.e., significantly delayed from real time). Here is how the existing protocols and formats break down into these options.

Real-Time Communication

The real-time communication option is RTC. Companies like Zoom, Microsoft Teams, and Google Meet use WebRTC.

WebRTC offers sub-second latency, (so the viewer is in what is essentially real time). RTC is designed for one-on-one communication use cases like person-to-person Zoom calls. For streaming or livestreaming at scale (i.e., all broadcasting use cases) RTC is cost-inefficient and/or prohibitive.

Ultra-Low Latency: CMAF (Common Media Application Format)

CMAF was a revolutionary collaboration with positive ripple effects for livestreaming. By offering cross-compatibility for HLS and DASH, it removes the need for redundant files and can transmit smaller chunks in sequence (chunks as small as a single frame).

It comes at the same price point as the higher latency options because it uses the same infrastructure. 

Low latency (LL) – HLS or DASH

While HLS and DASH don’t add time on their own, their requirements for communication between the sender (encoder) and receiver (decoder) add significant time and delays. This frequently leads to a latency of a few additional seconds.

High Latency: Traditional Livestreaming

At the other end of the spectrum is the high latency option, often referred to as traditional streaming. High latency happens in part because of how large the file segments are that need to be processed, encoded, and transmitted for decoding.

This is the most commonly used setup for sports streaming (which is why you may notice that your neighbor with cable TV saw that goal much sooner than you did over the livestream version).

Why Does Livery Use CMAF?

Livery’s choice to use the CMAF protocol boils down to a few of its key features:

  • Ultra-Low latency. For Livery, this is priority number one. We offer end-to-end livestreaming solutions to our clients. For these to work, you need real-time feedback in both directions. Your viewers need to see and interact with your content as it happens, and you need to be able to respond to that interaction immediately – not >10 seconds later.
  • Existing infrastructure. Dedicated server environments are expensive. By using CMAF through Akamai (the world’s largest CDN), we can reach the world’s devices at scale in near-real-time (ultra-low latency streaming).
  • Cost efficiency. Despite the fact that CMAF delivers a better experience for viewers and hosts alike, it’s compatible with the existing infrastructure used by higher-latency options. This allows Livery to match the pricing of low latency solutions while offering a superior experience.
  • Data efficiency. CMAF offers the ability to complete a single encoding and packaging process to deliver media file (audio/video) segments to a CDN where it can then be adapted and decoded on the viewer’s device. In non-tech terms, CMAF is adaptive, meaning the same file can play on different devices, regardless of the hardware or internet connection. No need for separate versions of the same file (essentially duplicating/triplicating/etc. it) to accommodate different devices and/or bitrates.

Check out this video about CMAF.

Learn more about low-latency livestreaming through a free Livery demo. Click here to schedule yours.