[mythtv-users] Fix for forced subtitle problems

Angela angela.schmid at wolke7.net
Wed Dec 13 19:19:02 UTC 2023


>> I tried with only the first two commits; forced subtitle shown, I would prefer the non-forced.

>I've gotten lost now in where this is going. With the first two commits, the intention is that you get the forced subtitles (if present) without having to explicitly enable them - when you want the non-forced subtitles, you just hit the T key (TOGGLECC) to make them display. When you no longer want the non-forced subtitles, you hit the T key again to disable them and the forced ones will still be enabled. If that's not the behaviour you're seeing then perhaps the commits aren't working correctly on master, or for some videos.

@Paul,
I had a second look at your first two commits using a well-defined subtitle sample mkv. Unfortunately, I do not see the behavior you mention.

Attached is a script to create a small mkv with subtitles (languages, forced, display time is configurable), it uses mkvmerge from mkvooltnix. It needs an input.mkv from which it only uses the video.

TOGGLECC toggles the current subtitle (either forced, non-forced, external, teletext) on and off, no jumping between forced and non-forced.
Might it be that you have a video, where the non-forced is your current subtitle (sounds strange, as you only have the forced enabled), and you disable/enable it, leaving the impression, you toggle the non-forced with the forced always displayed.

I think the behavior of TOGGLECC should NOT change, as it should be quickly possible to disable the subtitle, to hide the subtitle, and show the full display area. 
I use this key often, for example to hide the subtitle to read the name of a person.

As my experience with the change is a different one as you explain, I wrote in my last mail how VLC implements and provided matroska subtitle guidelines, to come up with a proposal for MythTV and sum up the behavior, and yes, with how I would prefer it (similar matroska guideline, non-forced when available), leaving also the possibility when others would like a different behavior (having a third global option).
I think it does not need a lot of change. 
Unfortunately, you haven't commented about that section.

The third section, about merging everything together, was more about not having to go in every subtitle section, and manage everything with the NEXTSUBTITLE key, and having only one simple menu, similar as VLC does.
Currently changing between internal and external is only possible via the menus. Having multiple external subtitles is, when I am right, not supported.
Having a non-forced and forced enable/disable toggle is misleading and not working. IMO, I would rather see one menu with toggle enable/disable subtitle, independent what is currently viewed, same what TOGGLECC is used for.
The TOGGLESUBTITLE key shows some strange side-effects when external and teletext subtitles are active. 
Such a change would maybe also need the view from others.


I copied my previous comments:
========================
I found the following information:

https://github.com/HandBrake/HandBrake/issues/4848
https://www.matroska.org/technical/notes.html
"Subtitle selection" (bottom of the page) "This means that even if the user’s preferences wouldn’t normally call for captions here, the Forced track should be selected nonetheless, rather than selecting no track at all. On the other hand, if the user’s preferences do call for captions, the non-Forced tracks should be preferred, as the Forced track will not contain captioning for the dialogue."

And checked some behavior with VLC:
- when subtitles enabled, starts always with a forced in the preferred language.

I would like to revise my comments from previous mails (having two captions at the same time displayed), and would suggest the following (which is in line with your opinion):

- user has disabled "enable subtitles": show no subtitles (this is how VLC implements, but not according the guidelines from the "note")
- user has enabled "enable subtitles": when non-forced available, otherwise forced (this differs from VLC behavior, but goes with the "note" and would be my preferred), the chosen subtitle needs to be 'active' so that later toggles work on this subtitle.
- only one subtitle is shown
- NEXTSUBTITLE:  looping through all available subtitles (non-forced, forced, external), this is already true for non-forced and forced
- TOGGLECC: enables/disabled the current selected subtitle
- Remove the playback menu setting "enable/disable" forced subtitle (and related code), it only needs one toggle for enable/disable subtitle, and that for the currently selected one.

VLC and the "note" have different implementations/guidelines, I would prefer a mix of both as described above. 
When there would be people who want to have the current (forced) behavior be kept, then change the global settings to: "no subtitles", "subtitles (default forced") as currently implemented, and add new "subtitles (default non-forced)".

What are your thoughts.

Further observations:
I had also a look at the handling of external subtitles, it seems to be very limited, it just takes one with base-filename + ".srt" (have to look the code what are the possible options).
VLC merges all subtitles together (internal, external, teletext). When implemented similar in MythTV it would make the following menus obsolete (and therefor easier):
"Select Teletext CC" / TT C1: <language> "Text Subtitles" / "Enable/Disable External Subtitles"

In case of external and teletext subtitles TOGGLESUBTITLE disables, but never enables them back again. It can get reactivated by pressing twice TOGGLECC again (off and on).
=======================

mythfrontend version: myfixestracked/master_20231204 [v34-Pre-596-g38aafa4eaa] www.mythtv.org

commit 38aafa4eaaf2882724b8fb7fc0c35fe1e6f52448 (HEAD -> myfixestracked/master_20231204)
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 f429ea162b1d01221d106428baf5f5c12bbe0d7e
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create_mkv.sh
Type: application/octet-stream
Size: 3198 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20231213/4e615a2f/attachment.obj>


More information about the mythtv-users mailing list