To make a UV4L WebRTC client for KMS, i am trying to run a USB camera on RPI2 with the UV4L driver, I Tried with the Microsoft lifeCam, which is UVC compliant. Tutorials only show this working with raspicam, so I'm also sharing my findings.
I installed following packages :
sudo apt-get install uv4l uv4l-server uv4l-uvc uv4l-server uv4l-webrtc uv4l-xmpp-bridge
Here is the
dmesg output on camera plug :
[60766.138060] usb 1-1.4: new high-speed USB device number 8 using dwc_otg [60766.272514] usb 1-1.4: New USB device found, idVendor=045e, idProduct=0772 [60766.272561] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [60766.272578] usb 1-1.4: Product: Microsoft\xffffffc2\xffffffae\xffffffae LifeCam Studio(TM) [60766.272594] usb 1-1.4: Manufacturer: Microsoft [60766.275111] uvcvideo: Found UVC 1.00 device Microsoft\xffffffc2\xffffffae\xffffffae LifeCam Studio(TM) (045e:0772) [60766.275130] uvcvideo: Forcing device quirks to 0x80 by module parameter for testing purpose. [60766.275141] uvcvideo: Please report required quirks to the linux-uvc-devel mailing list. [60766.334638] input: Microsoft\xffffffc2\xffffffae\xffffffae LifeCam Studio(TM) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/input/input3 [60766.702641] hid-generic 0003:045E:0772.0003: hiddev0,hidraw1: USB HID v1.01 Device [Microsoft Microsoft\xffffffc2\xffffffae\xffffffae LifeCam Studio(TM)] on usb-3f980000.usb-1.4/input4
and then invoque uv4l :
uv4l --syslog-host localhost --driver uvc --device-id 045e:0772 <notice> [core] Trying driver 'uvc' from built-in drivers... <warning> [core] Driver 'uvc' not found <notice> [core] Trying driver 'uvc' from external plug-in's... <notice> [driver] Video functionality 'Microsoft? LifeCam Studio(TM)' recognized at 045e:0772 <notice> [core] Device detected! <notice> [core] Registering device node /dev/uv4l
I Changed one config file line :
sudo vim /etc/uv4l/uv4l-raspicam.conf
driver = uvc
Now I can connect to
http://builtinfab.local:8080/stream/webrtc and see the video display (great).
I would like to go further in configuration, especially being able to tune XMPP parameters, BUT seems like changes have no effect when editing
/etc/uv4l/uv4l-raspicam.conf, even after killing
sudo pkill uv4l & restart.
Someone has any idea about that ? Should I create another config file or rename it ?
EDIT : I found it.
Just needed to add i.e.
--config-file=/etc/uv4l/uv4l-uvc.conf to the uv4l command.