The Common Media Application Format (CMAF) is a versatile media format designed to simplify streaming delivery, reduce storage costs, and enable adaptive streaming across various devices and platforms. In this comprehensive guide, we will explore the benefits, applications, and best practices for implementing CMAF in your video streaming workflow.
What is CMAF (Common Media Application Format)?
CMAF, the Common Media Application Format, is an innovative and extensible standard aimed at streamlining the end-to-end delivery of HTTP-based streaming content. It simplifies the process of broadcasting to multiple devices while reducing costs, lowering latency, and eliminating workflow complexities for content owners or broadcasters.
Formalized as ISO/IEC 23000-19, CMAF was introduced by Apple and Microsoft following the decline of Flash’s Real-Time Messaging Protocol (RTMP). The spotlight shifted to HTTP-based technologies, which facilitated adaptive bitrate streaming and supported various file containers and formats. However, content owners had to encode and store video streams in different versions to cater to a broad audience base, attracting significant storage and maintenance costs. CMAF addresses this issue by providing a uniform streaming container that works with both HLS and DASH protocols. It also employs chunked encoding and chunked transfer encoding to lower latency.
Although CMAF is not a protocol in itself, it is a container and set of standards for single-approach video streaming that works with protocols like HLS and MPEG-DASH. It supports various existing codecs, making it more compatible with a wider range of devices.
In the realm of content delivery, CMAF (Common Media Application Format) boasts several unique media components – CMAF Tracks, Switching Sets, Aligned Switching Sets, Selection Sets, and Presentations. Efficient caching and multi-platform distribution are its strengths.
CMAF Purpose and Benefits
The Common Media Application Format (CMAF) was developed to address the challenges of streaming latency, complexity, and costs. By creating a standardized format for delivery, CMAF aims to provide several benefits:
- Reduced storage costs: CMAF eliminates the need to create different content renditions for compatibility with various streaming formats, thereby cutting down repackaging and CDN maintenance costs.
- Simplified workflow: It allows for common encryption (CENC), which means data does not need to be encrypted multiple times. Reliable DRM solutions can quickly and easily decrypt encrypted data, removing unnecessary operational complexity.
- Reduced latency: CMAF enables publishers to leverage chunked encoding, ensuring speedy delivery of content. By transmitting smaller chunks in sequence, CMAF offers ultra-low latency (ULL), close to real-time (three seconds or fewer), as opposed to other streaming protocols that result in higher latency.
- Universal encryption: It creates a standard encryption method that each device can easily decode, reducing file size and improving transmission and playback.
- Reduced data redundancies: CMAF simplifies the streaming process by reducing data redundancies created by multiple encryption formats and duplicate files.
- Lowered processing costs: By reducing network bandwidth required to process, and encode video content, CMAF contributes to overall cost savings in the streaming process.
CMAF’s ultra-low latency is particularly notable, as it uses the same infrastructure as other higher latency options without increasing costs. This makes CMAF an ideal choice for delivering real-time or near-real-time streaming experiences.
Need of CMAF for Video Streaming
The world of video streaming is complex, with a multitude of codecs, media formats, protocols, and devices adding to the intricacy. Different media formats increase streaming latency and costs, making video delivery unnecessarily expensive and slow. Broadcasters aiming for a wider audience need to create multiple copies of each stream file in different file containers, which doubles the cost of packaging, storing, and caching on CDN servers.
Before CMAF, Apple’s HLS protocol depended on .ts (MPEG-TS) or MPEG container formats, while HTTP-based technologies like DASH relied on .mp4 (fMP4). With the advent of CMAF and Common Encryption (CENC), industry players like Microsoft and Apple now deliver content across HLS and DASH protocols using the fragmented MP4 (.fmp4) container.
CMAF streamlines interoperability of DRM (Digital Rights Management) solutions with the help of MPEG-CENC, further simplifying the video streaming process. Overall, CMAF significantly reduces latency, complexity, and costs associated with video streaming, making it an essential tool for the industry.
History and Developments of CMAF
The decline of Adobe’s Flash Player and RTMP in 2020 ushered in a new era of HTTP-based technologies for adaptive bitrate streaming. However, different streaming standards, such as MPEG-DASH and HLS, required different file containers like .mp4 and .ts, respectively.
In February 2016, Apple and Microsoft proposed a new uniform standard, the Common Media Application Format (CMAF), to the Moving Pictures Expert Group (MPEG) to reduce complexity and costs when transmitting video online. By June 2016, Apple announced support for the fMP4 format, and by July 2017, the CMAF specifications were finalized. In January 2018, the CMAF standard was officially published.
This achievement was more diplomatic than technical, as it brought about cooperation between major tech giants to establish a standardized container for seamless video streaming.
CMAF Encoding and Extensions
CMAF (Common Media Application Format) is a way to create special MP4 video files that can be easily streamed online. These files can be used with multiple streaming technologies, like DASH and HLS, making it easier for video providers to deliver content to different devices.
File extensions like *.cmfv, *.cmfa, and *.cmft are suggested by the CMAF standard for video, audio, and text, but they are not strictly required. You can use other extensions like MP4 or M4A, and the files will still work with most CDNs (Content Delivery Networks). Some CDNs might have optimizations for specific extensions, so it’s essential to consider that.
CMAF is not related to transcoding (converting video files from one format to another). It is just a container format for storing video, audio, and text data. To create CMAF files, you can use tools like Bento4, Shaka, or FFmpeg, which help generate the right format for streaming.
Although CMAF is a useful format, its adoption has been slower than expected. It benefits CDN providers along with content creators and distributors. You can still create CMAF-like files using FFmpeg and other tools, even if there isn’t a dedicated CMAF muxer yet.
Comparing Between Elements Of CMAF, HLS And DASH
CMAF vs RTMP
RTMP (Real-Time Messaging Protocol), a TCP-based brainchild of Macromedia (now Adobe-owned) for streaming audio, video, and data between Flash player and server. While RTMP’s low latency and minimal buffering are noteworthy, it lacks quality and scalability, with dwindling support. CMAF outshines RTMP, ensuring low latency (3-5 seconds), superior quality, and scalability.
CMAF vs HLS
HLS (HTTP Live Streaming) is an adaptive HTTP-based protocol developed by Apple for transporting video and audio data from media servers to end users’ devices. While HLS is widely supported and ensures optimal user experience with minimal buffering, it offers a latency of 5-20 seconds. CMAF can work with HLS to improve latency and standardize container files. However, Apple has developed Low-Latency HLS, which reduces latency and competes with CMAF, raising questions about Apple’s commitment to standardization.
CMAF vs WebRTC
WebRTC (Web Real-Time Communications) is a revolutionary tech, enables real-time media exchanges between browsers and devices. Its ultra-low latency (0.5 seconds) is impressive, but it’s tailored more for real-time video conferencing and feedback-enabled systems.
While each protocol has its advantages and drawbacks, CMAF provides a consistent approach that simplifies content delivery and improves viewer experience with low latency of 3-5 seconds.
|Manifest||HLS Master Playlist (.m3u8) files||Media Presentation Description (.mpd) file|
|Presentation||Presentation defined by Master Playlist and associated Media Playlists with aligned start points.||DASH Period and associated Adaptation Sets defined in MPD.|
|Selection Sets||Sets of parallel tiers of Media Playlists defined by appropriate sets of EXT-X-STREAM-INF tags. Such tiers could be defined, e.g. for different codecs.||A group of Adaptation Sets defined for each Period in MPD.|
|Switching Set||A set of Media Playlists or Variant Streams that can be used by player to play presentation.||DASH Adaptation Set|
|Track||HLS Variant Stream (specified by Media Playlist URI and EXT-X-STREAM-INF tag describing its properties), restricted to single media type.||DASH Representation restricted to single media type.|
|Header||Media Initialization Section, defined by EXT-X-MAP tag||DASH Initialization Segment|
|Segment||Sequence of fMP4 segments within same variant stream||Sequence of DASH segments within same representation|
|Fragment||HLS fMP4 segments limited to single media type (i.e. audio or video)||DASH segment limited to single media type|
|Chunk||Chunk of fMP4 segment limited to integral number of samples||DASH subsegment|
|Presentation profile||Only unencrypted or ‘cbcs’ encrypted profile are supported||Unencrypted, and multiple types of encrypted profiles are supported|
CMAF Supported Video Formats and Encoding
CMAF accommodates various video codecs, resolutions, and frame rates (think HDR and WCG content). CMAF’s popular video codecs – H.264 (AVC) and H.265 (HEVC) – offer efficient compression for high-quality streaming with low storage consumption. It also employs the ISOBMFF container, founded on the fragmented MP4 (fMP4) format, standardizing content delivery across HLS and DASH streaming protocols.
Audio codecs like AAC, AAC-LC, HE-AAC+ v1 & v2, and MP3 are also compatible with CMAF, ensuring high-quality audio complements video content for an immersive experience.
CMAF Streaming Tools for Encoding, Packaging and Playback
CMAF (Common Media Application Format) streaming tools help content providers encode, package, distribute, and playback their media content across various platforms and devices. Here is a list of some popular CMAF streaming tools and services:
- FFmpeg: A widely-used, open-source multimedia framework that supports encoding video and audio content in CMAF-compatible formats.
- AWS Elemental MediaConvert: A cloud-based encoding service from Amazon Web Services that provides support for CMAF format conversion.
- Bento4: A set of open-source tools for working with fragmented MP4 (fMP4) files, which can be used to package CMAF-compatible content.
- Shaka Packager: An open-source media packaging tool developed by Google that supports CMAF packaging along with other popular streaming formats.
- VdoCipher Custom Player: An advanced video player with customization options and watermarking features. Also, has plugins, SDKs and APIs for easy integration.
- Video.js: An open-source HTML5 video player that supports CMAF playback, making it compatible with various devices and platforms.
These CMAF streaming tools can be combined to create a complete end-to-end streaming workflow, ensuring compatibility, security, and high-quality streaming experiences for viewers.
Combining DRM with CMAF for Video Security
To safeguard copyrighted content, Digital Rights Management (DRM) systems are essential. CMAF flawlessly integrates with major DRM systems (FairPlay, and Widevine) via the Common Encryption (CENC) standard. Content providers can encrypt video streams with a single method compatible with multiple DRMs.
When implementing CMAF with DRM, content providers need to consider the following steps:
- Encrypt the content: Use an encryption tool that supports CENC to encrypt the video and audio streams.
- Generate DRM licenses: Set up a license server for each DRM system (FairPlay, Widevine) to generate and manage licenses for authorized users.
- Integrate with a video player: Use a video player that supports multi-DRM playback and can request the appropriate license from the license server based on the end user’s device and platform.
By combining CMAF with DRM systems, content providers can ensure the security of their video content while maintaining compatibility and delivering a high-quality streaming experience to their users.
Note: This implementation requires technical expertise. If you are looking for a CMAF based video hosting provider with DRM security, VdoCipher seems to be the obvious choice due to additional features.
How does CMAF reduce latency?
CMAF uses chunked encoding and chunked transfer encoding processes to break digital content into smaller, manageable chunks with a fixed duration. These chunks can be published immediately upon encoding, allowing for near-real-time content delivery while the encoding process continues.
Is CMAF compatible with DRM (Digital Rights Management) systems?
Yes, CMAF supports major DRM systems like FairPlay, and Widevine. It aims to standardize encryption and DRM systems through Common Encryption (CENC), which simplifies content protection and ensures secure streaming.
Can CMAF be used with popular streaming protocols like HLS, DASH, and RTMP?
CMAF works seamlessly with HLS and DASH protocols, standardizing the container format for cross-protocol content delivery. But it doesn’t directly connect with RTMP, an older streaming protocol designed for Adobe Flash Player.
How does CMAF compare to WebRTC in terms of latency?
Though CMAF excels in low-latency streaming (3-5 seconds latency), WebRTC trumps it with ultra-low latency (0.5 seconds). While CMAF caters to most live streaming situations, WebRTC is the go-to for real-time communication and applications demanding minimal delay.
Supercharge Your Business with Videos
At VdoCipher we maintain the strongest content protection for videos. We also work extremely hard to deliver the best viewer experience. We'd love to hear from you, and help boost your video streaming business.
I have traversed through the digital wilderness, honing my skills in technology and marketing including the latest trends, tools, and techniques. My passion for innovation has driven me to experiment with tech-based marketing in the eLearning, Media, and Security sectors.