[FFmpeg-user] Concatenate multiple (<10) movies with xfade filter

Carl Zwanzig cpz at tuunq.com
Wed Jun 10 19:41:09 EEST 2020


On 6/10/2020 7:24 AM, Paul B Mahol wrote:

> On 6/10/20, Nicolas George<george at nsup.org>  wrote:

>> Paul B Mahol (12020-06-10):
>>> How so it is a bug? xfade needs 2 inputs.
>>> concat demuxer gives single output.

>> A filter that "can not work with" the output of another filter, your
>> words, is a bug. Filters should all work together seamlessly.

> It can work with its output just fine, just not in way user imagined.

Which seems entirely correct, even if the phrasing may be poor.


Back to the user's problem.
If you concat the files, the xfade filter has nothing to work with since 
it's getting a single stream. To do what you're asking, you need to tell 
ffmpeg when to "start" the incoming stream (before the outgoing one ends) 
and start the xfade -then-.

in ascii art-
111111111----
        xx
-------222222222----
               xx
--------------3333333
the streams must overlap.

IMHO, this is not a simple one-line single command. You need to know the 
length of each segment, then backtime from the end of each when to start the 
next one and when to xfade.

If this is recurring task, write a script to do the calculations. If it's a 
one-time deal, use some video editor software.


z!


More information about the ffmpeg-user mailing list