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

Stefano Sabatini stefasab at gmail.com
Wed Nov 2 00:09:56 CET 2011


On date Tuesday 2011-11-01 22:53:31 +0100, Michael Niedermayer encoded:
> On Tue, Nov 01, 2011 at 09:45:39PM +0100, Stefano Sabatini wrote:
> > ---
> >  doc/filters.texi         |   42 ++++++++++
> >  libavfilter/Makefile     |    1 +
> >  libavfilter/af_avolume.c |  189 ++++++++++++++++++++++++++++++++++++++++++++++
> >  libavfilter/allfilters.c |    1 +
> >  4 files changed, 233 insertions(+), 0 deletions(-)
> >  create mode 100644 libavfilter/af_avolume.c
> > 
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 7085ae1..9b6f614 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -224,6 +224,48 @@ expressed in the form "[@var{c0} @var{c1} @var{c2} @var{c3} @var{c4} @var{c5}
> >  @var{c6} @var{c7}]"
> >  @end table
> >  
> > + at section avolume
> > +
> > +Adjust the input audio volume. The filter accepts exactly one
> > +parameter, which express how the audio volume will be increased or
> > +decresed.
> > +
> > +Output values are clipped to the maximum value.
> > +
> > +If the parameter value is an integer, baseline value is 256, and the
> > +output audio volume is given by the relation:
> > + at example
> > + at var{output_volume}=@var{vol}/256 * @var{input_volume}
> > + at end example
> > +
> > +If the parameter is expressed as a decimal number, baseline value is
> > +1.0, and the output audio volume is given by the relation:
> > + at example
> > + at var{output_volume}=@var{vol} * @var{input_volume}
> > + at end example
> > +
> > +Note that when choosing the decimal number representation, "." must be
> > +specified in the parameter or it will be interpreted as an integer
> > +value.
> > +
> > +The expressed value must to be a non-negative value either way.
> > +Default parameter value is 1.0.
> 
> it should be possible to also specify +-12dB

Good idea.
 
> except that it LGTM, thanks

Patch updated, I'll push it soon if I see no more comments.
-- 
FFmpeg = Fast and Fast Merciful Pitiless Enchanting Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-lavfi-add-avolume-filter.patch
Type: text/x-diff
Size: 9998 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111102/2203d0de/attachment.bin>


More information about the ffmpeg-devel mailing list