mpv
mpv copied to clipboard
forced-track flag is not respected
Important Information
Provide following Information:
- mpv version: 0.33.00-25
- Windows Version: 10
- Source of the mpv binary: https://sourceforge.net/projects/mpv-player-windows/files/
- If known which version of mpv introduced the problem: latest version introduce this issue. Previous used version: 0.32.0-563 was properly behave for subtitle stream with force flag.
- Possible screenshot or video of visual glitches
Reproduction steps
Reproduce steps: set forced-track flag on subtitle stream using mkvtoolnix, add some other subtitles streams without this flag set and open this file with mpv - subtitle with forced-track flag will not be displayed as it was in 0.32.0-563 mpv version.
Expected behavior
Subtitle with forced-track flag set should be displayed automatically.
Actual behavior
Subtitle with forced-track flag are not displayed automatically (see first attached file) User have to enable this stream manually.
Probably this commit https://github.com/mpv-player/mpv/commit/c9474dc9ed6172a5f17f66f4b7d367da6b077909
I can reproduce, and my last working build was right before that commit.
As amended, I have notified in the IRC last week this and also https://github.com/mpv-player/mpv/issues/8311 The reason that yet I play the old stable version all this year!
This issue is still not resolved in 0.33.0-67 version.
that's why this is issue is still open and hasn't been closed yet.
Maybe is not an ultimate solution, but you can add this in mpv.conf and the forced sub of your languages will be played, work fine when is the first sub track muxed because the first language will have the priority
sub-forced-only
slang=<languagecode[,languagecode,...]>
Please provide an example configuration + set of streams (audio + subtitles, language + flags, text rather than screenshot).
It's not clear what problem you're actually having. If you want to use forced tracks rather than unforced ones when playing files where the sub language matches your language preference, you should use subs-with-matching-audio=no
(maybe this should be the default?).
Please provide an example configuration + set of streams (audio + subtitles, language + flags, text rather than screenshot).
It's not clear what problem you're actually having. If you want to use forced tracks rather than unforced ones when playing files where the sub language matches your language preference, you should use
subs-with-matching-audio=no
(maybe this should be the default?).
@rcombs It doesn't work at all. Use any sub that is flagged as forced, and it isn't played by default.
Using:
sub-forced-only=yes
subs-with-matching-audio=no
should play the forced subs, but it doesn't. Prior to that commit, it would play the sub track that is tagged as forced.
After a bit of poking on Discord, we discovered that this is happening specifically for users who don't set slang
at all, which results in funky behavior since no track matches their language preference of nothing.
I have a few tweaks to suggest for these cases; I'll open another issue for discussion.
After a bit of poking on Discord, we discovered that this is happening specifically for users who don't set
slang
at all, which results in funky behavior since no track matches their language preference of nothing.
If I set my slang
to a language other than the language of the forced track then It still doesn't work.
So it's not about not about not setting "slang
at all".
Yes I could set a list of every possible sub language I would want. But if the language of the track is not a normal language then it will not work (I've seen this done)
Anyway that should not be the expected behavior for forced subs. They should be forced.
If you speak 6 languages you're going to have to list them all. Sorry if that's a huge problem for you.
that really is not the issue.
if I use slang
then subs always show up even on files with no forced track.
and sub-forced-only
does not seem to do anything about it. (not sure why).
This is probably related to the issue I fixed in 41bad0c9ab9431dc6fe051a9dfd8d2ab43bee165. Please test on the #8865 branch.
How is this not fixed yet? It's like a basic functionality on pretty much any video player. I set forced subtitles with default & forced flags and mpv still not selecting them by default for me but when I set the audio that I want with default flag it respects my choice.... Doesn't make any sense. It respects the flags for audio but not for subtitles ?
I know, nagging is annoying, but: Any news on #8865 ? It's really ugly to cycle through various subtitles to avoid missing forced ones.
Forced Flag not working on windows 10. This should be high priority.
Version is mpv-x86_64-v3-20230402-git-0f13c38
Hello everyone, take a look at this LUA script! I hope it will be helpful: https://github.com/pzim-devdata/mpv-scripts ;-)
Hello everyone, take a look at this LUA script! I hope it will be helpful: https://github.com/pzim-devdata/mpv-scripts ;-)
We want the opposite of that. We want to used forced subtitles, not exclude them.
You just need to modify this LUA script on line #4:
if sub.type == "sub" and not sub.forced and (sub.title == nil or not sub.title:find("SDH")) then
to:
if sub.type == "sub" and (sub.forced or (sub.title ~= nil and sub.title:find("SDH"))) then
I have added SDH to FORCED
You can also modify the script to play a specific langage. For example, if you want the script to play English subtitles and include the FORCED and SDH ones, you can make the following modification to line #4:
if sub.type == "sub" and not sub.forced and (sub.title == nil or not sub.title:find("SDH")) then
Replace it with:
if sub.type == "sub" and sub.lang:find("en") and (sub.forced or (sub.title ~= nil and sub.title:find("SDH"))) then
By adding the additional condition sub.lang:find("en"), you are checking if the subtitle language matches "en" (for English). This modification ensures that only English subtitles which are FORCED or contain "SDH" in their title will be selected.
Fixed with #12100. Note that forced subtitles will only be selected if the audio language matches the subtitle language. If you always want to select the forced track regardless of the language, you can use --subs-fallback-forced=always
.
Sidenote: OP's example is also tagged as default so it would get selected by default anyways.