Extract also Forced subs (not "only forced subs")

User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Works fine.
Many thanks again for your work.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Thank you for your testing. I will make a release.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Hi

After little coding I found a small inaccuracy.
When I demux not all sup streams, for example only one, DGDemux reports for all sups the count of captions, but with a value of 0 for non selected sups.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Thank you for the report. I have slipstreamed a fix into build 69, so please re-download.

BTW, if a PGS is enabled for demux but has no subs at all, nothing is printed then either. Of course that's highly unlikely.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Rocky wrote:
Sun May 28, 2023 7:22 am
Thank you for the report. I have slipstreamed a fix into build 69, so please re-download.
Many thanks for this fast fix. It works.
Rocky wrote:
Sun May 28, 2023 7:22 am
BTW, if a PGS is enabled for demux but has no subs at all, nothing is printed then either. Of course that's highly unlikely.
Great! I was not sure to mention this. And you are fully right that's highly unlikely.
But for my disc chunks I can confirm no output of file creation is send to the output if no data are written to a file.
I had implemented already a file check if the file is really present and now I can remove this.

Very cool and many thanks.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

You are most welcome.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Sorry for disturbing you again but I found an error.

Code: Select all

DGDemux 1.0.0.69 by Donald A. Graft
Copyright (C) 2019-2023 Donald A. Graft, All Rights Reserved [Made in Frostbite Falls, Minnesota]
01065.m2ts
Created for demux: 00801 PID 1201 deu.sup
Created for demux: 00801 PID 1200 eng.sup
PGS 1200: 936 total subs, 0 forced subs
Created for demux: Created for demux:  subs, 0 forced subs

PGS 1201: 741 total subs, 2 forced subs
Done!
For the sup stream 1201 are exists forced subs, but the output for the created filename looks weird.
"Created for demux: Created for demux: subs, 0 forced subs"

The file names name is fine "00801 PID 1201 deu (forced).sup"
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Investigating...

I'll address your other posts after we get this working.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Redownload build 69 and update DGDemux.exe. The bad output messages for creation of the forced-only files was fixed.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Many thanks for the fast fix, it works.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

Any chance this could be an on/off option?

Resident Evil: Afterlife (2010)
Subtitle_11_English_Normal_Forced = 640 Normal and 12 Forced events.
Subtitle_17_English_Normal = 25 events.
Subtitle_18_English_Normal_Forced = 1088 Normal and 226 Forced events.
Track 11 contains Type 1 events (12 Forced events with the 640 Normal events in the main English subtitle track 11).
Track 17 contains Normal events.
Track 18 contains Normal and Forced events (226 Forced events with the 1088 Normal events in the commentary English subtitle track 18).

This disc will output 5 subtitle tracks if all Englich tracks are selected. I only create Blu-Ray structure, so track 11 is all I need. I want both the Normal and Forced events in the same track. I still would have chosen to demux the other 2 tracks but wouldn't use them after verifying the contents.

I know you are going to tell me I can just delete the other tracks, but what if it also had a THD audio track. I would have 9 tracks after demux. So, I would be keeping 3 and deleting 6. Keep AVC/THD+ACS/SUP and delete THD/AC3/SUP/SUP/Forced SUP/Forced SUP

It's just an ask, but it would be nice to lessen the amount of output that isn't going to be used.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Bandits wrote:
Thu Sep 07, 2023 1:01 am
Any chance this could be an on/off option?
Not clear to me what you mean by "this". If you ask for an interface change it's on you to specify exactly what the revised interface will be.

I'll add that we have extensive discussions in the forum before deciding on and implementing things. Coming along much later and asking for something different is very trying on us and our available time. And then of course there are implications for 3rd-party tools that rely on the existing interface. You want everybody to re-work everything because you don't want to have to delete unused things?

Not saying no, but you need to specify the exact interface (i.e., options and behavior) you are looking for. If it's backward compatible so that existing apps won't need changes that increases the likelihood that we will accommodate you. Thank you for understanding.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

Yes, it seems like I could have benefited from being here in May/June.

What I was trying to ask for is the ability to not have tracks with some forced subtitles be automatically placed into new tracks. The log output tells me there are tracks with some or all forced events, this is great information. Automatically creating new tracks just containing the forced events, just creates extra files if you aren't going to use them.

-efo
-exportforcedonly

Would give the user a choice to have those files created or not. This would not change anything for users, it just enables the exporting instead of always on.

With DGDemux, I can demux 3 tracks, a Video, Audio, and a Subtitle. With THD audio and a subtitle track with some forced events I will get 6 tracks. Thats twice as much as needed. With Resident Evil: Afterlife (2010) its 3 times as many.

I think the exporting is a great function, I just think it could be optional rather than always.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Are you asking for an option to not create the forced subs streams? Something like -noforcedonly? If the option is not given, the forced streams would be created as usual and 3rd-party apps are not affected.

Note that the THD audio stuff is another matter, we've discussed that elsewhere.

@hubblec4

Any issues you can see with adding this?
User avatar
Britney
Posts: 145
Joined: Sun Aug 09, 2020 3:24 pm

Extract also Forced subs (not "only forced subs")

Post by Britney »

Bandits wrote:
Thu Sep 07, 2023 11:26 am
Yes, it seems like I could have benefited from being here in May/June.
Poor you.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

If I were asked, logically I would only create the items selected as the default (No switch needed). If I wanted the forced events stripped into a separate track, that would be the extra setting (-exportforcedonly/-efo). If that will never happen, then having to decline the extra files is better than not having the option at all (-noexportforced/-nef).

Just to be clear, I would still want tracks with forced events, just nothing exported into new tracks.

With these settings:

".\DGDemux" -l ".\DGDemux\demux.txt" -i ".\BDMV\PLAYLIST\00000.mpls" -o ".\Output\" -demux 1011,1100,1200,1201,1202,1203,1204,Chapters -thd 0

Right now I get:

DGDemux 1.0.0.72 by Donald A. Graft
Copyright (C) 2019-2023 Donald A. Graft, All Rights Reserved [Made in Frostbite Falls, Minnesota]
00000.m2ts
Created for demux: PID 1011.avc
Created for demux: PID 1100 embedded eng.ac3
Created for demux: PID 1100 48000 6ch eng DELAY 0ms.thd
Created for demux: PID 1200 eng.sup
Created for demux: PID 1201 eng.sup
Created for demux: PID 1202 eng.sup
Created for demux: PID 1203 eng.sup
Created for demux: PID 1204 eng.sup
Generate thd+ac3
Created for demux: PID 1100 48000 6ch eng DELAY 0ms.thd+ac3
Created for demux: PID 1200 eng (forced).sup
PGS 1200: 97 total subs, 14 forced subs
Created for demux: PID 1201 eng (forced).sup
PGS 1201: 97 total subs, 97 forced subs
Created for demux: PID 1202 eng (forced).sup
PGS 1202: 97 total subs, 97 forced subs
Created for demux: PID 1203 eng (forced).sup
PGS 1203: 97 total subs, 97 forced subs
PGS 1204: 97 total subs, 0 forced subs
Done!

Gives me:

PID 1200 eng.sup, PID 1200 eng (forced).sup, PID 1201 eng.sup, PID 1201 eng (forced).sup, PID 1202 eng.sup, PID 1202 eng (forced).sup, PID 1203 eng.sup, 1203 eng (forced).sup, PID 1204 eng.sup

1201 and 1201 (Forced) are identical
1202 and 1202 (Forced) are identical
1203 and 1203 (Forced) are identical

This seems excessive to have all those files.

No option should give:

PID 1200 eng.sup, PID 1201 eng.sup, PID 1202 eng.sup, PID 1203 eng.sup, PID 1204 eng.sup

Log reports PGS stats

Option should give:

PID 1200 eng.sup, PID 1200 eng (forced).sup, PID 1201 eng.sup, PID 1202 eng.sup, PID 1203 eng.sup, PID 1204 eng.sup

The 1200 still has 14 forced events.
The 1200 (Forced) only has the 14 forced events extracted.
1201, 1202, and 1203 have all forced events.
Log reports PGS stats

Or

PID 1200 eng.sup, PID 1200 eng (forced).sup, PID 1201 eng (forced).sup, PID 1202 eng (forced).sup, 1203 eng (forced).sup, PID 1204 eng.sup

The 1200 still has 14 forced events.
The 1200 (Forced) only has the 14 forced events extracted.
1201, 1202, and 1203 (Forced) are named to show they have all forced events.
Log reports PGS stats

Thanks for listening.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

All I'm willing to do is add -noforcedonly, which when given suppresses creation of forced only streams. Yes, obviously, the forced subs are still in the main subs file, it's just that a forced only file would not be created.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

Not trying to argue here, but what is the point of creating tracks that are identical but named differently? If a track contains all forced events, you automatically create an identical duplicate track with a (forced) name as shown in the example above.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Bandits wrote:
Fri Sep 08, 2023 10:13 am
Not trying to argue here, but what is the point of creating tracks that are identical but named differently? If a track contains all forced events, you automatically create an identical duplicate track with a (forced) name as shown in the example above.
There's no point obviously, but I never ran across such a stream. If you want to give me a link to a sample stream, I could use it to address this.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

Ford v Ferrari (2019) Track 11
Booksmart (2018) Track 10
Dark Phoenix (2019) Track 14
The Predator (2018) Track 7
Dances with Wolves (1990) Track 10 and 11
Alpha (2018) Track 9 and 22
Missing Link (2019) Track 6

All these disc's and there are plenty more.

The listed tracks above are forced event only tracks. When demuxed with DGDemux, you get a eng.sup and an eng (forced).sup that are identical.

Basically, any track where total subs=forced subs. You get 2 files that are identical but one with the (forced) name.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

This is a normal behavior. DGDemux can not know the count of the total and forced subs until all is demuxed.

Quickly to know if a forced sub stream contains the same amount like the full sub stream, you could check the DGDemux output which reports the count of subs for both sub streams.

Is the count equal then I know there are no extra forced subs.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

hubblec4 wrote:
Sun Sep 10, 2023 7:51 am
DGDemux can not know the count of the total and force subs until all is demuxed.
Correct. But what I could do is automatically delete the forced subs file if it has the same count as the main subs file. The problem is that not having a forced subs file implies there are no forced subs, when in fact all of them are forced. I am inclined to just leave things as is. However, I may add the -noforcedonly option.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Extract also Forced subs (not "only forced subs")

Post by hubblec4 »

Yes, the same thing we both have discussed in this thread and the conclusion was to output both files ever.

And you had added extra the counting of the subs so that my cE knows quickly if there are extra forced subs.

The same process I had to do with BDSUP2Sub: extract the forced subs and check if the count equal to the main subs.

I'm fully happy like it is.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Extract also Forced subs (not "only forced subs")

Post by Rocky »

Thank you hubblec4. I'll leave that part as is then. The addition of -noforcedonly should not affect you.
DAE avatar
Bandits
Posts: 20
Joined: Tue Sep 05, 2023 3:37 pm

Extract also Forced subs (not "only forced subs")

Post by Bandits »

The log shows that the files created have forced events. The file names don't really matter. It's nice, but it results in extra files. I understand why they are created during the demux, I was just curious why duplicated files remain after the demux is complete. I guess this is expected.

This is how I handled it. If log says:
Total = forced, all events are forced.
Total > forced, simple subtraction gives me regular event total.
Forced = 0, no forced events.

This is why I questioned the default is to output both the original and the extracted. Even if the files were just PGS_1200, PGS_1201, PGS_1202... The log gives me everything I need to know about the events. Thank you for both the total and the forced. If DGDemux was capable of extracting the events, which it is, it would have a -option for it, not just do it by default. I am not asking you to change anything, I just want to know you understand what I am saying. Sort of like less = more, until you need more.
Post Reply