I am new in using the emulator qemu and I'm trying to make use of it to emulate the raspbian system, which is used in the raspberry pi, but I do not know how to use my camera usb in it. Could anyone help me ?
As of October 2019 we now have Qemu 4.1.0 and -usbdevice in goe's answer is deprecated.
So, the advice is to use the new option -device usb... and probably your camera is high-speed so you must use usb-ehci, otherwise you'll get a speed mismatch error.
That said, I launch a VM with the integrated Webcam from my laptop with:
qemu-system-x86_64 -enable-kvm -m 2048 -rtc base=localtime -hda /path/win7.img -cpu host -soundhw hda -usb -device usb-ehci,id=ehci -device usb-host,hostbus=1,hostaddr=3
hostbus=1,hostaddr=3 is from:
lsusb
...
Bus 001 Device 003: ID 0408:2fb1 Quanta Computer, Inc.
...
and I know that from:
sudo dmesg |grep -i webcam
...
[ 5594.955703] uvcvideo: Found UVC 1.00 device Laptop_Integrated_Webcam_2HDM (0408:2fb1)
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With