A video player can't begin until it has read the file's index, the moov box. Many tools write it last, so the browser has to fetch the end of the file before it can play the beginning. This moves it to the front. Same video, same quality, same size.
The player reads left to right. With moov last, it has to jump to the end first. faststart puts it straight after the header.
Drop files below. The page reads only the box headers and the index, never the video itself, so large files are fine and nothing leaves your computer.
An MP4 is a row of boxes. Three matter here.
A few bytes that say what kind of file this is. Always first.
All the compressed video and audio. This is almost the whole file.
Where every frame lives, the duration, the tracks. The player needs it before frame one. Moving it means rewriting the chunk offsets inside it, which is all faststart changes.
The command-line version checks whole media folders and exits non-zero when it finds a slow file, so it can guard an upload step or a build.
# install pip install git+https://github.com/peakxdev/faststart # list slow files (exit 1 if any) faststart check media/ # write fixed copies, or replace in place after verifying faststart fix media/ -o fixed/ faststart fix clip.mp4 --in-place
Encoding new files yourself? Add -movflags +faststart to your ffmpeg command and they'll be right from the start.