I have command to overlay 2 images , and its working fine,
"-y -i \(image1) -i \(image2) -filter_complex [0][1]overlay=(W-w)/2:(H-h)/2 \(out)"
I wish to add multiple images
for example: we have four images [image1,image2, image3, image4].
Now image1 will be base one, I want to other 3 images on image1 as overlay.
The images place can be vary randomly.
I have been trying to search this on google, everything redirects to multiple images on video or combine video.
Can anybody help me.
You'll need to use multiple overlay filters. A basic example:
ffmpeg -i input0 -i input1 -i input2 -i input3
-filter_complex "[0][1]overlay[bg0];[bg0][2]overlay[bg1];[bg1][3]overlay[v]"
-map "[v]" output
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With