[SOLVED] Passthough of a "webcam" created via gstreamer =>solid blue
Posted: 22. Jan 2020, 04:33
On a windows host, I can use "virtual camera" software like SplitCam and ManyCam and use a single Webcam on BOTH host and guest simultaneously. I want to do this with a linux host, but there is no Linux-software analogous which is analogous to SplitCam or ManyCam. However, there is a very powerful framework called gstreamer, which lets me easily create a v4l2loopback device, and the following one-line command takes the H.264-encoded stream from my Logitech C920 camera and puts it straight back into a new video device:
gst-launch-1.0 uvch264src device=/dev/video3 name=src auto-start=true src.vfsrc ! queue ! video/x-raw,format=YV12,width=320,height=240 ! queue ! \
v4l2sink device=/dev/video5
Here /dev/video3 is the Logitec c920, and /dev/video5 is a v4l2loopback device . The fact is that such devices can be opened for reading by mulitple processes at the same time. Indeed, on the Linux host, I can run skype, zoom, Ring Central and whereby.com all simultaneous -- feeding FOUR (4) separate applications from a single camera feed. This works seamlessly because that /dev/video5 device, created by the v4l2sink, **is** a video capture device, so it "just works". Please note that alhtough the C920 is a USB camera /dev/video 5 is not. But it is the stream of a webcam that happens to be virtual
I want to use this new video device in a windows guest. I have no choice but to use webcam passthrough, because /dev/video5 doesn't have a VID or PID. When I do, the camera showws perfectly the the Windows 10 guest, and in every application that needs a camera. The problem is that the video is a solid blue screen.
Should i expect this to work? Am I correct that there's no way I can shoehorn my situation into one where I'd use USB passthhrough?
Therefore I'm following the advice you gave , namely to run the command
VBoxManage debugvm Win7 log --release "+USB_WEBCAM.e.l2.l3,-USB_WEBCAM.restrict"
attach the /dev/video5 device and look at this put tp verifiy that is a pure blue square
I attach the VBox.log file. Perhaps it is the VERR_NOT_SUPPORTED there that is the problem. I thank you in advance for examining the .log file and letting me know what you find.
gst-launch-1.0 uvch264src device=/dev/video3 name=src auto-start=true src.vfsrc ! queue ! video/x-raw,format=YV12,width=320,height=240 ! queue ! \
v4l2sink device=/dev/video5
Here /dev/video3 is the Logitec c920, and /dev/video5 is a v4l2loopback device . The fact is that such devices can be opened for reading by mulitple processes at the same time. Indeed, on the Linux host, I can run skype, zoom, Ring Central and whereby.com all simultaneous -- feeding FOUR (4) separate applications from a single camera feed. This works seamlessly because that /dev/video5 device, created by the v4l2sink, **is** a video capture device, so it "just works". Please note that alhtough the C920 is a USB camera /dev/video 5 is not. But it is the stream of a webcam that happens to be virtual
I want to use this new video device in a windows guest. I have no choice but to use webcam passthrough, because /dev/video5 doesn't have a VID or PID. When I do, the camera showws perfectly the the Windows 10 guest, and in every application that needs a camera. The problem is that the video is a solid blue screen.
Should i expect this to work? Am I correct that there's no way I can shoehorn my situation into one where I'd use USB passthhrough?
Therefore I'm following the advice you gave , namely to run the command
VBoxManage debugvm Win7 log --release "+USB_WEBCAM.e.l2.l3,-USB_WEBCAM.restrict"
attach the /dev/video5 device and look at this put tp verifiy that is a pure blue square
I attach the VBox.log file. Perhaps it is the VERR_NOT_SUPPORTED there that is the problem. I thank you in advance for examining the .log file and letting me know what you find.