CMAF Fragment, Chunk and CENC Anatomy

One CMAF track combines a stable header with addressable segments, independently decodable fragments and progressively publishable chunks

CMAF object hierarchy and encrypted fragment anatomy A CMAF presentation contains switching sets and tracks. Each track has a header and segments. A segment contains fragments, a fragment contains chunks, and each chunk carries movie fragment metadata plus media data. CMAF HEADER ONE ADDRESSABLE CMAF SEGMENT - one or more consecutive fragments SELECTED CHUNK / MOVIE FRAGMENT PAIR - metadata first, encrypted samples second tenc defaults + PSSH establish encryption context expand one chunk trun sample sizes + data_offset locate mdat bytes aux entries describe IV and protected ranges CMAF Presentationsynchronized media types CMAF Switching Setaligned alternative encodings CMAF Trackone encoded rendition timeline Headerftyp + moov SegmentsURL or byte-range objects ftypbrands / compatibility moovcodec + timescale + track ID mvex / trex defaultspssh + sinf / tencno media samples FRAGMENT 0 - independently decodable interval starts at aligned random access point t0 CHUNK 0.0 mooftiming/map mdatsamples SAP / IDR begins fragment CHUNK 0.1 moofnext run mdatsamples may depend on earlier chunk FRAGMENT 1 - next switching / random access boundary time aligned with equivalent fragments in other tracks CHUNK 1.0 mooftiming/map mdatsamples new fragment SAP CHUNK 1.1 moofnext run mdatsamples published without full segment wait t0 aligned fragment boundary Optional top-levelstyp / emsg / prftbrand, event, producer time moof - describes samples; carries no media payload mfhdsequence number traf: tfhd + tfdt + truntrack, decode start, sample run sgpd / sbgpseig KID override saiz / saio / sencIV + subsample map mdatencrypted sample bytesNALU / frame / audio payloadno License or raw CK LEGEND header / timing fragment metadata chunk boundary CENC metadata sample payload switch / random access point

Fragment Is the Switching Unit

  • Alternative tracks align fragment boundaries on a common timeline
  • A fragment starts at an independently decodable random access point
  • A segment is an addressable wrapper containing one or more fragments

Chunk Is the Publication Unit

  • A chunk carries a sequential subset of one fragment's samples
  • Completed chunks can be published before the parent segment is complete
  • Later chunks may depend on samples from the same fragment

CENC Spans Header and Chunk

  • pssh and tenc establish DRM initialization and track defaults
  • seig and senc-family boxes describe effective per-sample protection
  • mdat remains encrypted media; the License and raw key stay out of band