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 - Offset set before beginning of mdat #112

Open IN-NO-V8 opened 2 years ago

IN-NO-V8 commented 2 years ago

I believe I am having an issue similar to the thread here: https://github.com/anthwlock/untrunc/issues/40 However, I am not sure how to fix. I am using Sony MP4 clips My error popup when repairing a clip says: Error Offset set before beginning of mdat (-1912254608) Not sure what you would need in order to examine further, but my broken file is a 14gb clip, almost 15gb. All my other clips inside the same folder play, which I am using for reference, but this clip doesnt. Here is what the interface tells me when I am trying to repair:

Info: parsing healthy moov atom ... Composition time offset atom found. Out of order samples possible. Info: special track found (meta, 'Timed Metadata Media Handler')
Info: using dynamic stats, use '-is' to see them Warning: no mp4-structure found in: 'F:\Love and Eros\Raw Clips\sony clips\sony day 2\day 2\C0033.MP4' Info: using orig_mdatstart (=176) Info: reading mdat from truncated file ... Info: using 64-bit offsets for the broken file Warning: different start chunk: 1 instead of 2 Offset set before beginning of mdat (-1912254608)

Not sure what else is needed in order to further examine, but I remain hopeful that I can repair this, as I noticed in the previous error thread I mentioned that you managed to fix that one, and I believe it's a similar sony clip situation. Can anyone help me? Thanks in advance.

IN-NO-V8 commented 2 years ago

Update - Tried using a different file as a reference (a longer, bigger one) and checked skip unknown (-s) in the settings, and it appear it worked this time....however, this time it plays it as a jerky video....seems to skip and repeat frames, and it's missing the last 4 mins of the video clip (clip is now 16 mins long, its supposed to be about 21 mins). So, progress...but still broken/unusable. Any suggestions would be appreciated, thanks :)

IN-NO-V8 commented 2 years ago

More info - selected 'verbose' in the log, and unchecked skip unknown, and it wouldnt repair the clip again, heres the extended error report:

Info: parsing healthy moov atom ... Composition time offset atom found. Out of order samples possible. ftyp_ = 'XAVC' detected 'XAVC', deactivating 'g_strict_nal_frame_check' found avcC after: 102 remaining len:360 parsing avcC ... len_sps: 52 decoding SPS ... log2_max_frame_num: 6 avcC got decoded assuming constant duration of 1001 for 'avc1' (x26160) ss: avc1 is_stable: 0 ss: using f=7 span assuming constant duration of 1 for 'twos' (x52372320) assuming constant duration of 1001 for 'rtmd' (x26160) Info: special track found (meta, 'Timed Metadata Media Handler')

created dummy track 'free' removed dummy track 'free' first_failed: 0 of 101 simpleOrder: 2 0 1 order ( 101): (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) (1, 24024) (2, 12) (0, 12) first_failed: 0 of 101 order: (2, 12) (0, 12) (1, 24024) isTrackOrderEnough: 1 (sz=3)

dynamic stats:firstoff: 192 first_offrel: 0 max_partsize: 19481845 avc1 ss_normal: 92316 421227 2866474 ss_keyframe: 1668732 2553266 2872934 ss_total: 92316 17519 2872934 max_allowedss: 19481845 // strict=0 chunk_distancegcd: 1 start_offgcd: 1 end_offgcd: 1 likely n_samples/chunk (p=1): 12 likely sample_sizes (p=0): n_mutual_patterns: 0

twos ss_normal: 0 4 4 ss_total: 0 0 0 max_allowedss: 4 // strict=0 chunk_distancegcd: 1 start_offgcd: 1 end_offgcd: 1 likely n_samples/chunk (p=1): 24024 likely sample_sizes (p=1): 4 n_mutual_patterns: 0

rtmd ss_normal: 0 1024 1024 ss_total: 0 0 0 max_allowedss: 1024 // strict=0 chunk_distancegcd: 1 start_offgcd: 1 end_offgcd: 1 likely n_samples/chunk (p=1): 12 likely sample_sizes (p=1): 1024 n_mutual_patterns: 0

Info: using dynamic stats, use '-is' to see them ss: max_partsize: 19481845 fallback: -1

done!