[FFmpeg-devel] [PATCH v2] doc/filters: add geq gradient examples
Lou Logan
lou at lrcd.com
Tue Sep 16 21:25:19 CEST 2014
On Tue, 16 Sep 2014 07:34:14 +0200, Clément Bœsch wrote:
> On Mon, Sep 15, 2014 at 06:56:29PM -0800, Lou Logan wrote:
> > + at item
> > +Create a radial gradient that is the same size as the input:
> > + at example
> > +geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
> > + at end example
> > +
>
> You may mention @ref{vignette} filter here so people don't end up using it
> verbatim.
Mentioned.
> > + at item
> > +Create a linear gradient to use as a mask for another filter, then
> > +compose with @ref{overlay}:
> > + at example
> > +geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay
>
> This filtergraph is complex and very input dependant; please provide a
> complete command line as an example
Added. I actually prefer complete examples.
New version inserted below:
From 3ec5557f7ffd4e2ce6ddc5c06d1e5d5d07013536 Mon Sep 17 00:00:00 2001
From: Lou Logan <lou at lrcd.com>
Date: Mon, 15 Sep 2014 18:07:09 -0800
Subject: [PATCH] doc/filters: add geq gradient examples
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Radial gradient by Víctor Paesa.
Linear gradient by Paul Gentemann.
Also-by: Víctor Paesa <victorpaesa at googlemail.com>
Also-by: Paul Gentemann <beriukay at gmail.com>
Signed-off-by: Lou Logan <lou at lrcd.com>
---
doc/filters.texi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/doc/filters.texi b/doc/filters.texi
index bb486ea..1881b5c 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -5124,6 +5124,20 @@ Modify RGB components depending on pixel position:
@example
geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
@end example
+
+ at item
+Create a radial gradient that is the same size as the input (also see
+the @ref{vignette} filter):
+ at example
+geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
+ at end example
+
+ at item
+Create a linear gradient to use as a mask for another filter, then
+compose with @ref{overlay}:
+ at example
+ffmpeg -i input.mp4 -filter_complex "geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay" output.mp4
+ at end example
@end itemize
@section gradfun
--
2.1.0
More information about the ffmpeg-devel
mailing list