anthwlock / untrunc

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

Output file only 2.4KB #57

Closed jimgrove1985 closed 3 years ago

jimgrove1985 commented 4 years ago

Having a problem trying to repair a video file that was created with a Drone. This is the terminal output:

Info: version '56aee28' using ffmpeg '3.3.9' Info: reading /mnt/1TB/Downloads/DJI_0029.MP4 Info: parsing healthy moov atom ... Composition time offset atom found. Out of order samples possible. Info: special track found (meta, 'DJI.Meta') Info: special track found (text, 'DJI.Subtitle')

Info: unknown track 'priv' found -> fallback to dynamic stats Info: using dynamic stats, use '-is' to see them Info: reading mdat from truncated file ... orig_trak:priv 1 2 == 16 no pattern suggests this.. Error: unable to find correct codec -> premature end (~0%) try '-s' to skip unknown sequences

Info: Found 0 packets ( avc1: 0 avc1-keyframes: 0 priv: 0 text: 0 ) Info: Duration of avc1: (0 ms) Info: Duration of priv: (0 ms) Info: Duration of text: (0 ms) Info: pruned empty 'avc1' track Info: pruned empty 'priv' track Info: pruned empty 'text' track Info: saving /mnt/1TB/Downloads/DJI_0031.MP4_fixed-dyn.MP4

If I use the -s option, the output file size changes slightly as a 5KB file gets created. This is still wrong as the original broken file is 1.7GB big. Could you take a look at it please? I have uploaded both video file here: https://we.tl/t-fw5IzVJyo9 DJI_0029.MP4 is the working file. DJI_0031.MP4 is the broken file

anthwlock commented 4 years ago

So the problem was that thumbnails were embedded into the start of the 'priv' track. Luckily, they are followed by 241 zero-bytes, so it's easy to skip them, (see 3d45d366e30ab2b2420b93b8356f4b48f7c0638a).

However the resulting files still contain many glitches/artifacts. Please try other reference files, and let me know if that helps.