[MPlayer-dev-eng] [PATCH] forceable software volume control

Ed Wildgoose lists at wildgooses.com
Sun Nov 14 01:07:04 CET 2004


>>>no, not at all. 2x greater is barely any change at all. it's the same
>>>as a couple clicks on a soundsystem that goes by a decibel scale. 10x
>>>is the very minimum cap that would be acceptible. but again it should
>>>all be done in decibels since linear scales don't make sense to use
>>>for signals.
>>>      
>>>
>>This just does not work as easy as that in the digital case. Amplifying
>>2x means you need one extra bit, for 8x amplification you need 3 extra
>>bits. So without changing the format (hard to do as often both source
>>and soundcard want 16 bit), this will only work when whoever created the
>>file wasted at least 3 bits out of 16 by not adjusting the volume
>>correctly. I am not convinced that adjusting to such crap is a good
>>idea.
>>    
>>
>
>usually studios mastering dvd wasted 5-6 out of 16 bits... :(
>  
>

x2 is a 6dB increase, which is reasonably substantial actually. 

I do in fact have this very issue of having DVD's a little too quiet in 
general, and in my case I have only a passive volume control on my hifi 
(ie a variable resistor, not a pre-amp), so I have a limited volume 
adjustment range.  Also, it's annoying having my music player blaring 
because music is always mastered to clip (modern stuff), and then 
switching to the DVD's player and having it almost inaudible (DVD's tend 
to preserve a little dynamic range...)

However, having done a little bit of research most of my DVD's do in 
fact turn out to have dynamic range which uses most of the 16 bits.  
True the average sound level is quite far off maximum (although I can't 
quickly find one that's 30dB down like you suggest - 15dB is more like 
it), but the peak levels are often -3dB from max.

I used to set something like "-af volume:10", but now I realise that I 
am just clipping the loud scenes for the sake of increasing the average 
levels a little.

Personally I would be suprised if a +6 or +12dB increase wasnt actually 
more than enough extra volume range for 95% of practical purposes?  For 
the odd DVD which is really mastered that quietly you would at least get 
it up to listenable volumes..?

I do agree that using a dB scale everywhere is a nice idea in theory, 
but it needs a careful implementation in practice.  I talked the 
bio2jack author into adding such a volume control to his Jack output 
layer and he immediately found that his volume control in XMMS then 
became just far too sensitive when trying to slide it a little with the 
mouse.  The linear was better in practice because he could get some 
control where it was needed, but still turn it really low if required.  
I guess a kind of "half" log measure would be ideal...  Perhaps less of 
an issue in mplayer when using the keyboard to change volume (you can 
just tap a key to get precise changes)?

Sounds like a nice patch Reimar.  Good luck.

Ed W




More information about the MPlayer-dev-eng mailing list