Adding transition together with multiple overlay images using FFMPEG

I am using ffmpeg for image overlay.

I have multiple images, which I wanted to overlay. My below code workd great for this.

ffmpeg -i D:/Test.mp4 
-i D:\Images\test.jpg 
-i D:\Images\test2.jpg 

-filter_complex  "[0][1]overlay=x=0:y=0:enable='between(t,1237.216831,1837.216831)'[v1];
[v1][2]overlay=x=0:y=0:enable='between(t,2237.216831,2469.729935)'[v2]"

 -map "[v2]" -map 0:a
 D:\ffmpeg_output\output.mp4

Now, I wanted to bring different effects at the time of image overlay. I learnt give effects using code

xfade=transition=fade:duration=0.5:offset=408.84

How do I apply transitions in my overlay image code together?

Please guide.

Kind Regards,


Give alpha channel to each image with the format filter, then add the fade filter:

ffmpeg -i video.mp4 -loop 1 -i image1.jpg -loop 1 -i image2.jpg 
-filter_complex "[1]format=yuva444p,fade=t=in:st=2237.216831:d=1:alpha=1[img1];[2]format=yuva444p,fade=t=in:st=2237.216831:d=1:alpha=1[img2];[0][img1]overlay=x=0:y=0:format=auto:enable='between(t,2237.216831,2469.729935)':shortest=1[bg];[bg][img2]overlay=x=0:y=0:format=auto:enable='between(t,2237.216831,2469.729935)':shortest=1,format=yuv420p"
-c:a copy output.mp4