[mythtv-users] Fix for forced subtitle problems

Angela angela.schmid at wolke7.net
Mon Dec 4 14:35:08 UTC 2023


>From: mythtv-users <mythtv-users-bounces at mythtv.org> On Behalf Of Paul Gardiner
>Sent: Wednesday, November 29, 2023 2:12 PM
>To: Discussion about MythTV <mythtv-users at mythtv.org>
>Subject: [mythtv-users] Fix for forced subtitle problems
>
>I've just posted this pull request: 
>https://github.com/MythTV/mythtv/pull/821.
>
>The problem may be something you see only if you use mythfrontend to play .mkv files. Forced subtitles are handled automatically, but the implementation relied on choosing the forced subtitle as the user's default, and that in turn meant that the T key no longer would toggle on a suitable non-forced subtitle track. The fixed version still automatically displays forced subtitles, but leaves the user's selection to be a non-forced track. That way, the T key toggles between the two.
>
>Hoping someone will pick this up sometime.
>

It has always bothered me and always went through the subtitle menu to figure out what is available and set accordingly, only one caption was enabled.

I tried master and merged the pull request (3 commits https://github.com/MythTV/mythtv/compare/master...Glidos:mythtv:improve-forced-subtitle-handling)
I haven't noticed a difference in behavior.

https://github.com/MythTV/mythtv/commit/f26115f19adb07191a3efa6898395e097cc8f353
Commit "Avoid displaying two AV subtitle tracks simultaneously"
When I am reading the comments correct, at any given time either a forced and a non-forced can be active. Is it implemented like this?

"This commit ensures that the user enabled one inhibits the forced one.": the forced has prio?

This is not what I would expect. The menu has two toggles for enable/disable the forced and the non-forced, so than I might expect both to be shown simultaneous.
Any reason for not showing both? I can disable either one when the results are annoying.

As I have in the playback OSD settings "display captions" enabled and forced is always enabled at playback start, I would expect that the forced and a non-forced (with a prio for the user's language) are displayed.

https://github.com/MythTV/mythtv/commit/04d6f70aa7685464cc93d4cf2e851500da0cf930
Commit "Handle forced AV subtitles without needing a forced track to be selected "
"The new behavior attempts to find a non-forced track for the user's preference and changes the subtitle toggle feature to be between forced and non-forced, rather than on and off."

Are we talking about the following key: "TV Playback	NEXTSUBTITLE	Next subtitle track" 
I do not see any difference in behavior, it has always been "scrolling" through the captions; forced and non-forced.

Can you please comment.

Angela


Captions:
Text #1
ID                                       : 4
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 1 min
Bit rate                                 : 89 b/s
Count of elements                        : 24
Stream size                              : 79.2 KiB (0%)
Title                                    : Forced
Language                                 : German
Default                                  : Yes
Forced                                   : Yes

Text #2
ID                                       : 5
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 1 min
Bit rate                                 : 7 232 b/s
Count of elements                        : 1327
Stream size                              : 6.28 MiB (0%)
Title                                    : Full
Language                                 : German
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 6
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 42 min 25 s
Bit rate                                 : 62 b/s
Count of elements                        : 7
Stream size                              : 19.6 KiB (0%)
Title                                    : Forced
Language                                 : English
Default                                  : No
Forced                                   : No

Text #4
ID                                       : 7
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 52 min
Bit rate                                 : 8 991 b/s
Count of elements                        : 1364
Stream size                              : 7.21 MiB (0%)
Title                                    : Full
Language                                 : English
Default                                  : No
Forced                                   : No


commit 6b2788334b29c474fc4c7117383b5f8ad66d923e (HEAD -> myfixestracked/master_20231204)
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Fri Dec 1 19:59:39 2023 +0000

    Avoid displaying two AV subtitle tracks simultaneously

    Recent changes to the handling of forced AV subtitle tracks require that
    two tracks may be considered for processing simultaneously. This happens
    if there is a forced track and a user enabled one. This commit ensures
    that the user enabled one inhibits the forced one.

commit 1d04a434fe5a3cbc6da9d9cefbe34cd4c6b07cf7
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Tue Nov 28 15:55:07 2023 +0000

    Handle forced AV subtitles without needing a forced track to be selected

    This improves the behaviour of mythfrontend in its automatic handling of
    forced subtitle tracks. The previous behaviour relied on automatically
    selecting the forced track as a default for the user's preference. The new
    behaviour attempts to find a non-forced track for the user's preference and
    changes the subtitle toggle feature to be between forced and non-forced,
    rather than on and off.

commit 291fd7586725e910aa1b587cedd54509058ba0ce
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Tue Nov 28 12:12:46 2023 +0000

    Factor out the best track calculation for selecting the subtitle track

    Also generalise the algorithm to allow forced tracks to be disfavored.
    This is work towards improving the handling of forced tracks.



More information about the mythtv-users mailing list