[MPlayer-users] Bug: Poor quality decoding of ac3 audio

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Thu Mar 3 02:07:56 CET 2011


Hi Rashkae!

 On 2011.03.02 at 19:36:32 -0500, Rashkae wrote next:

> On 11-03-02 02:07 PM, Vladimir Mosgalin wrote:
> >
> >I didn't check this sample, but some ac3 streams which have too loud
> >sounds can get cracking and other artifacts when downmixing due to some
> >overflows, the solution is to use
> >-channels 6 -af volume=-10,pan=.. (downmixing string)
> >or -channels 6 -af volume=-10,hrtf if you are downmixing for headphones.
> >
> Downmixing with pan does indeed allow mplayer to play/decode the
> audio without glitches.  I don't even have to reduce the volume,
> using the 'basic' formula of pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1 in
> the documentation.
> 
> However, I still think there is a flaw in mplayer somewhere,
> somehow.  It is my understanding that mplayer with default options
> should be using liba52 to downmix the  ac3 stream, exactly the same
> as a52dec does.. but I'm getting very different results between the
> two programs.  As for whether the liba52 on my system (0.7.4) is
> newer or older code than what Mplayer svn is using..I don't
> understand the Mplayer internals nearly well enough to tell.

Did you check result of
a52dec -o wav -r
and
a52dec -o wavdolby -r
?

As for mplayer, it most likely doesn't use liba52 at all. By default it
uses ffmpeg, for liba52 use -afm liba52
Note that default downmixing mode of mplayer -afm liba52 is to use dolby
prologic downmix, just like a52dec -o wavdolby, which uhh provides bad
results for regular 6-channel ac3, the effect kinda is like putting
rear left & rear right together and positioning them right behind the
listener. This decoding mode will also be quiter (check out
"a52dec -o peak" vs "a52dec -o peakdolby" output, and "mplayer -afm
liba52 -af volume" vs "mplayer -af volume"). Dolby mode is simply
incorrect way of downmixing typical 6-channel ac3, that's why mplayer
-afm liba52 downmixing provides bad results. ffmpeg ac3 downmixing works
fine. Of course, if you downmix with pan filter, it won't matter which
ac3 decoder was used, both give same result, they only downmix
differently.


Check out this sample to hear differences between various ways of
downmixing yourself:
http://hotfile.com/dl/108402874/9e66907/6channel.ac3.html

-- 

Vladimir


More information about the MPlayer-users mailing list