Go to content Go to navigation Go to search

Kubuntu WebCam: Finally · Mar 3, 12:45 AM by Dylan Doxey

Okay, I’ve finally got a webcam working on my Kubuntu machine.
This is thanks to the latest version of the GSPCA (formerly spca5xx) driver.

Note to self (and the world): Don’t expect Adept or Synaptic to always provide you with the latest version of whatever. As for the case of the SPCA webcam driver, it is currently still offering an old version.
Download the source directly from: http://mxhaard.free.fr/spca50x/Download/?M=D.

First I uninstalled the old spca5xx source code via Synaptic. Then I used my keyboard and my brain to put the new GSPCA source code at /usr/src/modules/gspca/. I ran make and make install, and then modprobe -v gspca.
For the first test I ran mplayer using options which I had cut & pasted from somewhere.

Wow, it was working. Okay, it was just a fluorescent green rectangle with some shifting diagonal lines when I waved my hand, but it was definite progress!

prompt:~$ sudo mplayer tv:// -tv driver=v4l:width=288:height=176:device=/dev/video0
MPlayer 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8© 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Newcastle; Athlon 64 X2 Manchester (Family: 15, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

91 audio & 204 video codecs
Opening joystick device /dev/input/js0
Can’t open joystick device /dev/input/js0: No such file or directory
Can’t init input joystick
Setting up LIRC support…
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing tv://.
Selected driver: v4l name: Video 4 Linux input author: Alex Beregszaszi comment: under development
Selected device: Logitech QuickCam EC Capabilites: capture Device type: 1 Supported sizes: 160×120 => 352×288 Inputs: 1 0: SPCA561: (tuner:0, norm:pal)
Using input ‘SPCA561’
Selected input hasn’t got a tuner!
======================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request – 288 × 176 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined – no prescaling applied.
VO: [xv] 288×176 => 288×176 Planar YV12
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
======================================================================
Audio: no sound
Starting playback…
ioctl mcapture failed: Invalid argument
ioctl mcapture failed: Invalid argument
ioctl mcapture failed: Invalid argument
ioctl mcapture failed: Invalid argument
V: 0.0 1/ 1 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V: 0.0 2/ 2 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V: 0.1 3/ 3 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V: 0.1 4/ 4 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
...

Again, I decided to apply my brain and my keyboard. For some reason I beleived that the camera output probably has a 6×9 ratio. So I adjusted the mplayer options accordingly and tried again.

prompt:~$ sudo mplayer tv:// -tv driver=v4l:width=900:height=600:device=/dev/video0

That worked.

So, here’s what it looks like using Kopete to share video with a remote user on MSN Messenger client and win2k.
GSPCA Webcam Demo

On the left is MSN Messenger with a Veo Mobile Connect (0×0545, 0×8135). On the right is Kopete with a Logitech QuickCam Express (0×046d, 0×092f Rev 0.00).

Commenting is closed for this article.