0

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?

0

I think I've just found a solution:

ffmpeg -i /dev/video0 -i /dev/video1 -s 1280x720 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -filter_complex hstack -f v4l2 /dev/video2

It works. Now I can show two cameras in a video conference.

But camera #0 show a delay (almost 1s) related to the second camera. How could I solve this delay problem on the first camera, without adding a delay to the second camera.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.