Skip to main content
added command for further use case
Source Link
Gyan
  • 33.8k
  • 3
  • 58
  • 97

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Edit: this command below scales and pads the output to 2000x2000

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack,\
scale=iw*min(2000/iw\,2000/ih):ih*min(2000/iw\,2000/ih), \
pad=2000:2000:(ow-iw)/2:(oh-ih)/2[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Edit: this command below scales and pads the output to 2000x2000

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack,\
scale=iw*min(2000/iw\,2000/ih):ih*min(2000/iw\,2000/ih), \
pad=2000:2000:(ow-iw)/2:(oh-ih)/2[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-complex_filterfilter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-complex_filter "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4
modified for single input
Source Link
Gyan
  • 33.8k
  • 3
  • 58
  • 97

Just integrate all filtering into one command:

ffmpeg -i input-left.mp4 -i input-right.mp4 \
-complex_filter "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[1[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

(I have skipped explicit audio mapping as you have not stated what you want done or what the input audio looks like)

Just integrate all filtering into one command:

ffmpeg -i input-left.mp4 -i input-right.mp4 \
-complex_filter "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[1:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" output_3dv.mp4

(I have skipped explicit audio mapping as you have not stated what you want done or what the input audio looks like)

Just integrate all filtering into one command:

ffmpeg -i input.mp4 \
-complex_filter "[0:v]crop=in_w/2:in_h:0:0 [top]; \ 
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4
Source Link
Gyan
  • 33.8k
  • 3
  • 58
  • 97
Loading