justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
849 stars 144 forks source link

tsmuxer has issues with seamless branching with changes in audio setup #633

Open sjpotter opened 2 years ago

sjpotter commented 2 years ago

I have "many" blurays that have seamless branching where there's an "initial" distributor m2ts file as part of the playlist that has no audio and then a main m2ts that has audio. In these cases tsmuxer (along with mkvtoolnix, amongst others. makemkv is a bit smarter an just throws away the initial m2ts file) chokes on these remuxes into the .ts without any audio at all.

I'd think it be better to be able to fill in gap with "silent" audio. This should be relatively straight forward if the rest of the audio is PCM, but might be a bit for compressed formats, or at least would have to understand them and have a sample table to draw from. But it be nice if it a) detected the situation and notified the user and b) handled what it could handle.

jcdr428 commented 2 years ago

@sjpotter could you please give examples of movies (and distributors/country release) where we can see this case ?

sjpotter commented 2 years ago

I believe I've seen this issue on every single recent kino lober release, will verify later as their logo is silent/no audio (one m2ts) and the main movie is not (another m2ts). Kino Lober films aren't always pcm, so not quite the simple fix I proposed.

jcdr428 commented 2 years ago

@sjpotter the solution could be to include a stream delay corresponding to the length of the first track.

sjpotter commented 2 years ago

yes or just exclude the logo (what makemkv effectively does), but becomes more complicated with the other bug (mpls in/out marks) that I just posted.

But as I said, it be nice if the situation was detected and warned about in general, and as I said, tsmuxer (right now) creates a video only ts output in this case.