What Is CMAF?January 23, 2019
CMAF is an emerging standard intended to simplify delivery of HTTP-based streaming media. While development of the specification took place almost overnight, CMAF’s real-world appeal and long-term benefits are still playing out.
Update July 5, 2019: Apple’s recent announcement about Low-Latency HLS has impacted low-latency CMAF. To learn more about this, please read our post, Apple Low-Latency HLS: What It Is and How It Relates to CMAF.
Why Do We Need CMAF?
Competing codecs, protocols, media formats, and devices make the already complex world of live streaming infinitely more so. In addition to causing a headache, the use of different media formats increases streaming latency and costs.
What could be achieved with a single format for each rendition of a stream instead requires content distributors to create multiple copies of the same content. In other words, the streaming industry makes video delivery unnecessarily expensive and slow.
The number of different container files alone is exhaustive: .ts, .mp4, .wma, .mpeg, .mov… the list goes on. But what if competing technology providers could agree on a standard streaming format across all playback platforms? Enter the Common Media Application Format, or CMAF.
CMAF brings us closer to the ideal world of single-approach encoding, packaging, and storing. What’s more, it promises to drop end-to-end delivery time from 30-45 seconds to less than three seconds.
How, why, and to what extent is this possible? Watch CMAF co-chair Iraj Sodagar discuss the objective below. Then, read on for the nitty-gritty.
Leading up to CMAF
Back in the day, RTMP (Real-Time-Messaging Protocol) was the go-to method for streaming video over the internet. This proprietary protocol enabled lickety-split video delivery — but it encountered issues getting through firewalls.
As many browsers began to phase out support for Flash, the industry shifted to HTTP-based (Hypertext Transfer Protocol) technologies for adaptive bitrate streaming. For Apple, this took the form of Apple HLS (HTTP Live Streaming); whereas MPEG-DASH (Dynamic Adaptive Streaming over HTTP) became the international standard.
But with different protocols came different file containers. HLS specifies the use of .ts format, while DASH almost uniformly uses .mp4 containers based on ISOBMFF.
That was a lot of acronyms, I know. The takeaway here is that technology providers support distinct containers for streaming — which impacts playback across the myriad of devices used today.
The problem? Any content distributor wanting to reach users on both Apple and Microsoft devices must encode and store the same audio and video data twice. With users accessing streams across iPhones, smart TVs, Xboxes, and PCs, this obstacle didn’t go unnoticed.
Take Akamai’s word for it: “These same files, although representing the same content, cost twice as much to package, twice as much to store on origin, and compete with each other on Akamai edge caches for space, thereby reducing the efficiency with which they can be delivered.”*
*It’s worth noting that Streaming Media endorses Wowza as an alternative to duplicative storage and encoding costs: “You can avoid the increased storage and encoding costs by dynamically packaging your content from MP4 files to DASH, HLS, and Smooth Streaming format via […] products like the Wowza Streaming Engine.”
The Advent of CMAF
CMAF came about from cross-company collaboration. In February of 2016, Apple and Microsoft came to the Moving Pictures Expert Group (MPEG) with a proposal. By establishing a new standard called the Common Media Application Format (CMAF), the two organizations would work together to reduce complexity when delivering video online.
Players moved fast. Apple announced that it would add fragmented MP4 support to HLS on June 15, 2016. This meant that Apple would use .mp4 delivery for video streams — the very container that Microsoft already uses.
By July of 2017, co-developers had finalized specifications for CMAF. And in January 2018, the standard was published.
The benefits of encoding, packaging, and caching a single container for video delivery go without saying. But CMAF seeks to do more that just reduce complexity. Even after taking the reins from RTMP years ago, HTTP-based video delivery still lacks the real-time delivery options that viewers demand. Could CMAF also improve latency? With chunked encoding and chunked transfer encoding, the new specification set out to do just that.
How CMAF Works
Single Format: Before CMAF, Apple’s HLS protocol used the MPEG transport stream container format, or .ts (MPEG-TS). Other HTTP-based protocols such as DASH used the fragmented MP4 format, or .mp4 (fMP4).
Microsoft and Apple have now agreed to reach audiences across the HLS and DASH protocols using a standardized transport container — ISOMFF in the form of fragmented MP4. Theoretically, this means that content distributors can deliver content using only the .mp4 container.
Chunked Encoding: CMAF represents a coordinated industry-wide effort to lower latency with chunked encoding and chunked transfer encoding. This process involves breaking the video into smaller chunks of a set duration, which can then be immediately published upon encoding. That way, near-real-time delivery can take place while later chunks are still processing.
File Encryption and Digital Rights Management: Not unlike the issue of different media formats that CMAF sought to address, another incompatibility exists across the industry: digital rights management (DRM) and file encryption. Supporting multiple DRMs (FairPlay, PlayReady, and Widevine) means also supporting incompatible encryption modes.
Industry players have now agreed to reach a standard in this realm called Common Encryption (CENC), but standardization doesn’t happen overnight.
One of the easiest ways to reduce screen-to-screen latency is by simplifying video delivery. CMAF’s goals were threefold:
- Cut costs
- Minimize workflow complexity
- Reduce latency
Have these been achieved? Yes-ish.
CMAF will streamline server efficiency for serving most endpoints. And in recent demos, this new alternative enables sub-three-second latency.
That said, legacy devices and browsers that aren’t upgraded will still require unique container files for playback. Put another way, continuing to reach the broadest audience possible requires additional accommodations (and costs) that CMAF can’t retrospectively address.
That’s where Wowza comes in. The Wowza Streaming Engine™ service supports video delivery across a variety of formats — including MPEG-TS, Apple HLS, and Adobe RTMP. This ensures video scalability as the adoption of CMAF-compliant devices continues to grow.
What’s more, Wowza Streaming Engine is slated to support CMAF in the near future.