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:
MP4Box /tmp/508842_22.mp4 -inter 500
Saving /tmp/508842_22.mp4: 0.500 secs Interleaving
*** glibc detected *** double free or corruption (!prev): 0x08071108 ***
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.
Comments
David Kennedy •
I had that happen once, turned out my mp4 was corrupt (ffmpeg ran out of space while writing it to the disk). qt-faststart would run on it forever... Creating the movie again with ffmpeg fixed the issue.Are you sure it's a valid mp4?
Duncan Reid •
There is an AIR application that might work for you:http://renaun.com/blog/2008/08/14/262/
Evert •
Actually, I figured it out with MP4Box (check my second update..)AIR applications are really a non-option in a production environment/automated fashion/anything in general ;)
Big Bob •
The best Gui app for the is MP4 FastStarthttp://www.datagoround.com/lab/
Best command line is yes MP4box
use command: mp4box -inter 0.5 VideoName.mp4
Mateen Salim •
It helped me a lot.... Thanks MP4 FastStart