[FFmpeg-cvslog] doc/filters: review introductory example and explanation

Stefano Sabatini git at videolan.org
Wed Aug 28 23:16:20 CEST 2013


ffmpeg | branch: release/1.1 | Stefano Sabatini <stefasab at gmail.com> | Sat Apr  6 01:43:01 2013 +0200| [19382a2a1062d153d5ae8738022991749335bbe6] | committer: Timothy Gu

doc/filters: review introductory example and explanation

In particular, fix wrong vertical mirroring command, and clarify
and extend explanation.

Based on a patch by littlebat <dashing.meng at gmail.com>.

Should fix trac ticket #2413.
(cherry picked from commit 215ca864759a54f45265a51ac57dbfd75cb23da2)

Signed-off-by: Timothy Gu <timothygu99 at gmail.com>

Conflicts:
	doc/filters.texi

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19382a2a1062d153d5ae8738022991749335bbe6
---

 doc/filters.texi |   39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 9d6c2b8..ce7bbb4 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3,10 +3,10 @@
 
 Filtering in FFmpeg is enabled through the libavfilter library.
 
-In libavfilter, it is possible for filters to have multiple inputs and
-multiple outputs.
-To illustrate the sorts of things that are possible, we can
-use a complex filter graph. For example, the following one:
+In libavfilter, a filter can have multiple inputs and multiple
+outputs.
+To illustrate the sorts of things that are possible, we consider the
+following filtergraph.
 
 @example
 input --> split ---------------------> overlay --> output
@@ -15,25 +15,32 @@ input --> split ---------------------> overlay --> output
             +-----> crop --> vflip -------+
 @end example
 
-splits the stream in two streams, sends one stream through the crop filter
-and the vflip filter before merging it back with the other stream by
-overlaying it on top. You can use the following command to achieve this:
+This filtergraph splits the input stream in two streams, sends one
+stream through the crop filter and the vflip filter before merging it
+back with the other stream by overlaying it on top. You can use the
+following command to achieve this:
 
 @example
-ffmpeg -i input -vf "[in] split [T1], [T2] overlay=0:H/2 [out]; [T1] crop=iw:ih/2:0:ih/2, vflip [T2]" output
+ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
 @end example
 
 The result will be that in output the top half of the video is mirrored
 onto the bottom half.
 
-Filters are loaded using the @var{-vf} or @var{-af} option passed to
- at command{ffmpeg} or to @command{ffplay}. Filters in the same linear
-chain are separated by commas. In our example, @var{split,
-overlay} are in one linear chain, and @var{crop, vflip} are in
-another. The points where the linear chains join are labeled by names
-enclosed in square brackets. In our example, that is @var{[T1]} and
- at var{[T2]}. The special labels @var{[in]} and @var{[out]} are the points
-where video is input and output.
+Filters in the same linear chain are separated by commas, and distinct
+linear chains of filters are separated by semicolons. In our example,
+ at var{crop,vflip} are in one linear chain, @var{split} and
+ at var{overlay} are separately in another. The points where the linear
+chains join are labelled by names enclosed in square brackets. In the
+example, the split filter generates two outputs that are associated to
+the labels @var{[main]} and @var{[tmp]}.
+
+The stream sent to the second output of @var{split}, labelled as
+ at var{[tmp]}, is processed through the @var{crop} filter, which crops
+away the lower half part of the video, and then vertically flipped. The
+ at var{overlay} filter takes in input the first unchanged output of the
+split filter (which was labelled as @var{[main]}), and overlay on its
+lower half the output generated by the @var{crop,vflip} filterchain.
 
 Some filters take in input a list of parameters: they are specified
 after the filter name and an equal sign, and are separated from each other



More information about the ffmpeg-cvslog mailing list