[FFmpeg-user] concat demuxer filter_complex (fade)

mail-login+ffmpeg at protonmail.com mail-login+ffmpeg at protonmail.com
Tue Apr 14 16:43:05 EEST 2020


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, April 14, 2020 11:07 AM, Paul B Mahol <onemda at gmail.com> wrote:
> > I thought about this yesterday and came up with something like this:
> > ffmpeg -i in.JPG -filter_complex "[0:0]loop=loop=-1:start=0:size=100
> > [looped] ; [looped] trim=start=0:end=10 [trimmed] ; [trimmed]
> > fade=type=in:start_frame=0:duration=3:color=black [fadeIn]" -map [fadeIn]
> > -c:v h264 -r 60 out.mkv
> > or this
> > ffmpeg -loop 1 -i in.JPG -filter_complex "[0:0] trim=start=0:end=200
> > [trimmed] ; [trimmed] fade=type=in:start_frame=0:duration=3:color=black
> > [fadeIn]" -map [fadeIn] -c:v h264 out2.mkv
> > (I'd just have to add a concat filter to the filter chain and an audio
> > stream). I'm just not quite sure if there is a more smart way to do this
> > (which for example would be a bit faster, since this is (in my opinion a bit
> > slow for just duplicating a single frame). Well is there a smarter and/or
> > faster way?
> > And can you recommend which of these two commands above might be the better
> > one?
>
> Please use xfade filter instead.
>

What for? To not fade out to black and fade then in from black? Or are there
other benefits of the xfade filter?

With kind regards


More information about the ffmpeg-user mailing list