<p>Use</p>

<pre><code>ffmpeg -i video.mp4 \
       -filter_complex "[0:v]split=4[a][b][c][d]; \
                        [a]pad=iw+2*ih:iw+2*ih:ih:0:white[base]; \
                        [b]transpose=cclock[br]; \
                        [c]transpose=clock[cr]; \
                        [base][br]overlay=0:w[two]; \
                        [two][cr]overlay=W-w:w[three]; \
                        [three][d]overlay=h:H-h[v]" \
-map "[v]" out.mp4
</code></pre>

<p>As per your confirmation, I haven't rotated the video at the bottom. In case it had to be rotated 180, use</p>

<pre><code>ffmpeg -i video.mp4 \
       -filter_complex "[0:v]split=4[a][b][c][d]; \
                        [a]pad=iw+2*ih:iw+2*ih:ih:0:white[base]; \
                        [b]transpose=cclock[br]; \
                        [c]transpose=clock[cr]; \
                        [d]hflip,vflip[dr]; \ 
                        [base][br]overlay=0:w[two]; \
                        [two][cr]overlay=W-w:w[three]; \
                        [three][dr]overlay=h:H-h[v]" \
-map "[v]" out.mp4
</code></pre>

<p>There will be no audio exported with these commands. To preserve audio, insert <code>-map 0:a -c:a copy</code></p>

CC BY-SA 3.0
2016-03-29T07:33:26.963Z
2016-03-29T07:33:26.963Z
Gyan
<p>I was wondering is possible to from 1 video i copy 3 more, then rotate them all by 90 degrees, then move they center with ffmpeg commands? To be clearer what im saying here is picuture what i want to to do: <a href="https://i.sstatic.net/XvPPp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XvPPp.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2016-03-28T06:15:31.577Z
Can you illustrate the rotation aspect and then describe what kind of movement you would like?
Gyan
CC BY-SA 3.0
2016-03-28T07:40:44.917Z
@Mulvya first, i want to rotate all 3 videos for 120 degrees, so 1 video will be at 0 degrees, another at 120, another at 270, and last at 360 but that is same as 0 degrees, so when they all are rotated like that, i want to move them, like in the picture to get empty cube in middle of screen surrounded by 4 videos.
Vuzimir Samp
CC BY-SA 3.0
2016-03-28T08:50:52.313Z
Did you mean 90? The illustration shows orthogonal placement. So, video 1 is 0 degrees, video 2 is 90, video 3 is -90 and video 4 is 0. Is that right?
Gyan
CC BY-SA 3.0
2016-03-29T05:28:15.330Z
Yeah 90, and in middle i need to make a white space to be empty...
Vuzimir Samp
<video><ffmpeg><video-editor>
Ffmpeg video rotation and center
Vuzimir Samp
# Ffmpeg video rotation and center

(Asked by: username_0 on 2016-03-28)

I was wondering is possible to from 1 video i copy 3 more, then rotate them all by 90 degrees, then move they center with ffmpeg commands? To be clearer what im saying here is picuture what i want to to do: [![enter image description here](https://i.sstatic.net/XvPPp.png)](https://i.sstatic.net/XvPPp.png)

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

> **Comments:**
> **username_1**: Can you illustrate the rotation aspect and then describe what kind of movement you would like?  
> **username_0**: @Mulvya first, i want to rotate all 3 videos for 120 degrees, so 1 video will be at 0 degrees, another at 120, another at 270, and last at 360 but that is same as 0 degrees, so when they all are rotated like that, i want to move them, like in the picture to get empty cube in middle of screen surrounded by 4 videos.  
> **username_1**: Did you mean 90? The illustration shows orthogonal placement. So, video 1 is 0 degrees, video 2 is 90, video 3 is -90 and video 4 is 0. Is that right?  
> **username_0**: Yeah 90, and in middle i need to make a white space to be empty...  

---

## 1 answers

### Answer by username_1 on 2016-03-29. Score: 2

Use
ffmpeg -i video.mp4 \
       -filter_complex "[0:v]split=4[a][b][c][d]; \
                        [a]pad=iw+2*ih:iw+2*ih:ih:0:white[base]; \
                        [b]transpose=cclock[br]; \
                        [c]transpose=clock[cr]; \
                        [base][br]overlay=0:w[two]; \
                        [two][cr]overlay=W-w:w[three]; \
                        [three][d]overlay=h:H-h[v]" \
-map "[v]" out.mp4

As per your confirmation, I haven't rotated the video at the bottom. In case it had to be rotated 180, use
ffmpeg -i video.mp4 \
       -filter_complex "[0:v]split=4[a][b][c][d]; \
                        [a]pad=iw+2*ih:iw+2*ih:ih:0:white[base]; \
                        [b]transpose=cclock[br]; \
                        [c]transpose=clock[cr]; \
                        [d]hflip,vflip[dr]; \ 
                        [base][br]overlay=0:w[two]; \
                        [two][cr]overlay=W-w:w[three]; \
                        [three][dr]overlay=h:H-h[v]" \
-map "[v]" out.mp4

There will be no audio exported with these commands. To preserve audio, insert -map 0:a -c:a copy


---

