summaryrefslogtreecommitdiff
path: root/doc/ffmpeg.texi
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-17 04:01:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-17 04:03:50 +0200
commit4778783160fb8d7aa39dafdabc756f1691b830f7 (patch)
tree4b79ab7e0bcefb304b8a4f3c32908d3217d6b4a9 /doc/ffmpeg.texi
parentdcd207c4cbcd9dd72b73e5b544c055b29885be64 (diff)
parent3b266da3d35f3f7a61258b78384dfe920d875d29 (diff)
downloadffmpeg-4778783160fb8d7aa39dafdabc756f1691b830f7.tar.gz
Merge commit '3b266da3d35f3f7a61258b78384dfe920d875d29'
* commit '3b266da3d35f3f7a61258b78384dfe920d875d29': avconv: add support for complex filtergraphs. avconv: make filtergraphs global. avconv: move filtered_frame from InputStream to OutputStream. avconv: don't set output width/height directly from input value. avconv: move resample_{width,height,pix_fmt} to InputStream. avconv: remove a useless variable from OutputStream. avconv: get output pixel format from lavfi. graphparser: fix the order in which unlabeled input links are returned. avconv: change {input,output}_{streams,files} into arrays of pointers. avconv: don't pass input/output streams to some functions. Conflicts: cmdutils.c cmdutils.h doc/ffmpeg.texi ffmpeg.c ffplay.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc/ffmpeg.texi')
-rw-r--r--doc/ffmpeg.texi47
1 files changed, 46 insertions, 1 deletions
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 42445c3bc4..e14885c5b5 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -224,6 +224,9 @@ codec-dependent.
@var{filter_graph} is a description of the filter graph to apply to
the stream. Use @code{-filters} to show all the available filters
(including also sources and sinks).
+
+See also the @option{-filter_complex} option if you want to create filter graphs
+with multiple inputs and/or outputs.
@item -pre[:@var{stream_specifier}] @var{preset_name} (@emph{output,per-stream})
Specify the preset for matching stream(s).
@@ -522,7 +525,7 @@ Synchronize read on input.
@section Advanced options
@table @option
-@item -map [-]@var{input_file_id}[:@var{stream_specifier}][,@var{sync_file_id}[:@var{stream_specifier}]] (@emph{output})
+@item -map [-]@var{input_file_id}[:@var{stream_specifier}][,@var{sync_file_id}[:@var{stream_specifier}]] | @var{[linklabel]} (@emph{output})
Designate one or more input streams as a source for the output file. Each input
stream is identified by the input file index @var{input_file_id} and
@@ -538,6 +541,10 @@ the source for output stream 1, etc.
A @code{-} character before the stream identifier creates a "negative" mapping.
It disables matching streams from already created mappings.
+An alternative @var{[linklabel]} form will map outputs from complex filter
+graphs (see the @option{-filter_complex} option) to the output file.
+@var{linklabel} must correspond to a defined output link label in the graph.
+
For example, to map ALL streams from the first input file to output
@example
ffmpeg -i INPUT -map 0 output
@@ -832,6 +839,44 @@ Specify Timecode for writing. @var{SEP} is ':' for non drop timecode and ';'
@example
ffmpeg -i input.mpg -timecode 01:02:03.04 -r 30000/1001 -s ntsc output.mpg
@end example
+
+@item -filter_complex @var{filtergraph} (@emph{global})
+Define a complex filter graph, i.e. one with arbitrary number of inputs and/or
+outputs. For simple graphs -- those with one input and one output of the same
+type -- see the @option{-filter} options. @var{filtergraph} is a description of
+the filter graph, as described in @ref{Filtergraph syntax}.
+
+Input link labels must refer to input streams using the
+@code{[file_index:stream_specifier]} syntax (i.e. the same as @option{-map}
+uses). If @var{stream_specifier} matches multiple streams, the first one will be
+used. An unlabeled input will be connected to the first unused input stream of
+the matching type.
+
+Output link labels are referred to with @option{-map}. Unlabeled outputs are
+added to the first output file.
+
+For example, to overlay an image over video
+@example
+ffmpeg -i video.mkv -i image.png -filter_complex '[0:v][1:v]overlay[out]' -map
+'[out]' out.mkv
+@end example
+Here @code{[0:v]} refers to the first video stream in the first input file,
+which is linked to the first (main) input of the overlay filter. Similarly the
+first video stream in the second input is linked to the second (overlay) input
+of overlay.
+
+Assuming there is only one video stream in each input file, we can omit input
+labels, so the above is equivalent to
+@example
+ffmpeg -i video.mkv -i image.png -filter_complex 'overlay[out]' -map
+'[out]' out.mkv
+@end example
+
+Furthermore we can omit the output label and the single output from the filter
+graph will be added to the output file automatically, so we can simply write
+@example
+ffmpeg -i video.mkv -i image.png -filter_complex 'overlay' out.mkv
+@end example
@end table
@section Preset files