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

Error: unable to find correct codec -> premature end (~0.00165%) #156

Open irdet2 opened 4 months ago

irdet2 commented 4 months ago

Hello!

First time user of untrunc so please excuse my ignorance. I have a file that is not playing with a size of 1.49GB and have multiple files that are working from the same camera but so far none of the ones I have tried was able to help me create a playable file.

I am using untrunc on MacOS from an image container via the supplied Dockerfile but can build it locally from scratch if you think it will change anything, since this one uses ffmpeg 3.4.11-0ubuntu0.1.

The error I am getting is the one of the title: Error: unable to find correct codec -> premature end (~0.00165%)

Does it matter the size of the "OK" files? Do they need to be larger than the "to be repaired" file? I have tried with files around 400MB, 500MB and 1.2GB. Would it make any difference if I keep trying with other "OK" files?

Any other ideas or pointers please?

Thanks and regards

P.S.: Here is the result when running it with the "-s" flag

Composition time offset atom found. Out of order samples possible.
WARNING: Because of internal decoder changes, using ffmpeg '3.4.11-0ubuntu0.1' with '-s' can be slow!
         You are advised to compile untrunc against ffmpeg 3.3!
         See the README.md on how to do that.
Info: version 'v308-d72ec32-dirty' using ffmpeg '3.4.11-0ubuntu0.1'
Info: reading /mnt/C0414_ok3.MP4
Info: parsing healthy moov atom ...
Info: special track found (meta, 'Timed Metadata Media Handler')

Info: unknown track 'twos' found -> fallback to dynamic stats
Info: using dynamic stats, use '-is' to see them
Warning: no mp4-structure found in: '/mnt/C0429_repair.mp4'
Info: using orig_mdat_start_ (=176)
Info: reading mdat from truncated file ...
Info: Found 24 packets ( avc1: 0 avc1-keyframes: 0 twos: 0 rtmd: 24 )
Info: Duration of avc1:  (0 ms)
Info: Duration of twos:  (0 ms)
Info: Duration of rtmd: 480ms  (480 ms)
Warning: Unknown sequences: 1
Warning: Bytes NOT matched: 1.39GiB (100%)
Info: pruned empty 'avc1' track
Info: pruned empty 'twos' track
Info: saving /mnt/C0429_repair.mp4_fixed-s1-dyn.MP4