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 »

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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post by Rocky »

Sure, I get it, thank you. Lemme think. :scratch:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post by Rocky »

Do you know what the other apps are doing in this regard, especially eac3to?
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

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

Post 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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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?
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:
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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post by Rocky »

I have it working. Gonna do some testing versus eac3to before giving you a test version, hopefully today.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

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

Post by hubblec4 »

Very cool news. Many thanks!
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

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

Post by Sherman »

You forgot to say welcome to the forum again. :lol:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post by Rocky »

Welcome to the forum, hubblec4!
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 and I'm testing already.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

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

Post 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.
Attachments
subs.7z
(4.42 MiB) Downloaded 168 times
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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.
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:
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?
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

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

Post by Bullwinkle »

You scratch our back, we'll scratch yours.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

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

Post 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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post by Rocky »

Not sure if you are asking for a change to what we've done.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

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

Post 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.
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:
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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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?
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:
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.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

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

Post 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
Post Reply