I've used
sudo modprobe v4l2loopback
to create a virtual camera #2. And I used
ffmpeg -i /dev/video0 -s 1280x720 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2
to redirect camera #0 to the virtual camera #2. I would like to redirect both cameras #0 and #1 to the virtual camera #2, side by side, or may be one on the top of the other. How can I do that?