Prefered language not working with DualAudioMono channels (1 Viewer)

Hodor

Portal Member
September 5, 2008
36
4
Home Country
Denmark Denmark
I've setup my TV client to prefer only danish in the audio tab. But on channels with dual mono I get a mix of both languages.

As seen in the tv.log, its identified as a 'engdan' audio stream. English in left and danish in right channel.

2009-07-24 00:46:04.692000 [Record]: subch:1 cam flags:True
2009-07-24 00:46:04.693000 [Record]: subch:1 SetMpegPidMapping
2009-07-24 00:46:04.694000 [Record]: subch:1 pid:280 pcr
2009-07-24 00:46:04.695000 [Record]: subch:1 pid:285 pmt
2009-07-24 00:46:04.695000 [Record]: subch:1 pid:280 video type:MPEG-2
2009-07-24 00:46:04.696000 [Record]: subch:1 map pid:280 video type:MPEG-2
2009-07-24 00:46:04.698000 [Record]: subch:1 pid:281 audio lang:engdan type:MPEG-2
2009-07-24 00:46:04.700000 [Record]: subch:1 map pid:281 audio lang:engdan type:MPEG-2

I would expect MP only to play right mono channel. (Thats how the hardware Sagem box does it :))

With or without the dual audio feature enabled on the audio tab, its a mix of both languages that gets played. Thats basicly useless to most people ;)

My mp version is 1.0.2. I assume that my hardware setup is irelevant for this issue.
 

Hodor

Portal Member
September 5, 2008
36
4
Home Country
Denmark Denmark
I got a chance to test another dual audio channel today.

2009-07-24 16:06:27.446000 [25]: subch:0 pid:835 audio lang:daneng type:MPEG-1
2009-07-24 16:06:27.447000 [25]: subch:0 map pid:835 audio lang:daneng type:MPEG-1

This channel had to audio reversed from the above example. So danish was in the right channel and english in left.

So
lang: engdan is English<->Danish
lang: daneng is Danish<->English

Is this a general standard for dual audio channels everywhere?

I've looked into the source of MediaPortal TV Plugin and found the TvHome.cs where the preferred language seems to exsist. And the TvHome.cs is very simple with regard to language. It simply has no logic to handle dual audio, resulting in those channels being useless to most people and hurting the WAF :mad:

Its simply not good enough to ask the kids/wife to fiddle with audio settings on dual audio channels after each restart (since dual audio selection isn't persisted).
 

gibman

Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    The code is not aware of what audio channel contains what language.
    So we cant currently auto switch to left or right audio based on what we dont have.-

    However we will at some point implement the "persist dual audio mono selection" feature.

    This will fix your problem I think :)

    /gibman
     

    Hodor

    Portal Member
    September 5, 2008
    36
    4
    Home Country
    Denmark Denmark
    Persist would solve my problem since the affected channels send dual audio all the time.

    But how will persist solve playback on recorded TV shows from the dual audio channels? I expect it to record both audio channels. Also there might be some parts in the world where dual audio is only used for certain shows/movies and not always, so in those cases the persist option would be mostly useless.

    But as I tried to show with the tv.log extracts, you do have the info about what languages are in what channel.

    (LEFT) English <- engdan -> Danish (RIGHT)
    (LEFT) Danish <- daneng -> English (RIGHT)

    Its not coincidence they are named engdan and daneng. The position does tell what language is in a channel.

    I just dont have access to other networks to check if my observation is general for all dual audio using networks, or if its a Danish TDC YouSee solution only. (Above is from Jetix and Cartoon Network.)

    I was thinking about a fast fix where you simply took the audio lang string, if its 3 char match as usual, if its 6 char split into 2x3char and try lang match on those. If match first part of string to prefered then left channel played. If match second part of string play right channel. I'm guessing thats how the YouSee hardware Selector boxes work, so I expect this to be stable for the danish YouSee network at least. The ability to select left or right channel only is already in MP with the dual audio feature, so its all about making it start with a better channel default and not mixed languages.

    I noticed that most channels simply have no lang on audio (since they send only one audio stream). So theres only one choice to play :)
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    I've implemented what you have suggested.
    Enjoy the next SVN :) #23314+

    It should work the same for rec. TV as well as live TV.-

    /gibman
     

    Hodor

    Portal Member
    September 5, 2008
    36
    4
    Home Country
    Denmark Denmark
    Awesome. Thanks.

    I looked into the SVN to see how you did it, but no luck in finding it.

    After my last post, I did check further into the issue, and had found the MPAudioSwitcher. But its in C++ so I'm on very shaky grounds. But it seemed the right place to implement this language logic.
     

    Users who are viewing this thread

    Top Bottom