[FFmpeg-user] Concatenate multiple (<10) movies with xfade filter
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-
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.
More information about the ffmpeg-user