2

The goal is:

  1. Create a virtual USB web camera on Linux machine / Guest VM.
  2. Connect it to a Windows machine / host.

Unfortunately, there is no way of using any hardware connections.

The plan is:

  1. Use Linux as a simulated virtual USB device as shown in this tutorial. They use a Raspberry Pi with a real hardware camera connected to the Pi, but the idea is to use the software part and feed virtually crafted frames instead of using a real one.
  2. Now the VM should behave as a real hardware USB web camera, when it is connected to a USB master.

So, there are three ways, as far as I'm concerned (which both lead to a dead end with my level of knowledge):

  1. Somehow connect the VM as a USB slave to the Windows host machine. It seems impossible, since there will be a need of faking a USB connection on the physical USB bus.
  2. Create another VM, which will serve as a buffer. Somehow connect the WebCam VM to the Buffer VM and then use USBIP protocol to pass it into the Windows Host.
  3. Somehow virtually connect a USB host device to the WebCam VM, which should make the VM behave as a USB slave, and proxy everything via USBIP.

2 and 3 really are really similar and seem like the only way out. But I don't know if it could be done without writing any low-level driver stuff.

Help, please? I might be overcomplicating, but there seems to be no way to emulate a USB camera connection on Windows except for writing your own driver, which is exactly the thing I'm trying to avoid.

winwin
  • 141
  • 4
  • Does it have to be USB? You may connect the USB to a TCP port with `socat`, see: https://unix.stackexchange.com/a/201763/123460 - then just use the NAT between host and guest. Still give out the raw stream. – FelixJN Jan 22 '22 at 18:55
  • @FelixJN yeah, I wish I needed the raw stream itself, man. I really wish. Windows needs to see it as a valid USB video device and receive the stream this way. – winwin Jan 22 '22 at 19:07

0 Answers0