Video on Flash doesn’t buffer? Maybe a FLV and MP4 issue

I recently tried Flowplayer a Flash video player released under GNU GPL license. It’s great, since it has a plugin allowing pseudostreaming (it allows buffering from any server) with both FLV and MP4 (H.264 / AAC).

Using avidemux to convert my videos, I had no problem to play FLV files: buffering works as expected, I watch video while buffer is filled. But on MP4, I’ve to wait the video is fully buffered (downloaded entirely).

This is not a Flowplayer issue: this exaustive howto explain that FLV and MP4 files should be properly indexed to works with pseudostreaming.

  • For FLV files, you can use Flvtool2, a Ruby gem, available also on apt / synaptic via “apt-get install flvtool2″ (Debian packages, description on rubyforge). Using avidemux, FLV files are ok even if I don’t use Flvtool2, so FLV metadata seems correctly handled by Avidemux. Ready for pseudostreaming!
  • For MP4 files, you have to move MP4 metadata (“moov atom”) from the end of the file to the beginning, since Avidemux seems to put it on the very end of the video file. To do this, I’ve used successfully a tool named mp4box (mp4box on videohelp, author website) using MP4Box-0.4.6-dev_20090519 version (win32 binary). Read also MP4box documentation on GPAC, you can also get it on sourceforge.

MP4Box usage example:

MP4Box.exe -add TEST_src.mp4 -new TEST_dst.mp4
IsoMedia import – track ID 1 – Video (size 848 x 480)
IsoMedia import – track ID 2 – Audio (SR 44100 – 2 channels)
Saving TEST_dst.mp4: 0.500 secs Interleaving

See also:

Flowplayer forum posts on same topic:

Qt-fastart (FFMpeg alternative), another post

Tags: , , , , , , , , , , , ,

2 responses to “Video on Flash doesn’t buffer? Maybe a FLV and MP4 issue”

  1. Yvan says :

    For MP4, you may use qt-faststart, packaged with ffmpeg, after encoding your video.

Trackbacks / Pingbacks

  1. S3 Flowshield: Why does my video take forever to load? - May 8, 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 26 other followers

%d bloggers like this: