ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
ffmpeg \
-f lavfi -i testsrc=size=640x280 \
-f lavfi -i color=c=#ff9900:size=640x360 \
-t 5 \
-filter_complex "
nullsrc=size=640x640 [background];
[0:v] setpts=PTS-STARTPTS [top];
[1:v] setpts=PTS-STARTPTS [bottom];
[background][top] overlay=shortest=1 [background+top];
[background+top][bottom] overlay=shortest=1:y=280
" \
-y -t 5 test.avi