Page 1 of 1

[RESOLVED] Bug in demuxing forced subtitles?

Posted: Fri Mar 08, 2019 4:35 am
by Convert33
I'm using slipstream 171. When I use DGIndexNV to demux PGS subtiltes, the generated sup-files appear to be fine. But when I activate in settings "PGS forced subtitles only" and then examine the generated sup-file, the start time of each forced subtitle is identical to the corresponding entry in the file containing all subtitles. But the end time of each forced subtitle does not equal its original end time, but it equals the start time of the next subtitle in that file.

Example (extracted without "PGS forced subtitles only"):

Code: Select all

#   Start Time    End Time      Duration  Text
1   00:02:35,990  00:02:37,367  1,377     Text 1
2   00:02:51,631  00:02:52,799  1,168     Text 2
3   00:03:09,440  00:03:10,441  1,001     Text 3
4   00:03:16,739  00:03:17,782  1,043     Text 3
5   00:03:37,009  00:03:38,052  1,043     Text 2
Example (extracted with "PGS forced subtitles only" enabled):

Code: Select all

#   Start Time    End Time      Duration  Text
1   00:02:35,990  00:02:51,631  15,641    Text 1
2   00:02:51,631  00:03:09,440  17,809    Text 2
3   00:03:09,440  00:03:37,009  27,569    Text 3
4   00:03:37,009  00:03:49,063  12,054    Text 2
5   00:03:49,063  00:04:21,137  32,074    Text 4
This example shows another interesting thing: the original entries 3 & 4, which contain an identical text, appear to be merged in to a single entry, if "PGS forced subtiles only" is enabled.

Re: Bug in demuxing forced subtitles?

Posted: Fri Mar 08, 2019 12:26 pm
by admin
Ooh, I hate bugs! :bug: I was able to reproduce this with the Ironman buray. Investigating...

Thank you for pointing this out.

Re: Bug in demuxing forced subtitles?

Posted: Fri Mar 08, 2019 1:53 pm
by admin
Here is what is happening. PGS subs work like this: First a composition segment is sent that contains a bitmap. This segment specifies the start time. Then, a composition segment is sent without a bitmap. This segment determines the end time for the previous composition segment. The problem is that only the segments with a bitmap are marked forced (weird!), so I do not output the empty segments when the forced only option is selected.

I can fix this by always outputting the segment that follows a forced segment. Working on that now.

Re: Bug in demuxing forced subtitles?

Posted: Fri Mar 08, 2019 4:40 pm
by admin
Here's a 64-bit test version. Please let me know how it fares. Thank you.

http://rationalqm.us/misc/DGIndexNV_Convert33.exe

Re: Bug in demuxing forced subtitles?

Posted: Sat Mar 09, 2019 12:45 pm
by admin
Convert33 kindly provided a sample that is an MKV file. So I revised the test version to support MKV also. Please re-download for testing. Thank you Convert33 for your assistance in resolving this issue. :salute:

Re: Bug in demuxing forced subtitles?

Posted: Sun Mar 10, 2019 4:27 am
by Convert33
Thank you very much for the new test versions. I've tested demuxing of three different stream types: m2ts, ts and mkv. In all cases the start and end times of the demuxed forced only subtitles now equaled the original ones. I've also remuxed the forced only subtitles back into the stream and they displayed correctly.
So thanks a lot for analyzing and fixing that problem, and even doing that super fast!

Re: Bug in demuxing forced subtitles?

Posted: Sun Mar 10, 2019 7:45 am
by admin
You're most welcome and thank your for your report and thorough testing. I will slipstream it later today.

Forgot to say: Welcome to the forum!