How to join two movies side by side
This code allows you to stitch together two movies side by side using ffmpeg. This should be done in the command line in the directory where two movies, left.mp4 and right.mp4, are located. Changing the scale and size changes the resolution. Documentation.
ffmpeg -i left.mp4 -i right.mp4 -filter_complex "
nullsrc=size=2000x1000 [background];
[0:v] setpts=PTS-STARTPTS, scale=1000x1000 [left];
[1:v] setpts=PTS-STARTPTS, scale=1000x1000 [right];
[background][left] overlay=shortest=1 [background+left];
[background+left][right] overlay=shortest=1:x=1000 [left+right]
" -map "[left+right]" output.mp4