FOLLOW US
4dots Software CODE HELP BLOG

How to make curtain video transition effect with ffmpeg

To make a curtain video transition effect with ffmpeg use the following code :

	
ffmpeg.exe -loop 1 -t effectDurationInSeconds -i firstImage.jpg -loop 1 -t effectDurationInSeconds -i secondImage.jpg
-filter_complex "[0:v]split[b1][b2];[b1]crop=iw/2:ih:0:0[b1];[b2]crop=iw/2:ih:iw/2:0[b2];
[1][b1]overlay=x='0-(W/2)*t/effectDurationInSeconds'[ob1];[ob1][b2]overlay=x='W/2+(W/2)*t/effectDurationInSeconds'[fv]"
-map "[fv]" -y outvideo.mp4

effectDurationInSeconds : duration of the effect in seconds