Frodo / Video / xvid / dual audio / always play 2nd language if any
#1
Hi all,

I have many series encoded in xvid, which have 2 audio tracks. Track 1 is (mostly) german, track 2 always english. As I only watch the series in english, I wondered if it is somehow possible to automatically play always the second audio stream - if any.
mkv is no problem as the track is marked 'english' and this works. In xvid, its just track 2/2 - and its SOOOO annoying always to switch to the second track.

Would be glad if someone has a solution - re-encode every episode is no option, though Wink

TvonT
Reply
#2
not sure if it works for xvid as I havent used xvid for years, but you could map a key to switch audio,

Add a key with some custom action to the keyboard section of keymap.xml, and refer to it.

<keymap>
<global>
<keyboard>
<k>audionextlanguage</k>
</keyboard>
</global>
</keymap>

to have your XBMC switch audio track upon pressing the "k" key, and then add a corresponding button to the remote.

Reply
#3
Thanks for the hint. I forgot to mention that I use ATV2 :/, so I don't have keys beside the ones on the remote. Is it also possible with such a simplified remote? Ie. a key-combination of some of the 7 available? Or maybe with a setting in advancedsettings.xml?
Also, if someone is willing to tell me where this setting is in the source code - I could try to alter this and compile it by my own.
Reply
#4
Frodo will let you define default audio and subtitle languages in Settings/Appearance/International (wiki).
Reply
#5
(2012-12-02, 14:07)Ned Scott Wrote: Frodo will let you define default audio and subtitle languages in Settings/Appearance/International (wiki).

Hmmm...this works for mkv and where the language has a name. In Xvid, its just audio stream 1, 2 and so on. I tried this setting but it has no influence (I cannot set default audio stream to just '2', which is what I would need).
Reply
#6
IIRC both Audio and Video streams can have language code attached including and not limited to .avi in fact opening a .avi with AVI mux GUI and pressing generate data source from files gives you pretty much the defined language code (if whoever encoded it defined a language code to begin with. If not it can be set and remuxed using one of the million tools available.

e.g.
Image

Also not all MKV have language code defined for audio or video streams either, depends on who did the encoding and certainly can be easily fixed.

Which brings up a whole different issue, if your files dont have a language code look at setting them and remuxing them or find an alternative way to solve a problem which is not in any way a XBMC limitation.

uNi
Reply
#7
Thanks, anyway. I know that I can set the language code. But for that loads of episodes - this is work where I will never find the time for. Unless there is a bulk editing tool, this is simply not feasible.
I never said that this is a limitation in XBMC, my question was: how can I set the audiostream to be '2' for default. There is a setting in the dialog where you can change the stream to '2' and also a 'save as default' - which has no effect for the audio stream even if it leads to the impression that you can set the default audio stream to '2'. At this point this is at least misleading.

TvT
Reply
#8
You can select the 2nd audio stream, but you cant set it as a default in XBMC since there is no setting for it.

What you can probably do is map a key on your remote or keyboard to do change audio streams, but I wouldn't know how to go about that at all.

I saw a thread a while back on how to map audio sync +/- to a remote button, I suppose similar could be achieved. You would have to look into this yourself.

uNi
Reply
#9
(2012-12-04, 21:59)uNiversal Wrote: You can select the 2nd audio stream, but you cant set it as a default in XBMC since there is no setting for it.

There is "set as default for all videos" at the bottom of both "video" and "audio and subtitle settings" windows. So either it's unclear as to which options this should set/remember or it's not working as it should be in this case.
Reply
#10
Not every video has a second stream in fact most dont...

What would happen then?

uNi
Reply
#11
Then it would play the available (first) stream?
Image
Reply
#12
Would it really? I dont know.

Logic is when you save a setting for all videos that means SAVED settings for all videos, then this logic would be broken just because a 2nd stream is set as default and suddenly here comes a file that doesn't have a second stream. Unless there's a fall-back of some sort that automatically takes care of this, in that case would be ok.

Maybe you can test this and lets stop assuming what would happen. It seems to me your not sure (since your replying a question with a question) and I definitely dont know.

uNi
Reply
#13
Audio streams are sorted following those criteria (highest on top)

- match selected audio stream (default / video setting stored with file)
- audio language if audio language in gui settings is not "original"
- number of audio channels in stream
- audio codec priority

So if none of the available audio streams matches the index in video settings, they just don't get sorted by this.
Reply
#14
(2012-12-05, 15:41)FernetMenta Wrote: Audio streams are sorted following those criteria (highest on top)

- match selected audio stream (default / video setting stored with file)
- audio language if audio language in gui settings is not "original"
- number of audio channels in stream
- audio codec priority

So if none of the available audio streams matches the index in video settings, they just don't get sorted by this.

Do you think you can extend the selected language just to the index numbers? This would solve the problem. Currently the player 'looks' only at the values, (ie Index entry 1: value: Original Language; Index entry 2: value: English etc.)
If one could just select the 'Index' itself - regardless what the value is there - this would do the trick. On automatic fallback / errorhandling: Currently XBMC does exactly what it should - it falls back to 'index entry 1', first audio stream - if the selected language does not exist...
Reply
#15
You can change the audio stream to a different channel using a remote such as Constellation on an iPad. I'm sure there are other ways too?
Reply

Logout Mark Read Team Forum Stats Members Help
Frodo / Video / xvid / dual audio / always play 2nd language if any0