How to animate transparent images using Xfade and ffmpeg
I am trying to making a video using 1 background image and 5 transparent images (all the images are in same dimensions 500×500). Where the 5 transparent images animate for 2 seconds (Slideup, WipeDown, Fade etc.) and come to their original positions using Xfade and FFMpeg.
When I tried the example in the Xfade site using 3 images (1 background image and two transparent images), the first image i.e. 1.png is overlaid on the background image i.e. bg.jpg and after 4 seconds next the second image i.e. 2.png moved from right to left, I got the transition what I expected but the 2.png is overlapping the 1.png, where I want to show the 1.png also. Below is the example I tried.
ffmpeg -loop 1 -t 5 -i bg.jpg -loop 1 -t 5 -i 1.png -loop 1 -t 5 -i 2.png -filter_complex "[1][2]xfade=transition=wipeleft:duration=1:offset=4,format=yuva420p[trans];[0][trans]overlay=10:10" -c:v libx264 -preset ultrafast -tune stillimage -c:a aac -strict experimental -b:a 192k output3.mp4
All I want to animate the 5 images on a background image, each image should come one after the other with 2 seconds transitions and all the 5 transparent images should overlay on the background image and all the images should be visible. Over all the video should be of 20 seconds length.
Note: all the images are in same dimensions 500×500, I attached all the images below.
Thank you.
Read more here: Source link







