diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-17 21:55:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-17 21:55:27 +0100 |
commit | 36258f98299409666ab373d04699618e9662e367 (patch) | |
tree | 38c972902b77e4ab1c6980464809325256a0f719 | |
parent | c603f22683d85ce45909582fe12cdb4753f9f616 (diff) | |
parent | ec7fc7b7d1f00fb8725d7812a018aed2ad1af132 (diff) | |
download | ffmpeg-36258f98299409666ab373d04699618e9662e367.tar.gz |
Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
fate: add a test for -filter_complex / -lavfi without input.
ffmpeg: make -lavfi an alias for -filter_complex.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | doc/ffmpeg.texi | 7 | ||||
-rw-r--r-- | ffmpeg_opt.c | 2 | ||||
-rw-r--r-- | tests/fate/ffmpeg.mak | 6 | ||||
-rw-r--r-- | tests/ref/fate/ffmpeg-filter_complex | 6 | ||||
-rw-r--r-- | tests/ref/fate/ffmpeg-lavfi | 6 |
5 files changed, 27 insertions, 0 deletions
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 9848e0dd86..00c9b25fd4 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -167,6 +167,8 @@ Complex filtergraphs are configured with the @option{-filter_complex} option. Note that this option is global, since a complex filtergraph by its nature cannot be unambiguously associated with a single stream or file. +The @option{-lavfi} option is equivalent to @option{-filter_complex}. + A trivial example of a complex filtergraph is the @code{overlay} filter, which has two video inputs and one video output, containing one video overlaid on top of the other. Its audio counterpart is the @code{amix} filter. @@ -1032,6 +1034,11 @@ To generate 5 seconds of pure red video using lavfi @code{color} source: @example ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv @end example + +@item -lavfi @var{filtergraph} (@emph{global}) +Define a complex filter graph, i.e. one with arbitrary number of inputs and/or +outputs. Equivalent to @option{-filter_complex}. + @end table As a special exception, you can use a bitmap subtitle stream as input: it diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 728d4745a4..4b2cfeb794 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2603,6 +2603,8 @@ const OptionDef options[] = { "reinit filtergraph on input parameter changes", "" }, { "filter_complex", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex }, "create a complex filtergraph", "graph_description" }, + { "lavfi", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex }, + "create a complex filtergraph", "graph_description" }, { "stats", OPT_BOOL, { &print_stats }, "print progress report during encoding", }, { "attach", HAS_ARG | OPT_PERFILE | OPT_EXPERT | diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index cc0e22add3..b96bfb3299 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -15,6 +15,12 @@ FATE_MAPCHAN = $(FATE_MAPCHAN-yes) FATE_FFMPEG += $(FATE_MAPCHAN) fate-mapchan: $(FATE_MAPCHAN) +FATE_FFMPEG-$(CONFIG_COLOR_FILTER) += fate-ffmpeg-filter_complex +fate-ffmpeg-filter_complex: CMD = framecrc -filter_complex color=d=1:r=5 + +FATE_FFMPEG-$(CONFIG_COLOR_FILTER) += fate-ffmpeg-lavfi +fate-ffmpeg-lavfi: CMD = framecrc -lavfi color=d=1:r=5 + FATE_FFMPEG-$(CONFIG_RAWVIDEO_DEMUXER) += fate-force_key_frames fate-force_key_frames: tests/data/vsynth2.yuv fate-force_key_frames: CMD = enc_dec \ diff --git a/tests/ref/fate/ffmpeg-filter_complex b/tests/ref/fate/ffmpeg-filter_complex new file mode 100644 index 0000000000..54d318db9d --- /dev/null +++ b/tests/ref/fate/ffmpeg-filter_complex @@ -0,0 +1,6 @@ +#tb 0: 1/5 +0, 0, 0, 1, 115200, 0x375ec573 +0, 1, 1, 1, 115200, 0x375ec573 +0, 2, 2, 1, 115200, 0x375ec573 +0, 3, 3, 1, 115200, 0x375ec573 +0, 4, 4, 1, 115200, 0x375ec573 diff --git a/tests/ref/fate/ffmpeg-lavfi b/tests/ref/fate/ffmpeg-lavfi new file mode 100644 index 0000000000..54d318db9d --- /dev/null +++ b/tests/ref/fate/ffmpeg-lavfi @@ -0,0 +1,6 @@ +#tb 0: 1/5 +0, 0, 0, 1, 115200, 0x375ec573 +0, 1, 1, 1, 115200, 0x375ec573 +0, 2, 2, 1, 115200, 0x375ec573 +0, 3, 3, 1, 115200, 0x375ec573 +0, 4, 4, 1, 115200, 0x375ec573 |