[FFmpeg-user] Multiple overlays at specific times

emmanuel martin ask.emmanuel at gmail.com
Sat Dec 16 20:51:50 EET 2023


I have two inputs that are the same image. The first one, I loop to create
a video for 8 seconds. I also create two streams that I will overlay. The
background is the normal video, and above it is the same video with a LUT
(Look-Up Table) that I applied earlier. I make the top video appear as an
overlay with a fade-in effect that lasts x seconds before reaching 100%. To
create a 'flash' effect, I want to overlay instances of my base image
(participant1.jpg) at different very close intervals. The first overlay
displays, but not this one
"[out][1]overlay=enable='between(t,3.25,3.26)'[outv]", and I can't figure
out the reason. Have I made a mistake somewhere? Thank you very much for
your valuable advice :)

ffmpeg -loop 1 -i participant1.jpg -i participant1.jpg -filter_complex "\
[0]split=2[v1][v2];\
[v2]format=rgba,lut3d='red.cube'[v3];\
[v3]fade=in:st=0.25:d=2.93:alpha=1[ov];\
[v1][ov]overlay[bg];\
[bg][1]overlay=enable='between(t,3.20,3.21)'[out];\
[out][1]overlay=enable='between(t,3.25,3.26)'[outv]"\
 -map "[outv]" -c:v libx264 -t 8 -pix_fmt yuv420p output.mp4


More information about the ffmpeg-user mailing list