Concat two MP4 files (side by side) with FFmpeg I'm trying to concat two videos, side by side, using ffmpeg. One of them is 1280x720, and the other 1920x1080. One will be left, one will be right side. The higher resolution will be resized to the lower resolution one.

What is the command to do that?

I tried this command (they used 4 videos, I tried to edit it for 2), but somewhere is wrong and it cuts the first video:

ffmpeg -i activity.mp4 -i mobile.mp4 -filter_complex " nullsrc=size=2560x720 [base];[0:v] setpts=PTS-STARTPTS, scale=1280x720 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=1280x720 [upperright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=720" -c:v libx264 output.mp4
Use

ffmpeg -i activity.mp4 -i mobile.mp4 -filter_complex " nullsrc=size=2560x720 [base];[0:v] setpts=PTS-STARTPTS, scale=1280x720 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=1280x720 [upperright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=x=720" -c:v libx264 output.mp4


The shortest should be applied only to the first overlay.

Also, you can skip scale for the video which is already 1280x720. This output will only audio from one of the inputs.