Req Change automatic subtitle track selection behavior
#1
Question 
Hi,

Let's say you have your Bluray rip with multiple audio and subtitles tracks. You're always watching movies in their original language. So if you have a Japanese movie with Japanese and English audio, thanks to the option "Original stream language", Kodi will auto-select the Japanese audio track, which is pretty neat.

However, on the subtitle side of things, yes, Kodi will select English subtitles, but it will select the forced subtitle track rather than the full one! Meaning that obviously... You won't understand anything unless you go pick the full subtitle yourself in the settings.

It makes sense that it defaults to the forced track if you play the very same movie in English as it's what forced subtitle tracks are intended for (on screen text translation, other languages that may be in the movie...) but while playing with the original stream language, it doesn't make any sense!

Unless of course your Kodi is set in English, the movie original language you're watching is English, then obviously you're fluent in English and therefore, you rather have forced subtitle over the full ones.

So here is my "request"... Can Kodi consider the language it's running on and the original movie language in order to pick properly the subtitle track (Forced vs Full)?

In my case, my Kodi is set to French. When I watch an English movie, Kodi auto select the English audio track but due to its current behavior, it picks the French Forced subtitle track rather than the Full one, that is exactly what I'd like to change!

When I watch a French movie however, it'll be dumb to auto-pick the Full French track as it's my mother tongue, then I would like it to pick the French Forced track instead (which implies that Kodi consider the language I'm running it while selecting the subtitle track)

Does that make any sense to you guys?

EDIT:
Maybe this can be achieved through an add-on of some sort rather than modifying a core feature of Kodi? I'll be happy to have a look at it if that's even possible (I rather be able to do this on Kodi 18 than wait for the upcoming release), even if I have absolutely no knowledge about add-on coding (tips are welcome in that regard)

Cheers!
Reply
#2
Do you have "Preferred Subtitle Language" as English, under Settings>Player?
Reply
#3
(2019-11-22, 12:36)LongMan Wrote: Do you have "Preferred Subtitle Language" as English, under Settings>Player?

In Settings/Player/Language I've set "Prefered audio language" to "Original language" and "Prefered subtitle language" to "French" (I've only used English for an exemple)... the issue is that while it autoselect the right audio track, it solely pick the Forced subtitle track rather than the full one (which is annoying when I watch English/Japanese or whatever else movie language in it's native language).

EDIT:
Maybe it's possible to overcome this issue through an add-on that would do it, leaving Settings/Player/Language settings to Predifined audio and None for subtitles. Then with some skin/contextual mod to the play action, the add-on would kick in and select the audio track (thus there's no issues on that side so that could remain in its original settings) and selecting the full subtitle accordingly (unless original language is Kodi language)
Reply
#4
Is the problem that it is not selecting your preferred subtitle language as you chose in Player/Settings/Player? Or that is some instances you want a different language to be chosen?

Maybe explain using actual settings, file attributes and the actual outcome.
Reply
#5
(2019-11-22, 16:41)LongMan Wrote: Is the problem that it is not selecting your preferred subtitle language as you chose in Player/Settings/Player? Or that is some instances you want a different language to be chosen?

Maybe explain using actual settings, file attributes and the actual outcome.

So all my bluray rips have multiple audio tracks and multiple subtitles tracks (in an mkv container), here comes an example:

Track 1: Video
Track 2: English audio
Track 3: French audio
Track 4: English subtitles (full)
Track 5: English subtitles (forced)
Track 6: French subtitles (full)
Track 7: French subtitles (forced)

My Kodi is in French (I'm French), as I prefer watching movies with the original voices, I've set my Settings/Player/Language like this:
Preferred audio language: Original audio
Preferred subtitle language: French

And my issue is that... While Kodi successfully select the English audio track (as it's the original language), in sure picks the French subtitles, but defaults to the Forced ones, which is not relevant as I'm watching the movie with original audio, which is English!

But there's also a case where it would make sense though... If I'm watching a French movie, I'd obviously prefer that Kodi picks the Forced subtitles.
That's why it needs to be contextualized according to the user's language on top of it.

In my household I also have someone who rather watch movie dubbed in French, so for the same movie it's language settings would be as follow:
Preferred audio language: French
Preferred subtitle language: Forced

His issue would then be that, while it correctly picks a forced subtitle, as the first forced subtitle track is English, he won't have the right ones! However in it's case, that could be solved by simply selecting French as the preferred subtitle language as it would pick the forced French track over the full French track in the current behavior.
Reply
#6
What you are describing sounds like a bug. If you choose a preferred language, you should get the full subtitle not the forced one. Remember, it also has a setting for Forced Only (which is what you say is happening), and Use Interface Language.

My understanding is that forced is always shown, the setting is for what is or is not shown additionally. Someone can correct me if I am wrong. If audio is Original Language and Subtilte is French. You should be getting English audio with full French Subtitles.
Reply
#7
I did some quick test muxing together Big Buck Bunny with dummy audio and subtitle tracks with MKVToolNix (GUI)... And I figured it out!

It appears the track order in the MKV files matters a lot, to verify that I made several itterations just like that:

Caution! For all of them, in order to work properly, you HAVE to set the video track language in MKVToolNix (GUI), or else it might not work properly! If the movie is from USA, video track language has to be English, if it's from Japan, video track has to be set to Japanese...

Version 1 - Not working properly (Forced subtitles prior to Full subtitles)
Track 1: Video | Language : English (eng) | "Default track" flag : Yes | "Forced track" flag : No
Track 2: Audio (eng) | Language : English (eng)| "Default track" flag : Yes | "Forced track" flag : No
Track 3: Audio (fre) | Language : French (fre)| "Default track" flag : Determine automatically | "Forced track" flag : No
Track 4: Forced Subtitles (eng) | Language : English (eng)| "Default track" flag : Determine automatically | "Forced track" flag : Yes
Track 5: Full Subtitles (eng) | Language : English (eng)| "Default track" flag : Determine automatically | "Forced track" flag : No
Track 6: Forced Subtitles (fre) | Language : French (fre)| "Default track" flag : Determine automatically | "Forced track" flag : Yes
Track 7: Subtitles (fre) full | Language : French (fre)| "Default track" flag : Determine automatically | "Forced track" flag : No


In this scenario, setting "Prefered audio language" to "Original language" and "Prefered subtitle language" to "French" will pick up the right English audio track, but it will pick up the Forced French track, which is not right.
However, setting "Prefered audio language" to "French" and "Prefered subtitle language" to "Forced" will pick the French forced subtitles even if the English forced track is first, which is nice.

Version 2 - Working for a single language (50%, Forced subtitles prior to Full subtitles, with one of the "Full" subtitles set to Default track)
Track 1: Video
Track 2: Audio (eng) -> Default track
Track 3: Audio (fre) -> Determine automatically
Track 4: Subtitles (eng) -> Forced track
Track 5: Subtitles (eng) full -> Determine automatically
Track 6: Subtitles (fre) -> Forced track
Track 7: Subtitles (fre) full -> Default track


In this scenario, setting "Prefered audio language" to "Original language" and "Prefered subtitle language" to "French" will pick up the right tracks (including Full French subtitles),  but if the very same file is handed to an English person, the same issue that happened to French in the first version will occur (as you can't set two "Default" subtitles track).
However, setting "Prefered audio language" to "French" and "Prefered subtitle language" to "Forced" still work as intended.

Version 3 - Fully working (Full subtitle tracks are to be positionned BEFORE the Forced track)
Track 1: Video
Track 2: Audio (eng) -> Default track
Track 3: Audio (fre) -> Determine automatically
Track 4: Subtitles (eng) full -> Determine automatically
Track 5: Subtitles (eng) -> Forced track
Track 6: Subtitles (fre) full -> Determine automatically
Track 7: Subtitles (fre) -> Forced track



In this scenario, setting "Prefered audio language" to "Original language" and "Prefered subtitle language" to "French" will pick up the right tracks (including Full French subtitles), and it also works setting "Prefered subtitle language" to "English"!
Also, setting "Prefered audio language" to "French" and "Prefered subtitle language" to "Forced" still work as intended, same with "Prefered audio language" to "English" and "Prefered subtitle language" to "Forced"!
Oddly though, if you set the French Full track to Default, setting "Prefered audio language" to "French" and "Prefered subtitle language" to "Forced" will pick up the full subtitle instead of the Forced one, Kodi detects the "Default track" flag as "Forced track", so it's important to let the Full subtitles tracks to "Determine automatically"...

The fully working solution is the one as described in Version 3!
In order to have Kodi detect and behave properly with multiple audio/subtitle tracks language, you have to set the Full/Complete tracks before the Forced tracks in your MKV files, and also set the full subtitles to "Determine automatically" rather than "Default track" as it will cause errors.


Guess I have to do that with my entire library now!

@LongMan , as it turns out, that's not a bug, but Kodi seems to be very sensitive to tracks order and theirs flag, the only thing I may consider as a bug now, is that when the said track is set to "Default track" within MKVToolNix, Kodi reads it as "Forced", which is odd. Other than that, set the tracks exactly as I did with Version 3 works perfectly! Thanks for you insights Wink Maybe this could be added to some wiki page even though it's a pretty "niche" feature! Unless the said wiki page already exists (haven't found it though)
Reply
#8
Smart move to test it.

I think that Kodi picks up the default track for the language if there is one. Maybe the Forced track is labelled as default. Maybe you could test with the Full track labelled as default for each language and see if that supersedes order.
Reply
#9
(2019-11-23, 19:41)LongMan Wrote: Smart move to test it.

I think that Kodi picks up the default track for the language if there is one. Maybe the Forced track is labelled as default. Maybe you could test with the Full track labelled as default for each language and see if that supersedes order.

As it turns out, you can only set one default track (which makes sense actually) so you can't set English and French as default alltogether. I've done some more testing though, as it turns out... Kodi seems to also rely on the language tag of the video file itself, so if the video track is set to "Undetermined" the "Original stream language" and subtitle settings from player options won't work properly. That being said, you can then very well set all "Default track" flag to "No" in MKVToolnix and still have it working propely. It's still preferable to pick a default track though, for other players (VLC and so on).

I edited the previous post with absolutely all settings as it's where the magic happens
Reply

Logout Mark Read Team Forum Stats Members Help
Change automatic subtitle track selection behavior0