I am developing a tube site, and currently having issues with H.264 format. I noticed that YouTube put their hi-def videos into an MP4 container, so logically I did the same.
Next, I installed mod_h264_streaming
for lighttpd to make streaming and timeline-scrubbing work.
The problem is that large files (>500MB at somewhat high resolution) take forever to even start buffering (I read that Flowplayer and other Flash players need to download metadata first). I moved the xmov atom to the front of the file with MP4Box (I tried Qt QuickStart too), but that didn’t help.
Next, I read that I need to interleave audio tracks, so I did that too. This caused no change: the videos were still slow.
So I tried putting the exact same H.264 movie into an FLV container, and the playback buffering started almost instantly — no slowness.
So what am I missing here? Why would I choose MP4 container with the module mod_264_streaming
, which seems super-slow, over a regular FLV container with lighttpd’s built-in mod_flv_streaming
? Obviously, many websites pick the MP4 container, but I fail to understand why.
And as a side question, I tried using the HTML5 <video>
tag to try the same H.264 MP4 movie, and the scrubbing was lightning fast! I looked into lighttpd’s log file, and I noticed that Flash players append video.mp4?start=234
each time the timeline is scrubbed, whereas browsers using the native HTML5 <video>
tag do no such thing. Is this some sort of limitation of Flash? Why can’t Flash streaming be as fast as HTML5 streaming?