I have bee experimenting with ffmpeg on video transitions , Now am stuck in this transition , I have no where to go ,

I have two videos like this,

enter image description here

at the end of first video i have to split the first video into two from center and reveal the second video like the following,

enter image description here any help would be appreciated

  • ffmpeg is processing, not composition tool. But you can many tricks with it.
    – bukkojot
    Sep 21, 2017 at 12:07
  • I think you'd need a custom filter to accomplish that. You might find this useful.
    – Elder Geek
    Sep 22, 2017 at 15:19

2 Answers 2


Some variant of:

ffmpeg -i FIRST -i SECOND -lavfi "blend=all_expr='if(lte((W/2-sqrt((X-W/2)*(X-W/2)))+N*SW,W/2),A,B)'" OUTPUT

  • 1
    Amazing! It not as described author, but very impressive
    – bukkojot
    Sep 23, 2017 at 3:11
  • Hey man, how to set custom time to complete this animation??? please inform me..., Thank you Jun 10, 2019 at 6:13

This needs a slightly elaborate filtergraph to do as described.


where 0 is video '1' and 1 is video '2'. DUR0 should be replaced with duration of video '1' and D with duration of the effect.

A curtain effect, like what Paul described, can be done like this:


where S is start time in seconds. (You may want/need to adjust the timestamps of the top video 'A' beforehand using setpts) and D is duration of effect. These two variables should be replaced with the required numeral values.

I can't test either of these for a few days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.