2 Feb 2008

Linux and Logitech QuickCam Pro 9000

I've been on the lookout for a decent webcam. After some searching, the choice fell on Logitech QuickCam Pro 9000, which should be supported according to the Linux UVC driver page. It's not one of the cheaper models, but not the most expensive either. It also has "HD-quality" (which in this case translates to resolution up to 1600x1200). So how does this camera works under Linux?

My first thought after unwrapping was "Is that it?". It was smaller than I had anticipated. But when it comes to webcam, smaller is better I guess.

Ubuntu 7.10 (i386) ships with UVC drivers, but they are too old. So we install new ones from trunk:

(Update! This webcam works out of the box on Ubuntu 8.04)

  $ svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk
  $ cd trunk
  $ make
  $ sudo make install

When we now plug in the camera, it's detected properly:

  $ dmesg
  ...
  [14323.676000] usb 5-1: new high speed USB device using ehci_hcd and address 7
  [14323.932000] usb 5-1: configuration #1 chosen from 1 choice
  [14324.056000] Linux video capture interface: v2.00
  [14324.168000] usbcore: registered new interface driver snd-usb-audio
  [14324.180000] uvcvideo: Found UVC 1.00 device  (046d:0990)
  [14324.196000] usbcore: registered new interface driver uvcvideo
  [14324.200000] USB Video Class driver (v0.1.0)

  $ lsusb
  ...
  Bus 005 Device 007: ID 046d:0990 Logitech, Inc.

We see the modules are loaded:

  $ lsmod | grep uvc
  uvcvideo               48644  0
  compat_ioctl32          2304  1 uvcvideo
  videodev               29312  1 uvcvideo
  v4l1_compat            15364  2 uvcvideo,videodev
  v4l2_common            18432  2 uvcvideo,videodev
  usbcore               138632  10 snd_usb_audio,uvcvideo,snd_usb_lib,hci_usb,appleir,xpad,usbhid,ehci_hcd,uhci_hcd

The camera also has a built in microphone, which is detected and works (number #1 here):

  $ cat /proc/asound/cards
   0 [Intel          ]: HDA-Intel - HDA Intel
                        HDA Intel at 0x90440000 irq 21
   1 [U0x46d0x990    ]: USB-Audio - USB Device 0x46d:0x990
                        USB Device 0x46d:0x990 at usb-0000:00:1d.7-1, high speed

Time for testing!

A capable webcam viewer is luvcview. It has the ability to take snapshot (photos), record video (avi), change resolution etc. We download and install luvcview from here.

One nice feature is to list all supported resolutions:

  $ luvcview -L
  luvcview version 0.2.1
  Video driver: x11
  A window manager is available
  video /dev/video0
  /dev/video0 does not support read i/o
  { pixelformat = 'MJPG', description = 'MJPEG' }
  { discrete: width = 160, height = 120 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 176, height = 144 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 320, height = 240 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 352, height = 288 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 640, height = 480 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 800, height = 600 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 960, height = 720 }
          Time interval between frame: 1/15, 1/10, 1/5,
  { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }
  { discrete: width = 160, height = 120 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 176, height = 144 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 320, height = 240 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 352, height = 288 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 640, height = 480 }
          Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 800, height = 600 }
          Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
  { discrete: width = 960, height = 720 }
          Time interval between frame: 1/10, 1/5,
  { discrete: width = 1600, height = 1200 }
          Time interval between frame: 1/5,

1600x1200 is bigger than my screen here, so 960x720 will have to do. I had to disable SDL hardware acceleration to use resolution above 800x600, or else luvcview crashed:

  $ luvcview -w -s 960x720

The colors look good, it adapt well to light and I've had no stability issues (yet). The camera also works with ekiga (gnomemeeting):

Kopete:

And Skype (2.0 beta) (the microphone also works):

No comments: