Page 1 of 1

AC3 2.0 stereo, but surround on pass-through

Posted: 10 May 2012 21:38
by remenic
I'm trying to understand some behavior I have been seeing with a number of videos containing AC3 audio. When looking at the Codec Information window, the AC3 audio is often (but not always, depending on the video) recognized as 2.0 stereo audio. When I use SPDIF pass-through, the decoder (Logitech z-5450) clearly separates the channels into what seems to be real 5.1. I hear the voices coming from the center speaker, and the rear speakers make distinguished sounds as well. But when I have a 5.1 speaker system connected via 3 stereo jack cables, I get the typical stereo sound (voices come mainly from left&right as opposed from center). Videos where audio is properly recognized by VLC as 5.1 play fine when I connect my audio system with 3 RCA cables.

This in itself isn't a 'problem' since I can just use SPDIF, but I wonder why VLC recognizes the audio as 2.0 stereo only, when my hardware decoder manages to produce 5.1 from the same audio stream.

It appears to be common across libavcodec players (MPlayer and VLC are the two I tried).

Re: AC3 2.0 stereo, but surround on pass-through

Posted: 10 May 2012 21:46
by Rémi Denis-Courmont
VLC does not normally use libavcodec to decode AC3.

Most probably VLC or ALSA or PulseAudio is configured for stereo output.

Re: AC3 2.0 stereo, but surround on pass-through

Posted: 10 May 2012 22:34
by remenic
VLC does not normally use libavcodec to decode AC3.

Most probably VLC or ALSA or PulseAudio is configured for stereo output.
Okay I wasn't aware that VLC uses something else to decocde AC3. I had already configured VLC to use 6 channels for ALSA (Tools -> Preferences -> All -> Audio -> Output modules -> ALSA), hence why (and I hate to repeat myself,) it works fine on video's where the audio is detected as 6 channels (as seen in the Codecs Information window).

I should add that when using PulseAudio I also get proper 5.1 sound with most video's. Except for the ones where audio is reported as 2.0 stereo. Which would make sense, if I didn't get 5.1 audio from this apparently 2.0 source, when using pass-through. So is my decoder performing some kind of post-process to turn 2.0 into 5.1, or does VLC incorrectly treat it as 2.0?

Re: AC3 2.0 stereo, but surround on pass-through

Posted: 11 May 2012 09:37
by Rémi Denis-Courmont
Maybe it's AC3 Dolby Stereo then.

Re: AC3 2.0 stereo, but surround on pass-through

Posted: 11 May 2012 11:15
by remenic
Too bad, would have been great if VLC decoded AC3 the same way my Logitech Z-5450 does.