I have two videos (let's say 1.mp4 and 2.mp4). I would like to overlay only the top-right quarter of 2.mp4 onto 1.mp4.
The output would be a single video with the content from 1.mp4 in the top left, bottom left and bottom right, and the content from 2.mp4 in the top right.
(To be clear, I don't mean shrinking anything. The output would show only three quarters of the frame from 1.mp4 and only one quarter of the frame from 2.mp4)
Is it possible to do this with ffmpeg or something similar?
ffmpeg -i 1.mp4 -i 2.mp4 -lavfi " [1][0]scale=rw/2:rh/2[a]; [0][a]overlay=W/2:0 " -c:a copy out.mp4
, ffmpeg <7 →[1][0]scale2ref=main_w/2:main_h/2[a][b]; [b][a]overlay=main_w/2:0
ffmpeg -i 1.mp4 -i 2.mp4 -lavfi " [1]crop=iw/2:ih/2:iw/2:0[a]; [0][a]overlay=W/2:0 " -c:a copy /tmp/out.mp4