Open evanmw opened 3 years ago
Without files (healthy + broken) I can't offer you any help.
I just emailed you a link to files. One note- I created the healthy clip with untrunc -sh healthy.mp4
. When I run untrunc -i healthy.mp4_short-200.mp4
, I get:
Info: version '' using ffmpeg '3.3.9'
Info: reading healthy.mp4_short-200.mp4
Info: parsing healthy moov atom ...
Warning: avcC was not decoded correctly
untrunc: src/mp4.cpp:153: void Mp4::parseTracksOk(): Assertion `track.chunks_.back().off_ < mdats.back()->start_ + mdats.back()->length_' failed.
Aborted (core dumped)
Is this expected? untrunc -i healthy.mp4
with the full healthy video works.
Yes, it is. It means that there is less data than referenced by the moov atom.
This can be ignored by passing -dcc
.
I just emailed you a link to files. One note- I created the healthy clip with > untrunc -sh healthy.mp4> . When I run > untrunc -i healthy.mp4_short-200.mp4> , I get:
Info: version '' using ffmpeg '3.3.9'Info: reading healthy.mp4short-200.mp4Info: parsing healthy moov atom ... Warning: avcC was not decoded correctlyuntrunc: src/mp4.cpp:153: void Mp4::parseTracksOk(): Assertion `track.chunks.back().off < mdats.back()->start + mdats.back()->length_' failed.Aborted (core dumped)
Is this expected? > untrunc -i healthy.mp4> with the full healthy video works.
— You are receiving this because you commented. Reply to this email directly, > view it on GitHub https://github.com/anthwlock/untrunc/issues/67#issuecomment-697953361> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AJQZFONNCZ2MU3J63PLTN7DSHJKTRANCNFSM4RV7ZY2Q> .
Your avc1 track seems to use the "annex b" byte-stream format. untrunc's code currently assumes the (more popular) "avcc" format. I wrote this "FIXIT" 2 years ago: https://github.com/anthwlock/untrunc/blob/ebeaa12680fb029739d9389ecde28b2417622103/src/avc1/nal.cpp#L25-L28
What's nice is that it looks like "annex b" can be used directly (e.g. without a container).
So you can recover your files by skipping to the raw data, like this:
dd if=bad.mp4 of=bad.h264 skip=48 iflag=skip_bytes,count_bytes
Do you have any idea how you ended up with this "annex b" in an mp4/mov file? What tool did you use to create these files? Did you somehow use ffmpeg's 264_mp4toannexb filter?
Hi, I'm trying to recover a video that was being encoded when a hard power-off of the computer occurred. If I use the -s option, I end up with a grey video.
Built yesterday from master with local libraries on Ubuntu 16.04.
I'll definitely try this suggestion in the future. Thanks for any help you can offer.