How should forced subtitles work?

Hello,

I have a problem with forced subtitles and I don’t know how to solve that.
In the settings of the player I set audio language to french, for subtitles I chose only forced subtitles to get the subtitles when they speak a foreign language different than the audio track I’m listening or to translate some foreign texts on the screen. This subtitle track is tagged as “forced” and language is french in my mkv files.

The forced subtitles show correctly when I have a french audio track, but if I have video without french audio track, the forced subtitles don’t show even if they are tagged with “forced”.

Sometimes I have only english audio with forced subtitles in french to understand. How can I always get the forced subtitles ? whether the video is with or without the audio prefered track.

If I set to another option in the settings I always have the subtitles even if they are not forced.

Forced means to display a translation for just the parts that are not matching the main audio language in videos that contain more than one language. At least this is how I understand it. I don’t think a language specific forced is a thing. If your using an external set you could just lie about the language (ie movie.eng.forced.ext) or just name it like a regular sub and let it pick it automatic from that (ie movie.fr.default.ext).

Yes I agree but they appear only if the correspoding audio track exist. The subtitles are internal in MKV files and are tagged as “forced” so it means for me that they should appear even if I don’t have an audio track for this subtitle.

I see them and can enable them manually but I’m not suppose to do this.
I can’t “lie” because sometimes it also exists english forced subs in the video, each language has its own regular and forced subtitles but sometimes the audio language corresponding doesn’t exist.

So I don’t know what I have to change in the settings to make work this subtitles in OSMC ?

I don’t think there is any way to change a setting in Kodi that would make this work the way you want. What it is doing is correct for what forced subs are suppose to be even if someone has a video file that has extra forced tracks. You can use mkvtoolnix to remux changing what subs are default and forced. You could also use something like mkvextract or “subtitle edit” to extract the subs from a mkv. I believe Kodi will favor external subs over internal if both exist (although I’m not positive on this).

Another option may be to make switching subs a bit quicker by having a button on your remote to quickly and easily switch them with a keymap.

Thanks for your help I don’t know how to solve that except that I have to check manually on each movie.
I checked and the selection of the forced subtitles track (if there are several) are changing automatically when I change the audio track to the corresponding forced subs.

If I have italian, english and korean forced subtitles for a korean movie with only korean audio it forces the user to check if the corresponding forced track exists because only the forced subtitles for korean will be enabled even if I choose english as prefered language.
Or the only solution is to add several times the same audio track tagged with different language, it that case the subtitle will be enabled correctly, the same korean audio will be named “english”, “italian” and “korean”. I’ll check that.

I used the notes on the official matroska website to tag correctly all my subtitles, there is no other way to correctly change the tagging for what I understand (Specification Notes section “subtitle selection”).

Are you sure the source file is well done?
The “forced” means subtitles only showing when foreign language is spoken indeed but it’s mostly a regular file with less content. No direct link with the audio played, just subtitles at the correct timing.
I use to watch in your describe conditions and can change the audio w/o impact on the forced subtitles rendering. It all depends about how files are made maybe.

Yes I’m sure because I created the MKV files myself. For example I have a movie trailer in english but I also have several translation of this one in different languages, the purpose is the italian user can play the file directly with the italian subs, the spanish one directly with the spanish subs because the trailer is only speaking english. But I’ll will check this idea of adding the same audio tracks in every language I have the subtitles, the file will be bigger but I think it’s the only solution.

I already had problem in the past with “original language” tag that doesn’t work correctly (kodi problem for several years) and I had to place first in the order the prefered track.

I think I may not have done a great job of explaining myself so let me try again. There should only be one forced sub for any audio track that is uses more than one language. So if you have a video file that has French and Italian dialog then you might need to have the same audio track duplicated so you can have a forced sub for each in their respective languages automatically work, but “forced” isn’t really intended to be used as a generic way to enable subs. If you have an English audio track and you want subs in other languages then they should just be non-forced subs tagged with the correct language codes. It is then incumbent on the player to show what is expected. In your example the video and audio track should be set to English and default and the Italian and Spanish subs should be set just with their respective language codes and nothing else. If the person who is playing it is a Spanish only speaker who has their player sets up correctly plays it then that player knows to prefer Spanish subs over another language and display when the audio track is not in Spanish. The person mastering a file should not be trying to artificially manipulate the players behavior.

My earlier suggestions on manipulating the file where based around the assumption that you had files of your own that you just wanted to have different sub behavior by default. When your dealing with only your own files then it doesn’t really matter if they are using standardized behavior.

No problem I maybe misunderstood what you said :slight_smile:

Yes sure, it’s what I want to avoid, I try to have standardized files that should play everywhere, but as I don’t understand exactly how the settings should be to play correctly because each player has its own definiton of “forced”, “original”, etc. it’s hard to set up.

It’s what I expect but it doesn’t work.
There are 3 options in the settings : none, forced or a specific language (spanish here)

  • none : no subtitle displayed in any case
  • spanish : default subtitle is displayed whether the video has spanish audio or not (if the video is only english audio it works, in other video with spanish audio I have to disable it each time)
  • forced : it displays only the forced subtitles of the corresponding audio. Here the forced spanish subtitles are only displayed if the spanish audio exists (and it’s what I didn’t know until this topic).
    When I switch the audio to english while playing the video OSMC switches also automatically to the forced english subs.

So yes like you said I think I have to duplicate the english audio to spanish audio in my video and keep the settings on “forced” in OSMC, it’s the only solution I see.

Thanks for your time.

In Kodi’s language settings you are setting up which Subtitles it should use if they are on. During playback there is the option to turn the subs on or off with forced being an outlier as it is intended to show even if subs are not displayed by default. In the settings that are available during playback you can choose to set subs to enabled by default. Testing of this may be complicated as I think Kodi tries to remember if the subs were enabled on subsequent playbacks.

I don’t think there is actually any ambiguity on what the various subtitle settings mean. Forced may seem confusing because of the name but its only real definition is to display foreign language dialog in isolation for a soundtrack that that utilizes more than one language. If a soundtrack only contains one language then it should not have a subtitle with a forced flag on it. The default flag sets which is the preferred subtitle when more than exists. For example you may have a film with both standard and SDH subs and the standard one would get a default flag. I think SDH is self explanatory on if that flag should be there or not. For Kodi it will display name tags in a mkv so if you have something like subs for a commentary track it is probably best to use those so people don’t have to try to figure out what is what. Otherwise name tags are not really needed as Kodi will already display language and if it is SDH. If using external subs Kodi only recognizes language, default, and forced from the file name. If you wanted to add something similar to a name tag you can with a file name and Kodi will display it, even though it will not take any other action from it being there and you would just add that something like movie.eng.description.srt.

Small update. I decided to just do a couple quick tests (using Kodi v20 on a PC in case that is relevant) and I couldn’t actually reproduce the behavior you described. With a video with one audio track set to en and two subs, one set to en and one set to es and both of those set to forced. Kodi forced displayed whichever one I currently had my preferred subtitle set to (English or Spanish). I could go back and forth and it tracked every time UNTIL I manually selected a sub and then Kodi remembered that selection and would no longer automatically switch. In order to go back to auto I needed to rename the file.

I suppose you could also play with setting the language to multi language or no linguistic content in the mkv tag and see what that gets you if you are curious. Personally I’ve no clue how Kodi interacts (or doesn’t interact?) with those.

It’s because you selected a language for the subtitles in the settings (my case #2 above), means that it will always select a subtitle if the language exists, default sub first and then forced if default doesn’t exist. It works in this case but in all other videos I will have the default spanish subtitles even I don’t want it. The only good settings is forced in kodi but I have to duplicate audio.

In my mind, I though I have to set the prefered audio language to spanish and the subtitles to forced to get by default the good audio and subtitles. If i want to manually switch the language during the playback, so I should also switch manually the subtitles. The purpose was to start the video directly with all the good settings.
If I set kodi to spanish audio and forced subs in the settings, if I watch a video, kodi should select the spanish audio and the forced spanish subtitles, if the spanish audio doesn’t exist it should take another audio without disabling the forced subtitles, but in this case it will switch to english audio and the corresponding forced sub, the english one.

For me if the english video has parts of korean, the forced english subs has korean translated. If I am a spanish viewer, the english and korean are both foreign languages, so it’s why I set the default spanish sub to forced and why I misunderstood how it works. I will duplicate the audio for each language with forced subtitles but I’m wasting space a little bit in my videos. I can have 3 times the same audio track with different names to make working the forced subs to avoid manually selecting them.

After a bit more playing around I think I finally got to an understanding of what your issue is. The problem, specifically, is that Kodi correctly chooses audio and subtitle languages, but, with the one exception being that if a forced subtitle exists tagged as the same language as the playing audio track then that is chosen over a subtitle that exists that matches the language set for preferred subtitle language.

So a file like the following, for example…
en - audio
en - subtitle forced
en - subtitle
es - subtitle

with Kodi set to prefer Spanish audio and subtitles, will by default, get English forced subs instead of the Spanish ones.

There is no combination of settings in Kodi to overcome this so I would think this is a bug. Fortunately, this seems to have been fixed in Kodi v20. That is what I was originally testing with and couldn’t find the problem. When I switched over to Kodi v19 then I managed to reproduce.

As a stopgap for your own files I would think the most sensible approach may be to just not include any forced flags at all. If they don’t exist the auto selection for audio and subs appear to work as expected in my testing.

I’m glad to hear that it will be fixed in v20, I’ll do that while waiting for the next version.
Thanks for your help.

Hello !
in the mean time you can also try this addon (version 1.0.0 is the most recent one).
A simple rule like French:None + forced tag should meet your need.

Note : for now the install is manual, but the addon is candidate for official integration in Kodi Repository from Nexus/V20.

[Release] Language Preference Manager (kodi.tv)

2 Likes