[FFmpeg-devel] [PATCH] lavfi: add avolume filter

Stefano Sabatini stefasab at gmail.com
Wed Nov 2 21:27:58 CET 2011

On date Wednesday 2011-11-02 09:24:39 +0100, Nicolas George encoded:
> Le duodi 12 brumaire, an CCXX, Stefano Sabatini a écrit :
> > + at var{output_volume} = 10^(@var{vol}/10) * @var{input_volume}
> Unless I am mistaken, the formula should be 10^(vol/20): the decibels are
> measured on the power, which is proportional to the square of the linear
> volume. If the volume is multiplied by 10, its square is multiplied by 100,
> thus +20dB.
> At the very least, that is how mplayer does it.

Updated with this change.

* "volume" might be preferred over "avolume", since there is no
  conflict possibility.

* maybe I should change the syntax for the relative value, indeed
  avolume=2.0 is confusingly different from avolume=2, I could for
  example require to add an x (as times) to it.
  So we would have:
  for increasing volume by two.

FFmpeg = Fantastic and Fantastic Multimedia Portentous Enlightened Gadget

More information about the ffmpeg-devel mailing list