[mythtv-users] how to tell if 5.1 audio channels mapped correctly?

Jean-Yves Avenard jyavenard at gmail.com
Fri Nov 5 02:40:11 UTC 2010


Hi

On 5 November 2010 12:05, Dan Christensen <jdc at uwo.ca> wrote:
>
> Is it reasonable that a strange encoding would cause the channel mapping
> to be wrong with one program and correct with another?
>
> Hmm, some googling shows that mplayer has had trouble with this kind of
> thing in the past, in a way that is dependent on the audio codec used.
> This is in part because different codecs use different channel
> orderings, but also because mplayer sometimes uses a library like ffmpeg
> which also has different conventions.  So maybe I'm just up against some
> bugs in mplayer?  But I found problems with vlc and xine too, so that
> makes this explanation hard to believe.

A great deal of time was spent getting the channel ordering right in
mythtv. Especially as ffmpeg has changed a few times the channel
ordering that is being returned.

It used to return the channel order per codec.
That is if DTS had a channel order of L,R,C,LR,RR,LFE this is what it
would return ; up to the applications to re-order the channel then.

Now, ffmpeg almost universally returns a SMPTE ordering which is the
same as what used by Dolby encoding.

SMPTE ordering is well defined, and from there we convert SMPTE to
alsa ordering if using PCM audio, or re-encode as required (AC3,
etc..)

Now, the difference you may hear may come on how you are transmitting
the audio ; are you using digital passthrough or not ?

If you do, there could be a difference between the AAC and DTS track ;
as AAC would have to be first decoded then sent as LPCM with channel
reordering occurring in the process.

>
>> I have some test clip there you can try:
>> http://www.avenard.org/files/media/videotest/audiotest/
>
> This one
>
>  idch_AviaSurroundTest-AAC.mkv
>
> and the DTS version, both play fine with mythtv, but mplayer and xine
> get them both wrong.

They probably do not re-order the channels from SMPTE back to ALSA order.
If you were to play the DTS sample using passthrough instead ; how do
you hear the channels with mplayer ?
Does it sound like in mythtv ?

If that's the case, at least it shows that myth is actually doing the
right thing, it's the others that are wrong.


>
> I should have mentioned in my initial post that to try to make the hdmi
> output the default for all applications, I created /etc/asound.conf
> which contains
>
>  pcm.!default {
>  type hw
>  card 0
>  device 3
>  }
>
> That didn't actually make mplayer produce sound, so I have the following
> in mplayer.conf:
>
> ao=alsa:device=hdmi
> channels=6
>
> Do these settings look reasonable?

It does, but there you will play LPCM audio ; if you want passthrough,
you'll need something like:

>
> I thought so.  I bought it because of your recommendation regarding
> VDPAU...

It's a great board, and cheap.
Mine does lock up from time to time, usually it's the nvidia drivers ;
not sure if it's the driver or the hardware . Been doing that for
ages.

>  A common issue with some ICH5 chips is that the Center and LFE
>  channels are swapped with rear channels. To fix this, you'll have to
>  edit a section of /etc/alsa/cards/ICH4.conf to make it like
>  /etc/alsa/cards/ICH.conf.

This board doesn't use a ICH5 ; it's a nvidia 9400M chipset (same as
used in ion platform)

>
> He's probably referring to this part of ICH.conf:
>
>                ttable.0.0 1
>                ttable.1.1 1
>                ttable.2.4 1
>                ttable.3.5 1
>                ttable.4.2 1
>                ttable.5.3 1
>
> Just out of curiosity, are you using hdmi for audio output?  Do you
> think that could be a factor?  (And have you found a way to make the
> audio work when the dpms screen saver kicks in?)
>

I am using hdmi ; however I am using digital passthrough as my
amplifier doesn't support multichannels LPCM : only AC3 or DTS. When
sending LPCM audio, all I hear is the left and right channels :(

JY


More information about the mythtv-users mailing list