Page 1 of 3

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

Posted: Tue May 02, 2023 6:14 pm
by hubblec4
Hi
Is it a lot of work to create a forced-sub file in addition to the full sub file while demux a sub stream?

Currently I see no info if a sub stream contains also forced subs.
For all sub streams it is necessary to demux it twice to know if there are forced subs.

Maybe a new switch "-fa" forced subs also,
or maybe it would be better to use this permanently.

best regards.

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

Posted: Tue May 02, 2023 7:40 pm
by Rocky
Sure, I get it, thank you. Lemme think. :scratch:

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

Posted: Wed May 03, 2023 10:35 am
by Rocky
Do you know what the other apps are doing in this regard, especially eac3to?

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

Posted: Wed May 03, 2023 12:02 pm
by hubblec4
eac3to counts the forced subs while demux the sup stream and show this info in the output.
So I know there are forced subs or not, and I can demux the forced subs from the extracted sup stream with BDSup2Sub.

But also here are two processes necessary, it would be so nice when the forced subs could be additional extracted in one step.

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

Posted: Wed May 03, 2023 8:39 pm
by Rocky
Thank you for the information. I could count the forced subs but there's no good way to give you that information. How about if I just always make the normal demux of normal plus forced and automatically make an additional forced-only demux if there are any forced subs. The file name for the latter could have 'forced' in it. I think that may be what you suggested. Will it work for you?

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

Posted: Thu May 04, 2023 5:27 am
by hubblec4
Rocky wrote:
Wed May 03, 2023 8:39 pm
How about if I just always make the normal demux of normal plus forced and automatically make an additional forced-only demux if there are any forced subs.
I don't understand fully.
Would you extract the normal subs and than extract the forced subs from the normal subs?

I would go this way:
When demuxing a sup stream, I would create two output file streams, one is for the full subs and the other for the forced subs. Is a sub marked as forced the data also be written to the forced-sub-output-file.
After finish demuxing I would check if there was forced subs, if not than delete the forced subs file.

Rocky wrote:
Wed May 03, 2023 8:39 pm
The file name for the latter could have 'forced' in it. I think that may be what you suggested. Will it work for you?
Yes that makes sense to use "forced" in the filename for the forced subs.

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

Posted: Thu May 04, 2023 6:01 am
by Rocky
hubblec4 wrote:
Thu May 04, 2023 5:27 am
When demuxing a sup stream, I would create two output file streams, one is for the full subs and the other for the forced subs. If a sub marked as forced the data also be written to the forced-sub-output-file.
After finish demuxing I would check if there was forced subs, if not than delete the forced subs file.
Yes, that is what I meant with the exception that I create the forced file only on encountering the first forced sub, so if there are no forced subs, the file is not created, hence, there is no need to delete anything.

OK, I will try to implement this.

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

Posted: Thu May 04, 2023 10:44 am
by Rocky
I have it working. Gonna do some testing versus eac3to before giving you a test version, hopefully today.

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

Posted: Thu May 04, 2023 11:56 am
by hubblec4
Very cool news. Many thanks!

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

Posted: Thu May 04, 2023 12:44 pm
by Rocky
You are most welcome. Please test this:

https://rationalqm.us/misc/DGDemux_hubblec4.rar

I ended up doing it your way, i.e., create the forced file but delete it afterwards if there are no forced subs, as it was a bit easier that way. Also, the forced only option in the GUI is ignored and will be removed.

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

Posted: Thu May 04, 2023 12:48 pm
by Sherman
You forgot to say welcome to the forum again. :lol:

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

Posted: Thu May 04, 2023 12:49 pm
by Rocky
Welcome to the forum, hubblec4!

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

Posted: Thu May 04, 2023 2:24 pm
by hubblec4
Many thanks and I'm testing already.

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

Posted: Thu May 04, 2023 2:38 pm
by hubblec4
My first test with the 007 James Bond Bluray: Spectre

I attached the german subs extracted with DGDemux and with eac3to.
The forced subs of the eac3to demux are created by BDSup2Sub.

It seems all works like it should.

The forced subs file by BDSup2Sub is a bit smaller and some warnings was fixed.

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

Posted: Fri May 05, 2023 8:57 am
by Rocky
Thank you for the testing. The differences between the eac3to and DGDemux full sups files are 1ms differences in the timings for some subtitles. I put that down to different precision or rounding and consider it to be insignificant.

I will make a release 67.

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

Posted: Fri May 05, 2023 5:15 pm
by hubblec4
Rocky wrote:
Fri May 05, 2023 8:57 am
Thank you for the testing. The differences between the eac3to and DGDemux full sups files are 1ms differences in the timings for some subtitles. I put that down to different precision or rounding and consider it to be insignificant.

I will make a release 67.
Many thanks for checking my upload and your explanation.
Do you make also a new Linux release, please?

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

Posted: Fri May 05, 2023 8:28 pm
by Bullwinkle
You scratch our back, we'll scratch yours.

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

Posted: Sun May 21, 2023 6:30 pm
by hubblec4
Late, but I remember me on a special case where it useful/necessary to delete the created forced sup file.

I use BDSup2Sub to check each extracted sup if forced sups are there.
I have implemented a check if the count of the forced captions (BDSup2Sub reports this) is equal to the captions of the extracted sups, than cE deletes the forced sup file and reports no forced sups found.

This happens when an extra forced sup stream exists in the m2ts and all captions are marked as forced.
Rare case but sometimes I get such disc and I will upload a chunk of such disc next time.

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

Posted: Mon May 22, 2023 6:08 am
by Rocky
Not sure if you are asking for a change to what we've done.

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

Posted: Mon May 22, 2023 11:56 am
by Rocky
Sorry accidentally edited your post instead of replying. Then I lost it. :?

Please say what you want us to do. We can't read minds.

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

Posted: Mon May 22, 2023 11:58 am
by hubblec4
Re-post
Rocky wrote:
Mon May 22, 2023 6:08 am
Not sure if you are asking for a change to what we've done.
Honestly, neither do I right now.
Because a change to this feature would also mean an adjustment for the output of the file names.

DGDemux sends the filename as soon as the first forced subtitle is reached. But in the end this file will be deleted again.

I don't want to cause you too much trouble either.
It would be no problem for me to check that in cE.
However, it would be nicer if DGDemux would handle that.

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

Posted: Mon May 22, 2023 12:00 pm
by hubblec4
Rocky wrote:
Mon May 22, 2023 11:56 am
We can't read minds.
Yes no one can do this :-)

DGDemux should be able to delete a forced sup stream when it is equal to the normal sup stream.

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

Posted: Mon May 22, 2023 2:27 pm
by Rocky
hubblec4 wrote:
Mon May 22, 2023 11:58 am
DGDemux sends the filename as soon as the first forced subtitle is reached. But in the end this file will be deleted again.
The file itself is created and then deleted if there are no forced subs. The message is sent to stdout only if there are forced subs. If there are forced subs the file itself is not deleted.
DGDemux should be able to delete a forced sup stream when it is equal to the normal sup stream.
Ah, so that is what you are talking about. It can be done but then I will be lying and saying there are no forced subs when there are.

I could output at the end the number of forced and the number of normal subs. Would that help you?

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

Posted: Mon May 22, 2023 3:32 pm
by hubblec4
Rocky wrote:
Mon May 22, 2023 2:27 pm
hubblec4 wrote:
Mon May 22, 2023 11:58 am
DGDemux sends the filename as soon as the first forced subtitle is reached. But in the end this file will be deleted again.
The file itself is created and then deleted if there are no forced subs. The message is sent to stdout only if there are forced subs. If there are forced subs the file itself is not deleted.
DGDemux should be able to delete a forced sup stream when it is equal to the normal sup stream.
Ah, so that is what you are talking about. It can be done but then I will be lying and saying there are no forced subs when there are.
Exactly, DGDemux sends to the output that a forced sup file is created because there are forced subs.
But after demuxing there are now two bit identical sup files, because all subs was marked as forced.
So we have all the subs from the normal sup stream also in the forced sup file.

Yes there are forced subs but for us human makes not sense to say there are extra forced subs.
Nobody will preserve both sup files.
This is for me a special case where all subs marked as forced means no forced subs.

Rocky wrote:
Mon May 22, 2023 2:27 pm
I could output at the end the number of forced and the number of normal subs. Would that help you?
Yes, very good idea. With this info I could very fast check if the forced sup is the same like the normal sup and can delete the forced sup by my self.

If you like, DGDemux could make this check and delete the forced sup and send this info to the output.

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

Posted: Tue May 23, 2023 9:04 am
by Rocky
Please test this release candidate for build 69. It adds the PGS counts to the stdout. I choose not to delete anything when total=forced.

https://rationalqm.us/misc/DGDemux_hubblec4.rar