Answers.Body: <p>Using <a href="https://ffmpeg.org/ffmpeg-filters.html#crop" rel="noreferrer">crop</a> and <a href="https://ffmpeg.org/ffmpeg-filters.html#vstack" rel="noreferrer">vstack</a>:</p>
  
  <pre><code>ffmpeg -i input -filter_complex \
  "[0:v]crop=iw/3:ih:0:0[left]; \
   [0:v]crop=iw/3[center]; \
   [0:v]crop=iw/3:ih:ow*2:0[right]; \
   [left][center][right]vstack=inputs=3[v]" \
  -map "[v]" -map 0:a -c:a copy output 
  </code></pre>
  
  <ul>
  <li><p>vstack is faster than pad + overlay.</p></li>
  <li><p>If your <code>ffmpeg</code> is too old for the vstack filter then just <a href="https://ffmpeg.org/download.html" rel="noreferrer">download a recent build</a>.</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-09T02:05:02.567Z
Answers.LastActivityDate: 2015-10-09T02:16:51.923Z
Answers.LastEditDate: 2015-10-09T02:16:51.923Z
Answers.UserDisplayName: llogan
Answers.Body: <p>This should do it:</p>
  
  <pre><code>ffmpeg -i input.mp4 \
  -filter_complex "[0:v] crop=iw/3:ih:0:0,pad=iw:2*ih [left]; \
   [0:v] crop=iw/3:ih:(iw/3)+1:0 [middle]; \
   [0:v] crop=iw/3:ih:(2*iw/3)+1:0 [right]; \
   [left][middle] overlay=0:main_h/2,pad=iw:(3*ih/2) [out1]; \
   [out1][right] overlay=0:(2*main_h/3) [fout] " \
    -c:v libx264 -an -map "[fout]" trisected-vertical-overlay.mp4
  </code></pre>
  
  <p>I haven't supplied any specific video or audio encoding parameters. This just shows the overlay filter to use. You'll have to encode and map the audio, as needed.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-06T07:53:55.120Z
Answers.LastActivityDate: 2015-10-06T07:53:55.120Z
Answers.UserDisplayName: Gyan
Body: <p>I want to crop the video at some position and move the part next to the part that wasn't cropped. (See image, it explains better)</p>
  
  <p><a href="https://i.sstatic.net/k2UeY.png" rel="noreferrer"><img src="https://i.sstatic.net/k2UeY.png" alt="enter image description here"></a></p>
  
Tags: <video-editor><ffmpeg>
Title: How do I move (rearrange) the orientation of a video? Using ffmpeg
UserDisplayName: นพดล คำมิตร
ThreadText: # How do I move (rearrange) the orientation of a video? Using ffmpeg
  
  (Asked by: username_0 on 2015-10-06)
  
  I want to crop the video at some position and move the part next to the part that wasn't cropped. (See image, it explains better)
  
  [![enter image description here](https://i.sstatic.net/k2UeY.png)](https://i.sstatic.net/k2UeY.png)
  
  **Tags:** video-editor, ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-10-06. Score: 7 | Accepted answer
  
  This should do it:
  
  ```
  ffmpeg -i input.mp4 \
  -filter_complex "[0:v] crop=iw/3:ih:0:0,pad=iw:2*ih [left]; \
   [0:v] crop=iw/3:ih:(iw/3)+1:0 [middle]; \
   [0:v] crop=iw/3:ih:(2*iw/3)+1:0 [right]; \
   [left][middle] overlay=0:main_h/2,pad=iw:(3*ih/2) [out1]; \
   [out1][right] overlay=0:(2*main_h/3) [fout] " \
    -c:v libx264 -an -map "[fout]" trisected-vertical-overlay.mp4
  
  ```
  
  I haven't supplied any specific video or audio encoding parameters. This just shows the overlay filter to use. You'll have to encode and map the audio, as needed.
  
  
  ---
  
  ### Answer by username_1 on 2015-10-09. Score: 4
  
  Using [crop](https://ffmpeg.org/ffmpeg-filters.html#crop) and [vstack](https://ffmpeg.org/ffmpeg-filters.html#vstack):
  
  ```
  ffmpeg -i input -filter_complex \
  "[0:v]crop=iw/3:ih:0:0[left]; \
   [0:v]crop=iw/3[center]; \
   [0:v]crop=iw/3:ih:ow*2:0[right]; \
   [left][center][right]vstack=inputs=3[v]" \
  -map "[v]" -map 0:a -c:a copy output 
  
  ```
  
  * vstack is faster than pad + overlay.
  * If your `ffmpeg` is too old for the vstack filter then just [download a recent build](https://ffmpeg.org/download.html).
  
  
  ---
  
  