MP4 fast-start woes

In order to play MP4 files while they are still downloading (either by for example Quicktime of Flash), in most cases you'll need to move the so called 'MOOV' atom to the beginning of the file.

The MOOV atom is in essence a block of data, containing an index of the rest of the file. Most authoring tools will place this data on the end of the file, because the size of the block will have to change dynamically as changes are made to the video. If the atom was right at the beginning, the entire file would have to be rewritten for a lot of smaller changes.

So, there are a couple of tools that do this for you, but none of them seem to work really well. FFMpeg contains a tool called 'qt-faststart', but I had to kill it after I discovered it had been running for 12 hours on a relatively small mp4 file.

Some suggestions on the FFMpeg mailing list led me to two other tools, MP4Box and MPEG4IP. MP4Box dies with a big:

  1. MP4Box /tmp/508842_22.mp4 -inter 500
  2. Saving /tmp/508842_22.mp4: 0.500 secs Interleaving
  3. *** glibc detected *** double free or corruption (!prev): 0x08071108 ***
  4. Aborted

On top of that their forum seems mostly dead. MPEG4IP simply has the following message on their download page:

NOTE: currently, the tarball is corrupt, and I do not have a way to remake it at this point. Hopefully that will change in a few weeks.

Dear lazyweb, has anyone else came across similar issues? How would one go about solving this? :(

Update: Reading through it again, it seems as if the mpeg4ip project has simply died in 2007.

Update 2: My problem with MP4Box was solved! I needed to explicitly supply the -out parameter.

 1

About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.