untrunc
untrunc copied to clipboard
restored file is not usable
when I restore an MP4 file created by a Hawkeye firefly 4K splitcamera, the video is stuttering extremely. I think the file got corrupt because camera turned off before finishing the recording. it would be nice if there was a fix, because I have many videos with this defect. On the other hand, many similar videos were successfully restored in this way, so i dont know why some seem impossible to restore.
when running with "-s" option the output has only several kilobytes of size. is there a way to improve the result?
Info: reading mdat from truncated file ...
[aac @ 0x556cc1e78820] channel element 2.6 is not allocated
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: NOT skipping dpnd atom: 2820129963 (at 128209257 / 128221593)
....
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Different nuh_layer_id_ idc
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Warning: Codec::was_bad_ = 1
Info: Found 2537 packets ( mp4a: 524 hvc1: 2013 hvc1-keyframes: 143 )
Tip: Audio and video seem to have different durations (0.416493).
If audio and video are not in sync, give `-sv` a try. See `--help`
Info: Duration of mp4a: 16s 768ms (16768 ms)
Info: Duration of hvc1: 40s 260ms (40260 ms)
Warning: Unknown sequences: 1701
Warning: Bytes NOT matched: 93.1MiB (9.755%)
Info: saving /mnt/20210101230242_000023.MP4_fixed-s1.MP4
It's not finding the offsets properly. Recovering video is more simpler than recovering audio. Use a parser tool and see how the video sample offsets are implemented. There will always be parent and child samples. You need to align the parent with the child and vice versa.