24 January 2011

ffmpeg - moov atom not found

While playing with the ffmpeg converter (at least i'm using it to convert videos from any format to MP4) i got the following error message:

ffmpeg - moov atom not found

After lots of reading over Google and installing libraries and other craps, i can say the following (which apply in my case):

  1. there is no missing library which is preventing you to convert that file
  2. ffmpeg didn't crash while converting your file
  3. check if the file is really there and ffmpeg has access to read it
  4. check if the file is 100% transferred to your machine (this was my issue... as the transfer was interrupted ~60%)
  5. if you're converting an MP4 or AVI file (not MOV) you can try AtomicParsley to fix your moov atoms. Check their website for more information.
Hopefully somebody will not waste half of day reading useless stuff over internet thanks to this post!

10 comments:

  1. Fantastic... I too spent most of a day trying to diagnose this issue, mine also was an incomplete uploaded file.
    =)

    ReplyDelete
  2. I'm very happy it could help someone!

    ReplyDelete
  3. How did you notice that the file was interrupted? it seems fine to me...

    ReplyDelete
  4. Check the size in bytes of the transferred file, if it's the same with the original... or even better try md5 (file)...

    ReplyDelete
  5. Stefan - I have a similar problem, the 3gp file is truncated, and is missing its moov atom. I havent' used AtomicParsley, but can it actually be used to repair the truncated file so that what I do have can still play?

    ReplyDelete
  6. Managed to do the repair - sort of. Using the same device, another file had been created and was intact - somewhat larger than the corrupted one.

    I then used AtomicParsley to parse out all the atoms, with their starting byte, ending byte and length. The 3gp file was a simple audio file, and the mdat atom contained all the audio data. Using a Hex editor, I took a copy of the good 3pg file, and zero-ed out all the audio data. I then copied all the audio data I could glean from the bad 3gp file and overwrote that zero-ed out data, starting from after the mdat atom had begun, but well before its end, and the next atom (a moov atom) started. In the end, what I had was the envelope of the good file surrounding the audio data from the bad file. The total length and position of the atoms still matched the good file.

    I then tried it with a media player, and it worked. The media player reported the duration of the audio to be about 20 minutes, but the audio actually ended about 14 minutes in. I can always truncate this later, but I'm glad that I got all the audio back that I could.

    Thanks to your blog, I didn't have to spend days figuring this out. Appreciate the posting.

    ReplyDelete
  7. thanks. it helped me. another way to check is to play the video file and see

    ReplyDelete