VirtualBox USB webcam not passing to guest

Discussions about using Linux guests in VirtualBox.
Post Reply
f00dl3
Posts: 1
Joined: 15. Dec 2019, 21:53

VirtualBox USB webcam not passing to guest

Post by f00dl3 »

So I got a tricky one here.

I have a Logitech C615 HD webcam attached via USB to my host OS and I'm trying to get it to show in the guest OS, but it's not working right.

On the host, if I do "VBoxManage list usbhost" I get the following result:
UUID:               2a969131-2370-42e0-b034-b8edbeb57df0
VendorId:           0x046d (046D)
ProductId:          0x082c (082C)
Revision:           0.17 (0017)
Port:               9
USB version/speed:  2/High
Manufacturer:       Logitech, Inc.
Product:            HD Webcam C615
SerialNumber:       8A882AA0
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10//device:/dev/vboxusb/003/005
Current State:      Captured
But if I do VBoxManage list webcams, it returns nothing:
~/src/codex/Java/asWeb$ VBoxManage list webcams
Video Input Devices: 0
I run the VM headless but I did in VirtualBox in the GUI attach and filter the device per instructions.

In the Guest machine, I do see 2 video devices in /dev/video:
~$ ls -al /dev/video*
crw-rw----+ 1 root video 81, 0 Dec 14 17:11 /dev/video0
crw-rw----+ 1 root video 81, 1 Dec 14 17:11 /dev/video1
However, if I try FFMPEG to RTSP /dev/video0, it just hangs, and gives the following message after I CTRL+C to exit it:
~$ sudo ffmpeg -y -i /dev/video0 -f image2 -filter:v fps=fps=8 -update 1 test.jpeg
Finishing stream 0:0 without any data written to it.
[swscaler @ 0x56328a8ae9c0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'test.jpeg':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 640x480, q=2-31, 200 kb/s, 8 fps, 8 tbn, 8 tbc
    Metadata:
      encoder         : Lavc57.107.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Exiting normally, received signal 2.
Any ideas what I'm doing wrong? I installed the virtualbox guest additions and extension pack on both host and guest.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox USB webcam not passing to guest

Post by socratis »

On my host and with my guest, it's working... Please read the following thread: USB basics and troubleshooting, all of the posts.

If you still have a problem after reading through the whole thing, please follow the advice of the last post, #8: Asking for help and post the information requested.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply