Closed platima closed 3 years ago
Interesting, I will try to investigate this once I have enough time.
Would you mind sending me a small sample? You can generate a 200 MB file from a bigger file with with untrunc -sh big_file.mp4
.
Do you get similar results when you use untrunc like this: untrunc good.mp4 good.mp4
?
I have been having this issue for a while now as well. Figured my container was just broken or something.
Should be fixed with b150ae5f701c85ad419c55de2617686ccda93d0a
untrunc-w seems to use a interleavingMask
for this.
That mask is similar to Mp4::track_order_
. However for this purpose a (new) "simpler" version Mp4::track_order_simple_
suffices, which does take n_samples (per chunk) into account.
I refactored the code a bit, so that it's possible to extract this new track order in case of duplicate tracks.
Once extracted, the crucial change was this line.
That's awesome, so if I run this again, I should get the multiple audio streams correctly now?
Edit: Yep this worked perfectly! Thanks a mil :)
Hey so I'll be honest I have no tested this with a WORKING file, and I would but I'm tired and running out of disk space, but what I am seeing here doesn't make a huge amount of sense and Iv'e done enough programming to think this is a bug.
Long story short, 2x OBS recordings with the same AV setup, being 1x 1080p video and 2x audio streams. Repairing one that ended prematurely (no moov atom) and I get this;
The bits that interest me are that it picked up a 3h16m video, an empty audio track, then a 7h8m audio track. Playing it back, the audio was VERY slowed down, and I am fairly certain that I can hear both tracks in there, but they are interlaced in some way.
Using SuslikV/untrunc-w I managed to get both audio tracks, and am now just adding them back to the original video.