MP4 brief file structure
Previous Topic  Next Topic 

Home



The MP4 file is a complex structure, largely defined by the Quick Time structure published by Apple.  This page is brief description of some of the key points in a file that may assist with recovery, often by our GPR recovery program


The overall file structure three main elements, FTYP, MDAT and MOOV.  This section just concentrates on the MOOV segement.


The MOOV fragment is made up of atoms, and the important ones are described below, with deatils of what function they perform.



The atoms largely fall into two catagories, fixed parameters for the file, and specfic pointers for each frame of data and audio.  To reconstruct a moov fragment, both sections are required, but the exact location of each frame is essential.


There is a Track atom for each data stream, typically the first stream is video and the second audio


trkh

Contains information such as file times, duration, speed etc.



mdia

Media Data atom





stco

StartChunk offset atom.  This is a very important table.  It points to start of each video (audio) chunk. 


For videos that are greater than 4GB, the tag is replaced by co64 and the offset is a 64 bit value

Knowledge the codec being used is required to recognise a start.  It could be a string, or maybe just a length.


stsc

       Sample to chunk atom


stsz


       Sample size atom