Apple QuickTime MOV: The Atomic File Format

A recent analysis of a Apple QuickTime .MOV file I conducted at work compelled me to write this post to discuss its file structure.

Released in 1991, Apple QuickTime .MOV files are structured by hierarchical atoms that store media data and metadata. A typical .MOV file may consist of the following atoms:

1. ftyp (file type)

The ftyp atom specifies the file format type. For example, ‘qt’ for QuickTime.

2. moov (movie) aka ‘the meat’

The moov atom defines the .MOV file since it carries crucial technical metadata like duration and display specifications.

It may have other types of sub-atoms, with at least one of the following three: mvhd (movie header), cmov (compressed movie) & rmra (reference movie). Several other sub-atoms like clip (clipping), trak (track), ctab (color table), and udta (user data) may exist in the moov atom.

The layout of a moov atom:

Data Type
Size 4 bytes
Type='moov' 4 bytes
Profile atom 'prfl'
Movie Header atom (REQUIRED) 'mvhd'
Movie Clipping atom 'clip'
Track atom 'trak'
User Data atom 'udta'
Color Table atom 'ctab'
Compressed Movie atom 'cmov'
Reference Movie atom 'rmra'

3. mdat (media data)

As suggested, mdat contains the files audio & video data.

4. free/skip (padding) [optional]

5. uuid (user defined) [optional]

Interestingly, the file that landed on my desk came without its ftyp atom, which I learnt was only required after the establishment of the ISO Base Media File Format (ISO BMFF) standard. It is also likely that legacy tools and software at the time may omit the atom, relying completely on players like QuickTime player to smartly defer to the moov atom. Hence it is plausible that legacy .MOV files may come without the ftyp atom, hence failing to play in some players and file format identification checks.