Where an MP4 keeps its index, and when a player can start
An interactive diagram of an MP4: place the moov index at the end, move it to the front, or remove it altogether to see when a player can start streaming.
By the Bytevive team2 min read

An MP4 is not a stream of frames a player can read from the first byte. The picture and sound sit in one block, mdat. A much smaller block, moov, is the index: frame 1 starts at this byte, frame 2 at that byte. Without those offsets, the player has the bytes and still cannot start.
A camera writes the frames as it records and adds the index when you press stop, so moov often lands at the end. On your own disk, a player can jump straight there. Over a download from the start, it cannot; it has to wait until the index arrives. Moving that same index to the front does not re-encode a single frame. It only changes when playback can begin.
A 1,000-byte MP4, not a real video
ftyp is the label. The numbered slices are the picture data (mdat). moov is the index: the starting byte of each slice. Drag the index to the other end, or use the buttons. Nothing is uploaded.
Dashed line: downloaded to here. First byte on the left.
Index
Downloaded 420 of 1000. The index is at the end and the download has not reached it, so playback stays off.
The third option is the one people mix up with the first. If the battery dies before recording stops, the index may never have been written. The frame bytes can still be in the file, but this page will not invent the missing offsets. Bytevive’s Video Repair can move an index that is already in the file; it does not rebuild one that was never saved.
For a file that plays on your computer but stalls in a browser, see why an MP4 waits for the whole download. For a recording cut off before the index was written, see what a dead battery leaves on the card. For the rest of the symptoms, see how to fix corrupted video files.


