Comparison: CMAF and Matroska
A comparison of CMAF, Matroska, and MP4, covering their relationships, container formats, streaming capabilities, fragmentation, codec support, and common use cases.
How CMAF and Matroshka are related?
CMAF (Common Media Application Format) and Matroska are both container formats used for delivering multimedia content, but they serve different purposes and are not directly related in terms of standards or specifications. However, they can be compared in how they handle media streams, and understanding both can help clarify where they overlap or differ.
| Feature | CMAF | Matroska |
|---|---|---|
| Full Name | Common Media Application Format | Matroska Multimedia Container |
| Standardized By | MPEG (ISO/IEC) | Open-source community (Matroska.org) |
| Primary Use Case | Streaming (especially for DASH and HLS) | Local playback, archival, some streaming |
| Underlying Container | Based on ISO Base Media File Format (ISOBMFF, like MP4) | Native format (.mkv, .webm variants) |
| Media Segmentation | Yes, explicitly supports chunked/segmented delivery | No native segmentation; whole files |
| Codec Support | Typically H.264, H.265, AAC, etc. | Very broad: H.264, H.265, VP9, AV1, AAC, FLAC, etc. |
| Fragmented Support | Yes (fMP4 for streaming) | Not designed for fragmentation |
Key Differences and Relationships
Purpose and Design Philosophy
CMAF is designed specifically for adaptive streaming, using small, fragmented MP4 (fMP4) chunks for delivery over HTTP.
Matroska is designed as a flexible, open container format primarily for local playback, with rich support for subtitles, metadata, and multiple tracks.
Segmentation vs. Whole Files
CMAF supports segmentation, allowing the same media segments to be used across different streaming protocols (like HLS and MPEG-DASH).
Matroska does not natively support segmentation for streaming in the same way; it is more oriented toward complete files.
Compatibility
CMAF is built upon ISOBMFF, which is the basis for MP4. This makes it compatible with most browsers and devices in streaming scenarios.
Matroska is not based on ISOBMFF and has less universal support in browsers, though widely supported in media players (like VLC, Kodi, etc.).
Use in Modern Media Workflows
CMAF is the de facto standard for OTT streaming (Netflix, YouTube, Apple, etc.).
Matroska is widely used in media archiving, open-source distribution, and for enthusiasts who want rich feature support (e.g., subtitles, chapters).
Are They Related?
Not directly, but:
- Both are media containers.
- Both can carry similar codecs (H.264, H.265, etc.).
- Both address aspects of media interoperability, albeit in different environments (CMAF for streaming, Matroska for storage/playback).
If you’re building a media workflow, CMAF is more appropriate for streaming, while Matroska is better for offline storage or rich metadata needs.
What are the relationship between CMAF and MP4?
CMAF (Common Media Application Format) and MP4 are closely related, with CMAF being a constrained and standardized subset of the MP4 format, specifically designed for streaming media.
Key Relationship
CMAF is based on the ISO Base Media File Format (ISOBMFF), which is the foundation for:
- MP4 (MPEG-4 Part 14)
- MOV (QuickTime File Format)
- DASH (fMP4) segments
- CMAF
So, CMAF is essentially a special profile of MP4, optimized for adaptive HTTP streaming (especially HLS and DASH).
How CMAF Builds on MP4
| Feature | MP4 | CMAF |
|---|---|---|
| Standard | ISO/IEC 14496-14 (MPEG-4 Part 14) | ISO/IEC 23000-19 |
| Container Format | Based on ISOBMFF | Subset of ISOBMFF / MP4 |
| Main Purpose | General multimedia container | Adaptive streaming (low latency, cross-platform) |
| Fragmentation | Optional | Required (uses fragmented MP4, i.e., fMP4) |
| Compatibility | Broad (players, editors, etc.) | Targeted at HTTP-based streaming protocols |
| Streaming Use | Not ideal alone | Designed for DASH and HLS |
| Interoperability | Varies | Standardized across HLS + DASH |
Why CMAF Was Introduced (vs. Plain MP4)
Before CMAF, the industry had to encode and package content twice:
- Once for Apple HLS (using .ts or later .mp4)
- Once for MPEG-DASH (using .mp4 fragments)
CMAF solves this by:
- Defining a single segment format (fragmented MP4) that works for both HLS and DASH
- Enabling shared media segments across different protocols
Fragmented MP4 (fMP4) and CMAF
CMAF uses fragmented MP4 (fMP4), which:
- Splits media into init segments and media segments
- Enables low-latency, adaptive bitrate streaming
- Makes content easier to deliver via CDNs and HTTP
💡 Regular MP4 files aren’t fragmented, so they’re not ideal for live or adaptive streaming.
Practical Compatibility
- A CMAF file is technically a valid MP4 file, but not all MP4 files are CMAF-compliant.
- CMAF limits codec choices, box structure, and segment formatting to ensure cross-device support.
- CMAF supports codecs like H.264, H.265 (HEVC), AAC, AV1, Opus, and AC-3 (depending on the profile).
In Short
- CMAF = a streaming-optimized, fragmented subset of MP4
- that enables interoperable delivery over HLS, DASH, and other HTTP-based protocols