1

I'd like to be able to capture input from a webcam to to separate programs. One for VoIP, and one for capture.

The problem is - Linux will allow only one process to access a V4L2 device, so once I run the videochat, the capture will get black frames, if I start the capture program first, the videochat will get black frames.

How can I solve this? Is there a way to allow multiple processes to access a single /dev/video device? Or maybe I can clone the /dev/video0 and create a /dev/video1 somehow?

0

You could use v4l2loopback to create multiple virtual devices, one per program that wants access to the stream, and then use a program such as tee to forward the video to the virtual devices.

  • Could you point me to some sources on how do I do this? I have no idea how v4l2loopback works. – unfa Jan 1 '18 at 21:07
  • I have tried using g-streamer solution, but and it gave me a cloned /dev/video1, but /dev/video0 didn't work, so gain. I wasn't able to create 2 cloned devices. – unfa Jan 10 '18 at 10:21

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.