[FFmpeg-user] Using multiple overlays
Cecil Westerhof
Cecil at decebal.nl
Wed Jun 29 17:06:10 EEST 2022
To overlay a picture on a video I use at the moment:
ffmpeg -y \
-ss 21:50 -to 24:30 -i input.MTS \
-i Photos/Shrinked/input1.jpg \
-i Photos/Shrinked/input2.jpg \
-filter_complex "
[0:v][1:v] overlay=10:10:enable='between(t, 5, 85)',
colorkey=0xFFFFFF\:0.01[ckout];[0:v][ckout]overlay[out]
" \
-map '[out]' -map 0:a \
-pix_fmt yuv420p -vcodec libx264 -crf 26 \
-preset veryfast \
output.mp4
This works great and input1.jpg is (transparently) overlaid on the
video from 5 until 85.
But I want to overlay input2.jpg from 85 until 155. But I cannot find
how to do this. How can I overlay several photos (transparently) on
the video at different time intervals?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
More information about the ffmpeg-user
mailing list