MP4 is an extensible container file format. It means that MP4 does not define a strict structure for storing media types. Instead MP4 allows storing a custom object structures and hierarchy for each media type.
MP4 structures are typically referred to as atoms or boxes. Atoms are stored inside the MP4 file in hierarchical structure. Minimum atom size is 8 bytes as first 4 bytes specify size of the atom and next 4 bytes specify its type. That’s why all atom names below have precisely 4 symbols.
Root level of the MP4 file contains following data atoms:
Following second level atoms are used in MP4 file:
Moov is probably the most important atom out of all described above. It contains video and audio tracks, movie header information like timescale, duration, display characteristics of the movie. It is recommended that moov atom is placed at the end of the mp4 file after all other atoms to ensure that all metadata is read prior to moov when the file is being played from the server.
Moov atom doesn’t store actual raw content information. Instead it stores references to locations in mdat atom. Mdat is where the actual raw information is being stored. This atom makes the most of the MP4 file. Mdat atom is made of chunks. Moov atom refers to specific chunks but to correctly decode them software will need to read stts (time-to-sample table) and stsc (sample-ot-chunk table) atoms for correct timing information.
MP4 Quick Info | |
---|---|
| |
MIME Type | |
| |
MP4 File Opens with | |
|