So you've edited your video in a wonderful program called Avidemux. You've got everything just the way you like it, so you export the video as an h.264 mp4 so that you can stream it on your website. Wait, why isn't it streaming? Why does the flash player have to download the whole file just to play it!? I'll tell you why:

As handy a program as Avidemux is, for some reason they do not provide an option to place the mp4 metadata at the beginning of the file instead of at the end. Because Avidemux places the metadata at the end of the file, whatever flash player you use(JW PLayer, Flowplayer, etc) has to download the whole file just to get the metadata that allows it to properly read the video.

Some of you might say "Why don't you just use mencoder to remake the file afterwards with streaming enabled?" Well it's bad practice to encode a video twice because of the use of lossy video codecs. Plus that's just extra work for something that should be simple. I got sick of using Metadatamover through Windows in Virtualbox, so I set out to find my own solution.

In my opinion, the best solution is to use a Nautilus script to automatically move the metadata to the front of the video file. Note that I have only ever tried this on h.264 encoded video in an MP4 container file. I don't know if this will work for any other codec or video container.

This script relies on MP4Box, which is part of the gpac software package. Gpac is in the LM software repositories so all you have to do is install it through Synaptic.

It's as simple as that. Save it as "Web Optimize MP4" without quotes in directory ~/.gnome2/nautilus-scripts, and mark it as executable(Right-Click>Properties>Permissions>Allow executing file as program).

Now all you have to do is right-click on your mp4 file, go to Scripts and click on Web Optimize MP4. Your mp4 video will be made stream-able in just seconds without having to re-encode the entire video.

I think this is the best solution because while Nautilus only runs on Linux, MP4Box is multi-platform, so you can easily use it on Windows or Mac if you wanted to.

Thank you very much for your post.It's OK on Linux Mint 11, in which run Gnome2 and Nautilus.

Actually I've been using Mint Maya in other PC, which comes with Mate and Caja (as Gnome and Nautilus) and I tried to adapt your script creating a folder called "caja-scripts" into ".mate2" and changing the script as follows: