Recovered video files won't play
I just ran into this exact same problem and found a fix:
Sort the list of recovered files alphabetically
If a file ending in
.mov
is immediately followed by a much smaller file ending in_ftyp.mov
, it can likely be fixed; the_ftyp.mov
file apparently contains header informationTo fix the video, combine the two files, placing the header file first. For example:
Linux/OS X:
cat f2951104_ftyp.mov f0195200.mov > video.mov
Windows:
copy /b f2951104_ftyp.mov + f0195200.mov video.mov
For reference, here's the information the file command gave me on the two recovered files and the combined file:
$ file f2951104_ftyp.mov
f2951104_ftyp.mov: ISO Media, Apple QuickTime movie
$ file f0195200.mov
f0195200.mov: Apple QuickTime movie (unoptimized)
$ file video.mov
video.mov: ISO Media, Apple QuickTime movie
Source:
http://forum.cgsecurity.org/phpBB3/cant-view-mov-files-t1070.html#p5068
The video files get corrupted when recovered with photorec (same thing with testdisk) so they won't play even tho the video stream is there. I had the same issue with accidentally deleted videos from a Canon EOS camera. Spent some time trying to concatenate files around, then spent ages compiling untrunc but didn't get anything playable with either method.
Then I found a perl script, mp4fixer that fixes corrupt video files. And it worked!
Here's how:
Like untrunc, mp4fixer works by comparing files so you'll need a working video file, from the same camera, with all the same settings and everything else as close as you can get to the corrupt video file.
Put both video files in a folder, open that folder in a terminal and type the following commands:
wget https://github.com/bookkojot/mp4fixer/archive/master.zip unzip master.zip mp4fixer-master/fixer.pl good-video.mov bad-video.mov fixed
In the last line, replace
good-video
andbad-video
by the names of your files and the last argument (herefixed
) can be any word of your choice and will be used as a prefix for the generated files.After the script has done its thing, your folder will be swamped by prefixed files. Look for the one ending with
*-out-video.h264
.You can already play that file using VLC but in my case the framerate was all over the place so I converted it to MP4 using HandBrake and that's it, my videos are now playing just fine!
note: only realising now, it didn't need audio in my case so overlooked the fact that mp4fixer restores the audio as a separate .raw file. There's more info about sound on the readme page. Also the raw audio did play in Audacity (File > Import > Raw Data
) but at the wrong speed.
As per the link you provided, PhotoRec ignores the file system.
That's an advantage in some cases, since it can attempt to recover media even from badly damaged devices. However, it won't take file fragmentation into account. This explains why the smaller files work, but the bigger ones don't.
I suggest you try another file recovery software to attempt to recover the video files. I've used Recuva in the past and got good results with it.