How to get your HTML5 MP4 video file to play before being fully downloaded

A huge title to this post for sure, but it’s a relevant question and I’ve seen it asked a few times on places such as StackOverflow.

Browsers that use H.264 video (Safari, Chrome and various mobile browers) sometimes refuse to start playing the MP4 video file until it has downloaded it completely. This is obviously annoying and not what you want.

The reason it does this is because sometimes the video encoder (whatever programme was used) places the video index at the end of the video file rather than at the beginning. This interferes with progressive download as the browser doesn’t know anything about the file until it has downloaded it and read that index.

So how do you move the index to the start of the file?

Easy. Run the excellent QTIndexSwapper programme on it which will simply re-encode the file, placing the index at the beginning.