• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 27
[Release] Language Preference Manager
#31
@ace20022

Played with it last night and was thinking how the script would act if i only need 1 conditional subtitle preference?

In my case i only want if Audio is Dutch then Subtitle is NONE

But this section of the script has 2 more options to fill but in my case i don't need those 2.

Another thing your probably already have noticed is then Subtitle is NONE, you can't give a condition that if Audio matches to not display Subs.
Maybe a idea to add such option?

Sometimes we play media files in our native language and then i don't need any subs at all but for some reason XBMC automatically picks it, i was hoping with this script i could disable it in such cases.
Reply
#32
Good point(s)! I think I will introduce a new value "none" and set all languages to it by default. In the meanwhile you could try the option "disable subs if no pref matched" while not having set a cond. sub pref for Dutch.
Please let me know if that works.
Reply
#33
Sorry for the late reply, haven't gotten the time yet to test it extensively, will try tomorrow or otherwise this weekend.
Reply
#34
No problem, I also had no time to improve it.
Reply
#35
What i always do

1) I prefer english hd-audio above normal english audio
2) If theres no hd audio and only 5.1 dd or 5.1 dts track, i prefer dts (1500 kbs)

3)For subs i always chose dutch subs

4)For Kids movies (tag added movie list)
I always prefer Dutch audio (again hd-audio above normal dts)
And no subs

can i do this all automatically with this addon?
Reply
#36
3) is possible.
I'm working on the other ones, but 1) and 2) will then only be possible with a nightly or monthly build.
Reply
#37
(2013-03-24, 20:47)ace20022 Wrote: 3) is possible.
I'm working on the other ones, but 1) and 2) will then only be possible with a nightly or monthly build.

Can you explain why please... It would rock if thats possible

4 not possible? To not use subs if dutch language selected
Reply
#38
(2013-03-24, 21:01)Skank Wrote: Can you explain why please... It would rock if thats possible

Using Frodo it's not possible to query all necessary infos--like channel count, codec--for all audio tracks.
These infos are only available for the currently selected track.

(2013-03-24, 21:01)Skank Wrote: 4 not possible?

Not sure about tags, but I'm working on a feature to specify preferences per genre.

(2013-03-24, 21:01)Skank Wrote: To not use subs if dutch language selected

Partially at the moment, you can disable subs globally and not specify a cond. subs preference for dutch audio tracks.
But I will add a "none" language, then you can set dutch => none in the cond. subs pref. page.
Reply
#39
cool
Reply
#40
Can you also add an unknown subtitle language option? I have several shows with out metadata for the tracks. Below is section of the debug log:

17:13:39 T:6116 DEBUG: [Language Preference Manager]: Getting video properties
17:13:39 T:6116 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{ "properties": ["currentaudiostream", "audiostreams", "subtitleenabled", "currentsubtitle", "subtitles" ], "playerid": 1 },"id": 1}
17:13:39 T:6116 DEBUG: JSONRPC: Calling player.getproperties
17:13:39 T:6116 ERROR: CSelectionStreams::Get - failed to get stream
17:13:39 T:6116 ERROR: Previous line repeats 8 times.
17:13:39 T:6116 DEBUG: [Language Preference Manager]: {u'jsonrpc': u'2.0', u'id': 1, u'result': {u'subtitleenabled': False, u'currentaudiostream': {u'index': 0, u'name': u'Stereo', u'language': u'', u'channels': 2, u'codec': u'aac', u'bitrate': 0}, u'currentsubtitle': {u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}, u'audiostreams': [{u'index': 0, u'name': u'Stereo', u'language': u''}], u'subtitles': [{u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}]}}
Reply
#41
Hello tevi,

can you please explain this in detail? I don't see anything meaningful in "unknown".
Reply
#42
According to Matroska specifications "unknown" should default to English.
Reply
#43
I have several anime episodes that don't have any information for languages for both the audio or subtitle track. When I open the file in VLC and look at codec information it lists the subtitle stream but does not list language or any other metainformation.

As a test of Kaffekask comment, I tested English and English conditional and it didn't enable subtitles so it might not be defaulting to english.

A look again at a fuller debug log shows that XBMC failed to get a stream a few times. Here is a fuller debug log. I added another option to langcodes and strings to see if I could get it working myself, but I had no luck.


Code:
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Getting video properties
22:57:44 T:5100   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{ "properties": ["currentaudiostream", "audiostreams", "subtitleenabled", "currentsubtitle", "subtitles" ], "playerid": 1 },"id": 1}
22:57:44 T:5100   DEBUG: JSONRPC: Calling player.getproperties
22:57:44 T:5100   ERROR: CSelectionStreams::Get - failed to get stream
22:57:44 T:5100   ERROR: Previous line repeats 8 times.
22:57:44 T:5100   DEBUG: [Language Preference Manager]: {u'jsonrpc': u'2.0', u'id': 1, u'result': {u'subtitleenabled': False, u'currentaudiostream': {u'index': 0, u'name': u'Stereo', u'language': u'', u'channels': 2, u'codec': u'aac', u'bitrate': 0}, u'currentsubtitle': {u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}, u'audiostreams': [{u'index': 0, u'name': u'Stereo', u'language': u''}], u'subtitles': [{u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}]}}
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Evaluating audio preferences
22:57:44 T:5100    INFO: [Language Preference Manager]: Audio: preference 1 (Japanese) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Audio: preference 2 (English) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Audio: preference 3 (None) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Audio: None of the preferred languages is available
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Evaluating subtitle preferences
22:57:44 T:5100    INFO: [Language Preference Manager]: Subtitle: preference 1 (English) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Subtitle: preference 2 (English) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Subtitle: preference 3 (None) not available
22:57:44 T:5100    INFO: [Language Preference Manager]: Subtitle: None of the preferred languages is available
22:57:44 T:5100    INFO: [Language Preference Manager]: Subtitle: disabling subs
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Evaluating conditional subtitle preferences
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Getting video properties
22:57:44 T:5100   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{ "properties": ["currentaudiostream", "audiostreams", "subtitleenabled", "currentsubtitle", "subtitles" ], "playerid": 1 },"id": 1}
22:57:44 T:5100   DEBUG: JSONRPC: Calling player.getproperties
[color=#FFD700][color=#FF0000][size=large]22:57:44 T:5100   ERROR: CSelectionStreams::Get - failed to get stream[/size][/color][/color]
22:57:44 T:5100   ERROR: Previous line repeats 11 times.
22:57:44 T:5100   DEBUG: [Language Preference Manager]: {u'jsonrpc': u'2.0', u'id': 1, u'result': {u'subtitleenabled': False, u'currentaudiostream': {u'index': 0, u'name': u'Stereo', u'language': u'', u'channels': 2, u'codec': u'aac', u'bitrate': 0}, u'currentsubtitle': {u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}, u'audiostreams': [{u'index': 0, u'name': u'Stereo', u'language': u''}], u'subtitles': [{u'index': 0, u'name': u'Unknown', u'language': u'Unknown'}]}}
22:57:44 T:5100    INFO: [Language Preference Manager]: Conditional subtitle: None of the preferrences is available
22:57:44 T:5100   DEBUG: [Language Preference Manager]: Subtitle: disabling subs

I'm concerned with the "ERROR: CSelectionStreams::Get - failed to get stream" line. A quick google search shows http://forum.xbmc.org/showthread.php?pid...3pid574913 says its a might be a problem with ffmpeg, granted that was two years ago.
Reply
#44
(2013-03-27, 21:29)kaffekask Wrote: According to Matroska specifications "unknown" should default to English.

No, the specification says that the default value of the language field is "eng".
But a user or more likely a program that creates the matroska file can assign an arbitrary value--with a length <= 3.
For example mkvmerge sets "und" (undetermined) by default and xbmc outputs this as "unknown".
Reply
#45
(2013-03-28, 05:36)tevi Wrote: I have several anime episodes that don't have any information for languages for both the audio or subtitle track. When I open the file in VLC and look at codec information it lists the subtitle stream but does not list language or any other metainformation.

You can check the file witg mediainfo, but I guess that there are just no languages set for the tracks.
You could either remux the mkvs with self specified languages with mkvmerge or change tracks' infos with mkvpropedit http://www.bunkus.org/videotools/mkvtool...t.examples .

(2013-03-28, 05:36)tevi Wrote: I'm concerned with the "ERROR: CSelectionStreams::Get - failed to get stream" line. A quick google search shows http://forum.xbmc.org/showthread.php?pid...3pid574913 says its a might be a problem with ffmpeg, granted that was two years ago.

I would suggest that you open a ticket http://trac.xbmc.org/ but with a full debug log attached.
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 27

Logout Mark Read Team Forum Stats Members Help
[Release] Language Preference Manager2