Progressive download mp4 with JW Player

JW PlayerThe latest version of JW Player (Version 5.7) now allows us to stream H264 videos to iOS while still supporting the flash player for other platforms. YEAH! HTML5 isn’t quite ready for us to use and abandon the old ways, but we’re getting closer.

Anyhow, while deploying a progressive download video for a client I chose to use this latest version of JWPlayer. I ran into an issue where the source file was an mp4 and it was fully downloading before playing, rather than a progressive download (play as it’s downloading). I’ve run into this problem before and luckily it’s an easy fix.

It has to do with the moov atom on an mp4 being placed at the tail end of the video rather than the head of the video. So once you ffmpeg the video into your require h264 specs, you need to run qt-faststart on the video which will relocate the moov atom to the beginning of the video and your problem is fixed. Very simple syntax:

qt-faststart sourceVideo.mp4 finalVideo.mp4

for those who don’t have qt-faststart already installed on their CentOS computer:

shell> svn checkout svn:// ffmpeg
shell> cd ffmpeg/
shell> ./configure
shell> make
shell> make tools/qt-faststart
shell> sudo cp tools/qt-faststart /usr/local/bin/qt-faststart

Thanx to turbolinux blog for the qt-faststart install instructions.