anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
1.87k stars 182 forks source link

Please help me restore the full video #166

Open johnlenoooon opened 1 month ago

johnlenoooon commented 1 month ago

Just trying my luck here. I am trying to recover a corrupted MP4 file (shot from a Supremo HD pocket camera). The file size is around 2.4GB, but the file length is showing 0:00, and as the camera manual said, it will auto-save the file if the camera suddenly goes off. I use a 128GB Micro SD card formatted as FAT32. I have tried different recovery options, and so far, the closest I got was from djifix, but the .H264 file is glitchy, has no sound, and sometimes it skips parts, so it was not fully recovered. I also tried using recover_mp4 with ffmpeg, but I am only getting around 4% of the file, and the size is around 100MB only because when I tried to play it, it has the whole content but fast-forwarded.

The latest method I tried is this untrunc. I already remuxed the good file using ffmpeg. I'm only getting around 7% of the full video. Thank you in advance!

D:\mp4recover2\bin>untrunc -s -dcc uncorrupted_remuxed.mp4 corrupted.mp4
Info: version 'v318-e6382ca' using ffmpeg '3.3.4' Lavc57.89.100
Info: reading uncorrupted_remuxed.mp4
Info: parsing healthy moov atom ...

Info: reading mdat from truncated file ...
Warning: Codec::was_bad_ = 1
[aac @ 0000000003cbe7e0] Reserved bit set.
[aac @ 0000000003cbe7e0] channel element 0.7 is not allocated
Warning: NOT skipping stsd atom: 3590512349 (at 1163422 / 1228958)
Warning: NOT skipping uuid atom: 3731981893 (at 6563983 / 6629519)
Warning: Codec::was_bad_ = 1
Warning: Skipping alac atom: 482788416
Warning: NOT skipping d263 atom: 4044021987 (at 503462081 / 503527617)
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Skipping dawp atom: 1805470653
Warning: NOT skipping dinf atom: 1920853764 (at 2482558477 / 2482624013)
Warning: guessed frame durations of 'avc1' will probably be wrong!
Info: Found 1864 packets ( mp4a: 1133 avc1: 731 avc1-keyframes: 25 )
Info: Duration of mp4a: 24s 170ms  (24170 ms)
Info: Duration of avc1: 24s 370ms  (24370 ms)
Warning: Unknown sequences: 21
Warning: Bytes NOT matched: 186MiB (7.64%)
Info: saving corrupted.mp4_fixed-s1.mp4

7 warnings were hidden!
Jack-Leey commented 3 weeks ago

you could try the option with -dyn, and i found a tips : if you want to repair a perfect video, your sample files and files to be repaired should not have any embellishments through other tools.