CMAF

Also known as: Common Media Application Format

On this page 7

CMAF, the Common Media Application Format, is an MPEG standard (ISO/IEC 23000-19) that defines a single fragmented MP4 media format for adaptive streaming, so that the same encoded segments can be delivered through both HLS and MPEG-DASH. In the field of video containers and formats, CMAF is not a new codec or a new manifest; it is a constrained profile of ISOBMFF that standardizes how audio, video and subtitle tracks are packaged into small, independently addressable pieces.

Before CMAF, streaming services commonly produced two copies of every rendition: MPEG-TS segments for Apple HLS and fragmented MP4 for DASH. CMAF removes that duplication, cuts storage and CDN cache use, and also enables low-latency streaming through chunked delivery.

How CMAF structures media

CMAF organizes media into a clear hierarchy. A CMAF track holds one encoded stream, such as a single video bitrate or one audio language. Each track starts with a CMAF header, which corresponds to the initialization segment containing the ftyp and moov boxes, and continues with a sequence of CMAF fragments, each made of a moof box with timing and sample tables followed by an mdat box with the media data.

Fragments are grouped into CMAF segments, the units that a player requests over HTTP, and each fragment can be further split into CMAF chunks for low-latency delivery. Every segment must begin with a random access point, usually a keyframe, so a player can switch bitrates at segment boundaries.

The table below lists the main structural units and their role.

UnitContentPurpose
CMAF headerftyp and moov boxesInitializes the decoder for a track
CMAF chunkOne moof plus mdat pair, possibly a few framesEnables low-latency transfer
CMAF fragmentOne or more chunks starting at a sync sampleSmallest independently decodable unit
CMAF segmentOne or more fragmentsAddressable unit requested by players
Switching setAligned tracks of one content typeAllows seamless bitrate switching
PresentationAll switching sets of one programThe complete deliverable
Structural units defined by CMAF

Codecs, encryption and profiles in CMAF

CMAF defines media profiles that restrict which codecs and parameters may appear in a track, which keeps players predictable. Common video profiles cover H.264 (AVC), H.265 (HEVC) and AV1, while audio profiles cover AAC and newer formats such as Dolby AC-4. Subtitles are carried as WebVTT or IMSC1 (TTML) tracks.

Encryption follows the Common Encryption standard (ISO/IEC 23001-7), which defines two schemes. Historically, HLS used cbcs with FairPlay while DASH with Widevine and PlayReady used cenc, which defeated the single-copy goal. Today all three major DRM systems support cbcs, so services can encrypt once and serve every platform.

SchemeCipher modeTypical DRM support
cencAES-CTR, full sample encryptionWidevine, PlayReady, older devices
cbcsAES-CBC with pattern encryptionFairPlay, modern Widevine and PlayReady
Encryption schemes relevant to CMAF

A practical consequence is that legacy devices that support only cenc may still require a second encrypted copy, so the promise of one package is fully realized only on newer device fleets.

CMAF compared with other streaming packages

CMAF is best understood as a stricter form of fragmented MP4. Any CMAF segment is valid fMP4, but not every fMP4 file is valid CMAF, because CMAF adds rules about box order, fragment alignment, timing and codec signaling. Unlike MPEG-TS, which carries overhead from 188-byte packets and PES headers, CMAF stores samples with lower packaging overhead.

FormatBase structureMain useKey limitation
CMAFConstrained ISOBMFF fragmentsUnified HLS and DASH deliveryOlder players may lack support
Fragmented MP4ISOBMFF moof and mdat boxesDASH, HLS since 2016Less constrained, variable interoperability
MPEG-TS188-byte transport packetsBroadcast, legacy HLSHigher overhead, separate copy for DASH
Progressive MP4Single moov atom and mdatDownload and simple playbackNo adaptive bitrate switching
WebMMatroska subsetBrowser video with VP9 and AV1Not used by HLS
CMAF against related packaging formats

The manifests remain separate. A CMAF presentation is still described by an HLS playlist (m3u8) for Apple ecosystems and an MPD file for DASH players, but both manifests point to the same media segments on the origin server.

Low-latency delivery with CMAF chunks

CMAF chunks make low-latency live streaming possible over ordinary HTTP. A segment of, for example, two seconds can be split into chunks of a few hundred milliseconds, and the packager pushes each chunk using HTTP chunked transfer encoding as soon as it is encoded. The player can start decoding before the whole segment exists.

This technique lowers glass-to-glass delay from the 20 to 45 seconds typical of classic segmented streaming to roughly two to five seconds, depending on encoder settings, CDN behavior and player buffer targets. Low-Latency HLS and Low-Latency DASH both rely on this chunked CMAF model.

ApproachTypical latencyMain dependency
Classic HLS with 6-second segments20 to 45 secondsSegment length and player buffer
Shorter segments, no chunking8 to 15 secondsSegment count in buffer
Chunked CMAF with LL-HLS or LL-DASH2 to 5 secondsChunk duration and CDN support
WebRTCUnder 1 secondNon-HTTP real-time transport
Typical latency ranges by delivery approach

Common pitfalls when adopting CMAF

Most CMAF problems come from misaligned or inconsistent encoding, not from the format itself. Engineers should verify the following points before deployment.

  • Unaligned keyframes across renditions: without a fixed GOP structure, bitrate switching causes glitches.
  • Mixing encryption schemes: cenc segments will not play on FairPlay clients.
  • Assuming every CDN supports chunked transfer: some caches wait for the full object and erase the latency benefit.
  • Neglecting timed text: burned-in or TS-specific captions must be converted to WebVTT or IMSC1 tracks.

The idea in brief

Streaming services cut a video into many small pieces so your player can pick the right quality as your internet speed changes. For years, Apple devices and most other devices wanted these pieces in different packaging, so services had to store everything twice.

CMAF is an agreed packaging style that both camps accept. The service prepares the pieces once, and only the small instruction lists differ. It is like printing one book that two libraries both accept, instead of printing two editions with different covers.

A practical scenario

A regional sports broadcaster streams live matches to phones, smart TVs and browsers. Its old workflow produced six H.264 renditions in MPEG-TS for HLS and the same six renditions again in fragmented MP4 for DASH, doubling origin storage and CDN cache footprint.

The team moved to CMAF with cbcs encryption, two-second segments split into 500-millisecond chunks and aligned keyframes across all renditions. One set of segments now serves both HLS and DASH manifests. Storage and cache use dropped by roughly half, and Low-Latency HLS brought the delay behind the live broadcast from about 30 seconds to around four seconds, so viewers no longer learn about goals from social media before they see them.