Req External Forced Subtitles
#1
Hi,


For forced subtitles (non English/foreign parts) contained in a mkv there is a "forced flag" that can be set and XBMC will override the subtitle settings and show them. For video files that may not have the forced subtitles or have them but dont have the "forced flag" set requires remuxing/editing the header of the file.

I think there should be away to include an external subtitle file and somehow tell XBMC that it is a forced subtitle.

For example,

The Matrix.mkv
The Matrix.English.FORCED.srt

Will behave the same as a subtitle with the forced flag within the mkv.
Reply
#2
This was added some months ago and is available in the gotham nightlies.
Reply
#3
(2014-01-31, 09:29)ace20022 Wrote: This was added some months ago and is available in the gotham nightlies.

Awesome. Do you know of any reference about this feature? I cant find information about it in the wiki.
Reply
#4
It's somewhere in here
https://github.com/xbmc/xbmc/compare/Frodo...master

We don't keep track of every single change on a wiki page
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
(2014-01-31, 09:53)Martijn Wrote: It's somewhere in here
https://github.com/xbmc/xbmc/compare/Frodo...master

We don't keep track of every single change on a wiki page

Well it is a new feature. Just wondering if there was information on how to use it, without having to looking through source code.
Reply
#6
Not yet, but it works like you suggested. The filename has to start with the video's filename followed by a permutation of <language>.<flag>*.<name>.extension
Reply
#7
(2014-01-31, 09:53)Martijn Wrote: It's somewhere in here
https://github.com/xbmc/xbmc/compare/Frodo...master

We don't keep track of every single change on a wiki page

(2014-01-31, 10:45)ace20022 Wrote: Not yet, but it works like you suggested. The filename has to start with the video's filename followed by a permutation of <language>.<flag>*.<name>.extension

Here is a good chance for the OP t take part and contribute to wiki Wink we dont and some things need updating anyway Big Grin
Reply
#8
Yeah well you'd probably need SOME documentation before being able to write a wiki page.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
If that's what you waiting for, then the wiki would be mostly empty. The information can be gleamed from here from both what already exists and what the user has noticed. Big Grin <- That would be a good place to startSmile
Reply
#10
I'm trying to get this working properly (and once I do so, would be more than happy to write up something for the wiki), but it still doesn't seem to be acting appropriately. Any suggestions would be welcomed.

Video filename: Jack Ryan Shadow Recruit (2014) [1080p].mp4
Standard subtitle: Jack Ryan Shadow Recruit (2014) [1080p].English.srt
Forced subtitle: Jack Ryan Shadow Recruit (2014) [1080p].English.Forced.srt
I'm running XBMC 13.1, Skin: Aeon Nox

Behaviour: When turning on the movie, it plays with the last subtitle used. I can switch between the two subtitles (but there is no way to identify which one is the forced file - it merely says "English - (External) (1/2)." I'm not sure if there is any way to actually identify which is which from the settings menu). When I go into the settings and turn subtitles off, it turns everything off - neither the forced subs nor the standard subs play.

I'm assuming something in the filename for the sub is wrong, but am not quite sure what that would be. Thoughts?
Reply
#11
as far as i can see in https://github.com/xbmc/xbmc/blob/master....cpp#L2127 and further down it works as follows:

moviefilename[.2letterlanguagecode]|[.[/i]flag[/i]].ext

- moviefilename is required and should be exactly the same as the movie's filename
- 2letterlanguagecode is optional and should be a valid lowercase 2-letter language code from ISO639 (see https://github.com/xbmc/xbmc/blob/master...r.cpp#L500) You can only add one language, the second one will be ignored.
- flag is optional and can be either upper or lower or mixed case. Valid are the following words: none ,default or forced. TYou can have several flags I think.
- ext is required and should be a valid subtitle extension (like srt)

The following separators are allowed: "." (dot), " " (space), and "-" (dash)

If you enable debug logging you should see the detection of the external subtitle happening upon playback.

Examples that should work with avatar.avi :

avatar.en.forced.srt
avatar.srt
avatar.de.default.srt
avatar.default.forced.srt
avatar.cc.srt

I am not sure if any of the above samples make sense though and are handled further down in the code. Someone with more knowledge should look at that.
Reply
#12
Kib,
Thanks for the response. I've been able to glean some further insight based on your post, but am still having some issues.
First:
In looking at the debug logs apparently XBMC is able to recognize both "english" and "en" when identifying the subtitle language. Just in case, I switched the filename to 'en' while testing. (I'll make a note of this when putting together the wiki).

Second:
If I have only one subtitle file in the movie folder and it is marked as 'forced' then it will turn the subs on when I start the video. If I manually turn them off while the video is playing, they stay off until the video is restarted. This would be the expected behavior with forced subs.
However, if I have two subtitle files in the movie folder, one is marked as forced and the other is not marked (ie, one is only the forced subs, the other is subs for everything), then nothing happens - the forced subs are not activated upon starting the video. So, it looks like there may be a bug preventing the forced flag from activating the proper subtitles if there are two subtitle files in the folder. I didn't see any errors popping up in the logs, but it does appear that it attempted to open the subtitle file (19:40:36 T:10232 NOTICE: Opening Subtitle stream: 0 source: 1024) - however, no subtitles were shown.
Reply
#13
Painful I know, but you can always turn the forced ones on.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#14
(2014-07-02, 07:01)nickr Wrote: Painful I know, but you can always turn the forced ones on.

that's assuming the person watching knows that there are supposed to be forced subtitles. before xbmc began obeying the mkv forced subtitle flag i always had to reencode my bluray rips with handbrake and burn the subtitles into the video for my parents. otherwise i'd hear about a movie they just watch and how strange it was there weren't subtitles for XYZ conversation.
Reply
#15
Yeah, that's what I had been doing previously - just kinda takes away from some of the ease-of-use.
I'm just thinking that there may be a glitch of some kind if the forced flag only works when there isn't a non-forced subtitle file present.
Reply

Logout Mark Read Team Forum Stats Members Help
External Forced Subtitles0