Log Volume

Feature requests for VLC.
auio
New Cone
New Cone
Posts: 3
Joined: 17 Aug 2010 21:39

Log Volume

Postby auio » 20 Aug 2010 02:13

Howdy,

It would be handy if the volume control in VLC was logarithmic instead of linear, and had a considerably greater dynamic range. As it is now, I often have it on 2% or on 200%.

Thanks!

andrixnet
New Cone
New Cone
Posts: 9
Joined: 28 Jan 2011 22:23

Re: Log Volume

Postby andrixnet » 30 Jan 2011 21:59

I second this request.

Having only a few steps until about 15% makes the audio from quiet to very loud and it's difficult to control a medium volume setting.

Thank you

Phr3d
New Cone
New Cone
Posts: 9
Joined: 08 Oct 2010 01:21

Re: Log Volume

Postby Phr3d » 04 Feb 2011 03:13

(If I understand your definition of LOG)
I disagree: initial volume of 25% and steps of 5% works great for me, something else for someone else - vlc is already very customizable.
recommend experiment to find a 'correct' range for 75-90% of your files and just sigh and click 200% for the occasional PoS vid/audio files from incompetent encoders (press-hold ctrl-up arrow is pretty fast). MUTE that is sustained through ctrl-down arrow would be welcome (when the user is trying to run from something encoded at 115dB, lol) Also, you can mouse-scroll volume up/down pretty fast.
What would Really help is pre-read normalization that can react to extremely loud or soft encodes and adjust the volume-control range accordingly. If that is what the audio-normalization check-box is supposed to do, it does not function on my windows-creative labs platform. My guess is that it would add a Lot of overhead to implement this ability.
my 2¢

andrixnet
New Cone
New Cone
Posts: 9
Joined: 28 Jan 2011 22:23

Re: Log Volume

Postby andrixnet » 04 Feb 2011 10:08

First I'd like to note that the human ear is not linear, but LOG like.
All volume controls on all amplifiers use a potmeter whose resistance variation is not linear, but logarithmic.

With an initial volume of 25% it is already too loud overall.
Increasing volume to 100% makes slow and little noticable sound level increase.
Decreasing volume from 25% to 0% makes quick and very large sound level changes. It is difficult to impossible to control the volume at mid to low levels.
This is a known issue to VLC ever since I've know it exists. My experience includes at least 8 different sound card chipsets, also analog output and SDPIF.

I've recently narrowed and identified the problem with a default installation of WinAMP5. Compared to WinAMP2, it has optional linear or log volume control, default is linear. With the old WinAMP2, initial volume about 60% and the slider having a nice dynamic range of output sound level, now WinAMP5 had to be initial volume at ~20% with most of the sound level range between 0 and 30%. Luckily, I found the setting in the options window.

I only ask something similar for VLC. Maybe some have sound drivers that behave for a linear control, others for log. Please let us choose the best for our system.
Thank you

Phr3d
New Cone
New Cone
Posts: 9
Joined: 08 Oct 2010 01:21

Re: Log Volume

Postby Phr3d » 06 Feb 2011 05:02

Obviously, I am very happy with the volume, the reason I replied - as I usually need -more- gain to cover different encodes. I regularly go Over 100% for my creative labs audigy, set to 89dB with their software and my old EQ with mic - others use a Radio Shack or equiv sound pressure meter.

Do the replay preamp and gain settings help at all? That should narrow the dynamic range to be more to your liking. for reference mine are 0 and minus 7, but I thought that was default (I've been using vlc a Long time, so not sure if I have changed those at some point). Also, changing your audio step to -one-.
From what you describe, you are hitting your preamps max capability at 25% or less if you have no perception of volume increase after that. and Always, the volume of the actual multimedia is critical, that is the unknown variable times the constant amplification of your preamp. I don't mean to sound elementary, but I can't count the number of people I have heard complain about an amplifier, TV's for instance, being weak or lousy, when if they had tried over-the-air input that -must- perform to a standard, unlike their cable TV which has No standard at all, they would find that the TV's internal amp is quite adequate and the range reasonable.

My experience with all but old amps is that their gain is the same as vlc, i.e., a maximum measured 89dB and volume control moves through 1/2 dB steps up to zero dB, with 3dB steps being the 'meaningful' step that all can perceive as an increase in volume. I have only one motherboard sound setup which was abysmal, though it did not behave as your system does, otherwise 5 generations of Creative Labs.

Anyway, the gain and step controls -should- be able to help until this 'known' issue is addressed, hope I've helped.
good luck.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Log Volume

Postby Jean-Baptiste Kempf » 07 Feb 2011 22:54

Well, sorry, but I don't understand all.

What I planned was to find a way that the 2/3 of the slider is 100% and entire slider is 400% (+6dB), but I don't know the exact function for mapping yet.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

andrixnet
New Cone
New Cone
Posts: 9
Joined: 28 Jan 2011 22:23

Re: Log Volume

Postby andrixnet » 08 Feb 2011 13:43

@Phr3d : I haven't changed any other setting that may be connected to sound volume in VLC prefs. Installation defaults.

Also, you refered to an amplifier's volume control in dB steps. Do check what "dB" means and you'll understand what and why I refer to when I say volume control should follow a logarithimic curve, rather then linear.

Also, please grab WinAMP 5 and play with it's setting "log and linear" and the behaviour of the volume slider on your system as well. Compare to VLC.

Phr3d
New Cone
New Cone
Posts: 9
Joined: 08 Oct 2010 01:21

Re: Log Volume

Postby Phr3d » 09 Feb 2011 03:12

I am aware of analog potentiometer theory and construction, and why it must be that way. My reference is that -to me- you are describing a fault that my several sets of equipment over-the-years have not experienced. If I was in your situation, I would be scrambling for a solution as well.

That was why I suggested that the audio controls might minimize the issue.

I am no fan of winamp, so I will be unable to test their version of a proper digital LOG approximation, but again, I do not perceive the issue at all, vlc behaves as my several calibrated HT receivers do - from a proper DVD I use 25-50% of the 0-200% shown and only need the more extreme values for crap-from-the-web multimedia files. By changing from the default values of gain and steps, you theoretically should be able to have a 0-100% volume range that is useful to you.
My Humble Opinion, nothing more.

@ j-b, no idea if there is anything approximating winamp's code, maybe someone is an audio guru in Forge-land?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Log Volume

Postby Jean-Baptiste Kempf » 09 Feb 2011 12:06

Winamp code is closed. Refering to Winamp code doesn't help at all.
You speak lengthly, but don't provide precise points.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

andrixnet
New Cone
New Cone
Posts: 9
Joined: 28 Jan 2011 22:23

Re: Log Volume

Postby andrixnet » 09 Feb 2011 20:36

I've created an end user comparison test as attachments to bug #4208 here :
https://trac.videolan.org/vlc/ticket/4208#comment:7

Phr3d
New Cone
New Cone
Posts: 9
Joined: 08 Oct 2010 01:21

Re: Log Volume

Postby Phr3d » 10 Feb 2011 00:47

Winamp code is closed. Refering to Winamp code doesn't help at all.
You speak lengthly, but don't provide precise points.
agreed about lengthily, I have been told that I try too hard and make matters more confusing. Nature of age and reading too many forum misunderstandings.
I offered a possible solution to test if it mitigated the problem, apparently it does not, so WinAmp gets used as a comparison, nothing more.
vlc's volume is fine locally (12) and in over a hundred configurations in my personal experience.
peace, out.

andrixnet
New Cone
New Cone
Posts: 9
Joined: 28 Jan 2011 22:23

Re: Log Volume

Postby andrixnet » 10 Feb 2011 10:20

Do the replay preamp and gain settings help at all? That should narrow the dynamic range to be more to your liking.
Why should I narrow dynamic range to work around the volume control response curve problem ?
From what you describe, you are hitting your preamps max capability at 25% or less if you have no perception of volume increase after that.
I said "perception of small volume increase", not "none".
Also, it matters not if I listen through headphones, sound card's line out to power amp, sound card's SPDIF to dedicated DAC then to power amp, or just line out to simple desktop active speakers. As I said, tested on many different sound cards. Behaviour is the same.
Also, changing your audio step to -one-.

IMHO that may change the perception of the volume control behaviour, but it's a terrible workaround in principle.
Anyway, the gain and step controls -should- be able to help until this 'known' issue is addressed, hope I've helped.
Yes, I've toyed with them. Scale ranges need getting used to.

Anyway, I've posted here in the hope that future versions will address this issue for the less experienced user that do not easily fiddle with advanced settings.

wxfhnmdedc
New Cone
New Cone
Posts: 1
Joined: 01 Jun 2011 04:53

Re: Log Volume

Postby wxfhnmdedc » 01 Jun 2011 04:54

My experience with all but old amps is that their gain is the same as vlc, i.e., a maximum measured 89dB and volume control moves through 1/2 dB steps up to zero dB, with 3dB steps being the 'meaningful' step that all can perceive as an increase in volume. I have only one motherboard sound setup which was abysmal, though it did not behave as your system does, otherwise 5 generations of Creative Labs.

AudioDude
New Cone
New Cone
Posts: 6
Joined: 16 Dec 2013 20:08
Operating System: Windows

Re: Log Volume

Postby AudioDude » 16 Dec 2013 20:15

I've looked into this a lot, and have found out that logaritmic isn't quite the good choice. x^3 seems to far better match the volume knobs we know from proper, good and expensive audio gear, where an effort was put into making it "feel right". The formula seems to be something like this:

amplitude = pow(slider position, 3)

But considering VLC's UI, the typical use case, I think that x^2 might be more pratical. I also think there should be an easy to way "reset to 100%", as this gives the best quality.

Contrary to such a x^2 slider, a logaritmic slider can never reach the "off" position, as that would theoretically be infinitely far down. This is the way logarithms work, and it a matter of mathematics. (Oddly enough, most sound software uses logaritmic volume sliders and meters.) For inspiration, see this typical master fader on a mixing console. I think this is well designed, and "feels right". The numbers are dB:

Image

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Log Volume

Postby Jean-Baptiste Kempf » 16 Dec 2013 20:25

I've looked into this a lot, and have found out that logaritmic isn't quite the good choice. x^3 seems to far better match the volume knobs we know from proper, good and expensive audio gear, where an effort was put into making it "feel right". The formula seems to be something like this:

amplitude = pow(slider position, 3)
VLC uses x^3.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

AudioDude
New Cone
New Cone
Posts: 6
Joined: 16 Dec 2013 20:08
Operating System: Windows

Choice of output module

Postby AudioDude » 16 Dec 2013 20:46

Oh cool! Nice.

I must be doing something wrong here, then, because I just tested all this very throughly. 50% is exactly -6 dB lower than 100%, so it is certainly linear. I checked by routing back a 1000 hz sine wave into Samplitude where you can see these things quite precisely.

I am using WaveOut because the volume slider doesn't work with DirectSound at all, when using a Motu 2408 Mk3 card under Windows 7 64-bit. (The volume is just constant 100% regardless of how I set the volume button in DirectSound mode, and the mute icon doesn't even work. I'm guessing that DirectSound is not the proper choice when using Motu.)

So here's my question: Does the behavior of the volume control depend on what audio output module I have chosen? A friend of mine (the developer of the Buzz tracker) who is using the "automatic" output module reports that his volume button "feels very nice in the new VLC" and that it is not linear.

What is the behavior of the different audio output modules? I'd love to have x^3. :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Log Volume

Postby Jean-Baptiste Kempf » 16 Dec 2013 20:50

Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

AudioDude
New Cone
New Cone
Posts: 6
Joined: 16 Dec 2013 20:08
Operating System: Windows

Re: Log Volume

Postby AudioDude » 16 Dec 2013 21:05

Wow. That looks entirely correct to me. (Got confused by the millibels thing until I remembered a few things I was once told by a game developer.)

There's only one explanation left then: VLC is okay, and my configuration / setup is where the problem is.

Thank you for your time.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Log Volume

Postby Jean-Baptiste Kempf » 16 Dec 2013 23:10

Wow. That looks entirely correct to me. (Got confused by the millibels thing until I remembered a few things I was once told by a game developer.)
Oh yes, the millibel thing is VERY VERY confusing.
There's only one explanation left then: VLC is okay, and my configuration / setup is where the problem is.
Maybe, maybe not. Audio seems a complex topic on Windows. Can you try to measure the output in dB?

Does it work better if it's in integers and not in float?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 25 guests