6

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.

  • 1
    You can post your finding as an answer and accept it so that it helps others having the same problem. – dhruvvyas90 Dec 18 '15 at 12:26
  • @dastaan: Also worth noting, it will give the OP a rep boost to do so ;) – Jacobm001 Dec 18 '15 at 16:46
  • I tried installing the packages on a pi 3B running 4.4.26-v7+ #915 and it produced errors "E: Unable to location package *" where * is every package listed in the original post. What am I doing wrong ? – user501138 Nov 14 '16 at 22:33
3

I found it. Just needed to add i.e. --config-file=/etc/uv4l/uv4l-uvc.conf to the uv4l command, you will have to create the config file first.

3

Thanks, JP. I followed your instructions and got my Logitech cam streaming successfully. Just the following notes for anyone interested, based on my experience:

  • Did not need uv4l-xmpp-bridge (at least for basic streaming)
  • uvc driver configuration file defaults streaming to port 8090 (not 8080 as in your example).
  • Needed a powered USB hub to get my camera running (in case someone runs into the same problem).
  • uv4l loads cpu to ~12% when streaming (just saying).

I am using a RPI 2, Raspbian Jessie, uv4l 1.9.11.

Not the answer you're looking for? Browse other questions tagged or ask your own question.