[FFmpeg-devel] [PATCH 1/2] ffmpeg: make -lavfi an alias for -filter_complex.

Stefano Sabatini stefasab at gmail.com
Sun Mar 17 01:28:12 CET 2013


On date Saturday 2013-03-16 17:18:47 +0100, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  ffmpeg_opt.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> 
> "ffmpeg -f lavfi -i graph" is shorter and easier than
> "ffmpeg -filter_complex graph", but it is slightly less efficient.
> 
> "ffmpeg -lavfi graph" is easier than both.
> 
> 
> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> index e6fab2a..f0c0f30 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 |

Doc updates missing.

Also I note that "lavfi" is not very descriptive, a possible better
alternative -filter_graph (which is not so much better than
-filter_complex) or -fg if you want to keep it short (but which is
even less descriptive).

OTOH the name of the "lavfi" device was choosen to be coupled with the
library, so it would make sense to keep it also for a corresponding
filtering graph option (which basically relies on the same library) so
I don't object the change, even if I find a bit weird to give the name
of a library to an option.
-- 
FFmpeg = Fast and Free Mysterious Plastic Evil Gadget


More information about the ffmpeg-devel mailing list