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

Stefano Sabatini stefasab at gmail.com
Wed Nov 2 21:28:43 CET 2011


On date Wednesday 2011-11-02 21:27:58 +0100, Stefano Sabatini encoded:
> 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.
> 
> Bikesheds:
> * "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:
>   avolume=2x
>   for increasing volume by two.
> 
> Opinions?

And patch...
-- 
FFmpeg = Faithless Foolish Mysterious Purposeless Embarassing Guide
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-add-avolume-filter.patch
Type: text/x-diff
Size: 9812 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111102/211e21a1/attachment.bin>


More information about the ffmpeg-devel mailing list