FFMPEG fade between images

2

I need to do cross fade transition between two images and followed this link which works perfect for two images.

ffmpeg -loop 1 -i input0.png -loop 1 -i input1.png -filter_complex "[1:v][0:v]blend=all_expr='A*(if(gte(T,3),1,T/3))+B*(1-(if(gte(T,3),1,T/3)))'" -t 4 frames_%04d.png

My intention is to add another image with this. i.e, I need to create a video with 3 images. I have tried creating a video named "video1.mp4" with 2 images and and "video2.mp4" with 1 image. And passed "video1.mp4" and "video2.mp4" to the command as below. The problem is the video2.mp4 is blending from the start of the video which looks like an overlay. The below is the command I used.

ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[1:v][0:v]blend=all_expr='A*(if(gte(T,3),1,T/3))+B*(1-(if(gte(T,3),1,T/3)))'" -t 6 fade.mp4

Can some one help out with the right command?

2vision2

Posted 2014-03-17T14:49:31.117

Reputation: 163

No answers