[MPlayer-users] Getting the best sound from mplayer

Grant emailgrant at gmail.com
Tue Jul 19 02:52:03 CEST 2011


>> Blu-Ray rips in mplayer.  I've tried:
>>
>> mplayer -ao alsa:device=hw=0.0 -format s24le video.mkv
>
> There is no real need to use hw devices at all. If you are trying to do
> that only to pursue clean audio, you are doing something wrong.
>
> default device should work just as well, providing that you have dmix
> turned off. At very least, plughw device should work at least as good.
> If you want to ensure max resolution and audio quality, I suggest you to
> use pulseaudio. In mplayer, -ao pulse will always do ouput at stream
> resolution and with floatle samples, which is best it's possible to get,
> quality-wise, and at pulseaudio you can set up once and for all to
> output at max sample size and highest resolution that your card support,
> with some high quality resampler.

Ideally, I'd like to avoid any resampling, even with
libsamplerate_best, and any digital alteration of the audio signal
whatsoever.

>> but the result sounds like it's been altered by dmix or a software
>> volume control or another digital alterer.  I think the problem
>> doesn't exist with DVD rips.  Does anyone know why this is happening?
>
> You should explain in more detail what you are talking about. Also, does
> the problem persist with plughw? With pulse?
>
>> I'm also curious about the downmix from 6-channel audio in a Blu-Ray
>> rip for my 2-channel USB DAC.  Does that take place in mplayer or
>> elsewhere?
>
> In mplayer. This is probably where you lose most quality, anyway. If you
> are forced to listen to multichannel signal on stereo system, the
> default resampler might not be what you desire. Mplayer supports
> downmixing for headphones (use -channels 6 -af volume=-5,hrtf. If you
> hear cracking of sound at loud scenes, use bigger volume reduction, like
> volume=-10,hrtf) and you can emulate various multichannel-to-stereo
> conversion formulas, like
> -af pan=2:0.4:0:0:0.4:0.2:0:0:0.2:0.3:0.3:0.1:0.1
> or
> -af pan=2:0.4:0:0:0.4:0.2:0:0:0.2:0.2:0.2:0.2:0.2
> or some others.
>
> If you desire better quality and can't use multichannel for some reason,
> probably your only hope is multichannel receiver which will accept all 6
> channels from mplayer (unlike current stereo DAC) and convert them to
> stereo, emulating some kind of room and such. These things can be pretty
> configurable and can give pleasant results. This affect sound in movies
> much more than making sure you are using 32-bit samples and such; all
> talk about "purest audio" is kind of meaningless if you have to convert
> multichannel to stereo, that's where you lose most of information
> anyway.
> (note that you will need HDMI complaint receiver and sound card to get
> multichannel audio from blu-ray on the PC properly)

I think you're right that the sound is being messed up by the codec's
downmix.  I just tried -channels 6 -af
pan=2:.8:0:0:.8:.4:0:0:.4:.6:.6:.2:.2 and the results are great.  I
wish I could have ALSA do that automatically for the playback of all
audio with more than 2 channels.

Am I better of using -channels 8 and the appropriate pan config in
case what I play has 7.1 channels?  Would a config like that work for
5.1 and 7.1?

Can I have libsamplerate_best used for the downmix resampling?

If I specify -channels 6 but no pan, a lot of the sound is missing.
Is that the equivalent of sending only the front left and right
channels to my 2-channel DAC?

Isn't Blu-Ray audio always, usually, or at least sometimes 24/96?
mplayer always lists 16/48 and the LEDs on my DAC agree.  Is mplayer
resampling to 16/48?

- Grant


More information about the MPlayer-users mailing list