<p>This needs a slightly elaborate filtergraph to do as described.</p>

<pre><code>-filter_complex
    "[0]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-DUR0)/D':enable=gte(t,DUR0)[ob1];
     [ob1][b2]overlay=x='W/2+(W/2)*(t-DUR0)/D':enable=gte(t,DUR0)[fv]
    "
</code></pre>

<p>where <code>0</code> is video '1' and <code>1</code> is video '2'. <code>DUR0</code> should be replaced with duration of video '1' and <code>D</code> with duration of the effect.  </p>

<hr>

<p>A curtain effect, like what Paul described, can be done like this:</p>

<pre><code>blend=all_expr='if(lte((W/2-abs(X-SW*W/2))/(SW*W/2),(T-S)/D),B,A)'
</code></pre>

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

<p>I can't test either of these for a few days.</p>

CC BY-SA 3.0
2017-09-23T06:18:20.307Z
2017-09-23T06:18:20.307Z
Gyan
<p>I have bee experimenting with ffmpeg on video transitions , Now am stuck in this transition , I have no where to go ,</p>

<p>I have two videos like this,</p>

<p><a href="https://i.sstatic.net/QbCsy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QbCsy.png" alt="enter image description here"></a></p>

<p>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, </p>

<p><a href="https://i.sstatic.net/wmG7t.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wmG7t.png" alt="enter image description here"></a>
any help would be appreciated</p>

CC BY-SA 3.0
2017-09-21T12:07:01.513Z
ffmpeg is processing, not composition tool. But you can many tricks with it.
bukkojot
CC BY-SA 3.0
2017-09-22T15:19:54.393Z
I think you'd need a [custom filter](https://video.stackexchange.com/questions/15962/video-transitions-and-filters-how-to-create-custom-ones?rq=1) to accomplish that. You might find [this](https://github.com/hudl/HudlFfmpeg/wiki/Creating-Custom-Filters) useful.
Elder Geek
<ffmpeg><video-editor><transitions>
How to get this transition using ffmpeg?
Jeffin
# How to get this transition using ffmpeg?

(Asked by: username_0 on 2017-09-21)

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](https://i.sstatic.net/QbCsy.png)](https://i.sstatic.net/QbCsy.png)

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](https://i.sstatic.net/wmG7t.png)](https://i.sstatic.net/wmG7t.png)
any help would be appreciated

**Tags:** ffmpeg, video-editor, transitions

> **Comments:**
> **username_1**: ffmpeg is processing, not composition tool. But you can many tricks with it.  
> **username_2**: I think you'd need a [custom filter](https://video.stackexchange.com/questions/15962/video-transitions-and-filters-how-to-create-custom-ones?rq=1) to accomplish that. You might find [this](https://github.com/hudl/HudlFfmpeg/wiki/Creating-Custom-Filters) useful.  

---

## 1 answers

### Answer by username_3 on 2017-09-23. Score: 2

This needs a slightly elaborate filtergraph to do as described.
-filter_complex
    "[0]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-DUR0)/D':enable=gte(t,DUR0)[ob1];
     [ob1][b2]overlay=x='W/2+(W/2)*(t-DUR0)/D':enable=gte(t,DUR0)[fv]
    "

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:
blend=all_expr='if(lte((W/2-abs(X-SW*W/2))/(SW*W/2),(T-S)/D),B,A)'

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.


---

