[FFmpeg-devel] Multiple [in] in filtergraph syntax

tajz tajz
Sun Dec 19 17:45:13 CET 2010

Stefano Sabatini a ?crit :
> On date Saturday 2010-12-18 18:37:33 +0100, tajz encoded:
>> Hi,
>> I am new to ffmpeg. I successfully build from sources (last trunk).
>> I read doc, some posts related to multiple inputs and mixing, and a bit
>> of source code.
>> I see that one can give multiple "-i file" to ffmpeg, but it seems there
>> is only one main source "[in]" in a video filter graph ("-vf").
>> I would like to mix two videos, using a filtergraph like :
>> "[in1] scale=100x50 [vid1]; [vid1] [in2] overlay [out]".
>> But it seems that only the first '-i' file is attached to the [in]
>> stream of the filtergraph syntax.
>> In graphparser.c I found "[in]", and it seems there is no other built-in
>> input.
>> "overlay"-ing a "color" sourced stream other the first "-i" works. I
>> just want to overlay another a second "-i" to the first.
>> Am I right ?
>> Is there a plan to support this feature (having each '-i' input
>> magically mapped to a [in1], [in2], etc stream) ?
> Yes, and help is welcome, feel free to create a feature request in
> roundup.

I would be glad to help for that.

I found it is not so easy to go to the intrinsics of FFMPEG. Currently, 
I am working on a video filter of my own, may be a bit outside the 
FFMPEG straight target features.

When it will work (I have a dream), I will focus on multiple in/out in 

This "filter" needs some graphics primitives (lines, rectangles, text). 
Is there any (using AVFilterBuffer) ? I don't find one, other filters 
draw directly in the buffers.

> Check also:
> http://roundup.ffmpeg.org/issue2040

It looks like what I hope :
-vf "[in1] ... [out2] ... [in2] ... [out1] ..." \
-i filei1 -i filei2 fileo1 fileo2

Thierry Bernier

More information about the ffmpeg-devel mailing list