user11793: 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)


user1760: Using crop and 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.


user1871: 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.

11793: <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.stack.imgur.com/k2UeY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/k2UeY.png" alt="enter image description here"></a></p>
 1760: <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>
 1871: <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>
