ISOBMFF

Also known as: ISO base media file format

On this page 7

ISOBMFF, the ISO base media file format, is the general container specification standardized as ISO/IEC 14496-12 that defines how timed media such as video, audio and subtitles is stored in a structured file. It is the common foundation of MP4, 3GP, CMAF, fragmented MP4 and the HEIF image format, and it descends directly from Apple’s QuickTime file format.

Among containers & formats in video, ISOBMFF is best understood as a family template rather than a single file type. It specifies the box structure, the timing model and the sample tables, while derived specifications add codec mappings, branding rules and restrictions for particular uses.

How the ISOBMFF box structure works

An ISOBMFF file is a sequence of boxes, historically called atoms in QuickTime. Each box begins with a 32-bit size field and a four-character type code such as ftyp, moov or mdat, followed by its payload. A size of 1 signals a 64-bit extended size, which allows files far beyond 4 GB.

Boxes nest hierarchically, so a parser can skip any box it does not understand by reading its size and jumping ahead. This design makes the format extensible and backward compatible: new box types can be added without breaking older readers.

The most important top-level and nested boxes are summarized below.

BoxFull namePurpose
ftypFile type boxDeclares major brand and compatible brands
moovMovie boxHolds all metadata for a non-fragmented file
trakTrack boxDescribes one video, audio or text track
stblSample table boxMaps samples to timing, size and byte offsets
mdatMedia data boxStores the actual compressed samples
moofMovie fragment boxCarries metadata for one fragment
sidxSegment index boxIndexes segments for fast seeking
Core ISOBMFF boxes and their roles

Tracks, samples and the timing model

ISOBMFF separates metadata from media data. The moov box describes tracks, and each track points into the mdat box through sample tables that store decode times, composition offsets, sample sizes and chunk positions. A sample usually corresponds to one compressed video frame or one block of audio.

Each track has its own timescale, expressed in ticks per second, so video at 90,000 ticks and audio at 48,000 ticks can coexist precisely. Composition time offsets in the ctts box handle codecs with B-frames, where decode order differs from presentation order. Edit lists in the edts box shift or trim the presentation timeline without rewriting media.

The sample entry in the stsd box identifies the codec through a four-character code such as avc1, hvc1, av01 or mp4a, and it carries the decoder configuration needed to initialize playback.

Formats derived from ISOBMFF

Most modern delivery formats are profiles of ISOBMFF with added rules. They share parsing logic, which is why one demuxer library can usually read all of them.

FormatTypical extensionMain useKey addition
MP4.mp4General video distributionMPEG-4 codec mappings, defined in ISO/IEC 14496-14
Fragmented MP4.mp4, .m4sAdaptive streamingMedia split into moof and mdat pairs
CMAF.cmfv, .cmfaCommon HLS and DASH segmentsStrict constraints for interoperability
3GP.3gpLegacy mobile videoMobile codec profiles from 3GPP
HEIF.heic, .heifStill images and sequencesImage items instead of timed tracks
MOV.movProfessional productionQuickTime ancestor with its own extensions
Main members of the ISOBMFF family

MOV is a special case: it is not formally an ISOBMFF brand, but the two formats share the same box model, so many tools read both with the same parser.

Membership in the family is signaled by brands in the ftyp box. The major brand names the specification the file primarily follows, such as isom, mp42 or cmfc, and the list of compatible brands tells a reader which other rule sets the file also satisfies. A player checks these codes first and can refuse a file whose brands it does not support, even before it parses any track metadata.

Beyond video delivery, the same structure carries Common Encryption metadata in boxes such as pssh and tenc, which lets one encrypted file work with several digital rights management systems. This single encryption, multiple license systems approach is a major reason the format dominates premium streaming.

Progressive and fragmented ISOBMFF files

ISOBMFF supports two layouts, and the choice decides how a file behaves on the web. A progressive file has one moov box describing all samples, while a fragmented file places a small initialization moov at the start and then repeats moof and mdat pairs.

PropertyProgressive layoutFragmented layout
Metadata locationSingle moov boxInitial moov plus one moof per fragment
Live recording safetyUnplayable if recording stops earlyEarlier fragments stay playable
Adaptive streamingNot suitableBasis of DASH, HLS and CMAF
Seeking supportFull sample tablesFragment index such as sidx or mfra
Web start-upNeeds moov at the frontStarts after the init segment
Progressive versus fragmented layout

For progressive downloads, the moov atom position is critical. If an encoder writes moov at the end, a browser must fetch the whole file before playback. A fast start or faststart pass moves the box to the front without re-encoding.

Common pitfalls when working with ISOBMFF

Problems with ISOBMFF files usually come from metadata errors rather than codec errors, because the media can be intact while the description of it is wrong.

  • Interrupted recordings leave no moov box in progressive files, so footage needs specialized recovery tools.
  • Wrong codec tags, such as hev1 instead of hvc1 for HEVC, can block playback on some Apple devices.
  • Ignored edit lists cause audio and video drift in players that do not honor them.
  • Brand mismatches in ftyp may make strict validators or players reject an otherwise valid file.

When files misbehave, remuxing into a fresh ISOBMFF container with a tool such as FFmpeg or MP4Box often corrects timing and box order without touching the compressed streams.

Explained without jargon

ISOBMFF is a set of packing rules for video files. It does not compress the picture or sound itself. Instead, it decides how compressed video, audio and subtitles are boxed up, labeled and lined up in time.

Imagine a filing cabinet with labeled folders inside folders. One folder lists what is in the cabinet and where, while another holds the actual pages. Because every folder has a label and a size, a reader can skip folders it does not need. Many familiar files, including MP4, follow these same rules.

A typical use case

A streaming service prepares a two-hour film for phones, televisions and browsers. The encoding team produces several H.264 and HEVC renditions and packages them as CMAF segments of about 4 seconds, each a moof and mdat pair, plus one initialization segment per rendition.

Because CMAF is built on ISOBMFF, the same media segments serve both HLS and DASH players, with only the manifests differing. Storage and CDN costs drop because the service no longer keeps two packaged copies. For downloadable trailers, the team exports progressive MP4 files with the moov box moved to the front, so playback begins within a second of the first bytes arriving.