14

I was shooting video with a Canon EOS 7D, and it was telling me the battery (I thought) was getting hot, so I opened the battery cover and it promptly shut off. It was a battery pack, and the batteries stayed in place even though it shut off. So now I have a 1.4 GB file that even ffmpeg cannot read. I have plenty of other files shot with the exact same format that I could look off of to read the data if I needed to, but how do I do that.

ffmpeg -i on the bad file:

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001572b9fa3a0] moov atom not found
MVI_3891.MOV: Invalid data found when processing input

ffmpeg -i on a good file:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_3892.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537331968
    compatible_brands: qt  CAEP
    creation_time   : 2016-01-28 12:04:16
  Duration: 00:12:10.86, start: 0.000000, bitrate: 46897 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 45357 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2016-01-28 12:04:16
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2016-01-28 12:04:16
Hennes
  • 64,768
  • 7
  • 111
  • 168
Arlen Beiler
  • 1,568
  • 3
  • 18
  • 26
  • 8
    Close voters: just because the situation was created by a camera (not a general purpose computer) doesn't mean that trying to repair the file is off-topic. I'm voting to Leave Open. – Ben N Jan 30 '16 at 01:56
  • See the other question which explains how to use `untrunc` to recover the file. – slhck Jan 30 '16 at 18:00
  • @slhck, will this work with MOV? – Arlen Beiler Jan 30 '16 at 18:07
  • I think the key bit is the phrase "Missing moov atom". Have a look at [this](http://superuser.com/questions/417100/how-to-open-and-repair-an-m4v-or-mp4-video-file) post which talks about Untrunc According to [this](http://blog.alwayshere.info/2011/01/ffmpeg-moov-atom-not-found.html) post [AtomicParsley](http://atomicparsley.sourceforge.net/) may be able to fix it as well. – davidgo Jan 30 '16 at 05:51
  • MOV and MP4 are very closely related. MP4 is historically based on MOV. This should work for MOV files as well. If not, let me know. – slhck Jan 30 '16 at 18:30

2 Answers2

13

Try with recover_mp4_to_h264. It's a command line program, and will require a good reference file.

Usage as indicated:

recover_mp4_to_h264 in_good_similar.mp4 --avcc
recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [out_audio.aac | out_audio.wav | out_audio.mp3] [<recorder>]
recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [--aac | --pcm | --mp3] [<recorder>]
Gyan
  • 34,439
  • 6
  • 56
  • 98
  • 1
    Just one note: if you run it with just `-h` it will give you a fairly helpful little help text. I had to add the `--eos` flag and export to h264 and wav, and then it worked fine. Also, make sure you don't specify your `in_good_similar.mov` file as your `out_video.h264` file. I did that without realizing it and had to copy the video in again from my source files. – Arlen Beiler Feb 01 '16 at 14:50
  • I also had to adjust the video speed, as it was somewhat slower, for some reason. I didn't look into why it was, but I'm guessing it was framerate related. I ended up needing to set it to 119.9% to exactly match the audio. – Arlen Beiler Feb 01 '16 at 14:53
  • Sounds like your source video is 29.97 whereas your recovered video is 25 fps. – Gyan Feb 01 '16 at 14:56
  • 1
    Doesn't having a good video file to use here entirely defeat the purpose of recovering the old one? – Pyroglyph Nov 20 '17 at 21:48
  • How so? The purpose of recovering the old file is to make it usable i.e. playable and editable. The good file's contents will be different and don't substitute for the broken one's. – Gyan Nov 21 '17 at 04:53
  • What about for Macs? – Mihai Danila Jan 14 '18 at 03:52
  • this worked for me! with addition to `ffmpeg.exe -i input.h264 -c copy -o output.mp4` I was able to recover the original mp4 file – AK_ Feb 19 '18 at 08:04
  • Isn't there an open source Linux tool for that? And should FFmpeg not be able to do so? – neverMind9 Sep 23 '18 at 11:27
  • A good part of my file was recovered this way, tysm. – himanshuxd Feb 09 '20 at 08:08
-5

Reference And Download: http://www.easeus.com/data-recovery/data-recovery-software/mov-recovery.htm

Step 1. Launch EaseUS Data Recovery Wizard. Select "Video" and click "Next" button to start your mov recovery job.

Step 2. Select the disk where you lost your data and click "Scan" button, the software will quickly scan the selected disk to find all your lost mov. If you lost your partition, select "Lost Disk Drives" and "Scan" to continue the recovery process.

Step 3. After scan, you can see all the listed recoverable mov files one by one and select out those you want. Then, click "Recover" button to get them back once. Here you should save all the recovered files on another disk to avoid data overwriting.

Hope this helps!