LWN.net Logo

Configuring your webcam to work under Linux (Linux.com)

Bruce Byfield works with web cameras on Linux.com. "If you want the old-time GNU/Linux experience, try configuring a Web camera. Unlike most peripherals, webcams are generally not configured during installation. Moreover, where printers have the Common Unix Printing System (CUPS) and its interfaces, with webcams you are generally thrown back on whatever resources you can find on the Internet and your own knowledge of kernel modules and drivers. These obstacles means that configuring webcams can be a challenge -- but with determination and thoroughness, and maybe a little luck, you can get your webcam running in less than an afternoon. The best scenario for configuring a webcam is when you buy an external one."
(Log in to post comments)

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 7:29 UTC (Fri) by Los__D (subscriber, #15263) [Link]

That depends quite a lot on the webcam, distribution and application, I think... My Creative (something -X I think, doesn't have it here, not too old) Webcam worked by just plugging it into Ubuntu...

In Ekiga, I selected V4L, and everything was peachy. Only thing was that I tried V4Lv2 first, that didn't work, then I of course tried the old one, bingo.

OTOH, getting the surveillance/recording applications to work was not very funny, crashes, no detection, painful config and so on...

Some good experiences too

Posted Sep 7, 2007 8:30 UTC (Fri) by rvfh (subscriber, #31018) [Link]

I monitored my cat while on holidays just by plugging in my Philips
TOUCAM Pro to my Ubuntu web server (a 233MHz laptop!) and installing
motion. Maybe I am lucky!

Some good experiences too

Posted Sep 7, 2007 8:40 UTC (Fri) by Los__D (subscriber, #15263) [Link]

I'll try that one, thx!

(Can't remember if motion was one of those I tried, it was around 1 year ago, and I have the memory of a goldfish...)

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 11:52 UTC (Fri) by muwlgr (guest, #35359) [Link]

Suppose you are unfamiliar with your new [web]cam. You do lsusb, you get vendor and device id, you put them into Google (add word "linux" to taste), and you certainly find either how to make it work or that it is not supported under Linux.
Unfortunately there are too many disparate APIs - v4l, v4l2, dv over ieee1394, and sane, and not every software supports them all.
(there are similar problem with Windows, as it does not treat ieee1394-cameras as TWAIN sources and requires special soft to work with them).

On the other way, CUPS suffers heavily from excessively layered and componentized design which requires oneself to have too big head to diagnose and troubleshoot it. What component crashes on you today ?

Btw, anybody knows how to make HP ScanJet 2400C work under Linux ?

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 13:00 UTC (Fri) by tetromino (subscriber, #33846) [Link]

> You do lsusb, you get vendor and device id, you put them into Google (add word "linux" to taste), and you certainly find either how to make it work or that it is not supported under Linux.
That will only work if you are very lucky. It seems the manufacturer of my webcam has kept on using the same usb device id despite several major updates to their hardware. As a result, my webcam is "supported" by a whole bunch of different drivers, only 2 of which work with 2.6.22, and only one of which actually outputs an image.

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 17:19 UTC (Fri) by iabervon (subscriber, #722) [Link]

My HP PSC 2410 Photsmart works with xsane using hplip. Dunno how similar they actually are, but try hplip.

Kernel support

Posted Sep 7, 2007 9:00 UTC (Fri) by eru (subscriber, #2753) [Link]

About 2 years ago, I bought a Logitech express webcam and got it working fairly effortlessly with the SPCA5xx driver mentioned in the article, but there was the usual build-a-module hassle, which probably would have made installation intractable to a non-hacker type of Linux user. It seems the SPCA5xx driver supports a large number of cheap cams (even more now than it did then), so if it were in the standard kernel, Linux would be a lot more friendly to this kind of increasingly common hardware. I wonder why it is not there?

An idea for some Linux-related organization (eg Linux foundation): start issuing "Works with Linux" certifications and stickers to manufacturers whose gear has a working driver in mainline kernel sources.

Kernel support

Posted Sep 7, 2007 10:16 UTC (Fri) by mjg59 (subscriber, #23239) [Link]

It's not in the mainline kernel for two reasons - firstly, the author doesn't especially want it to be and so hasn't pushed it, and secondly because the coding style is nowhere near kernel standards.

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 11:56 UTC (Fri) by robert_s (guest, #42402) [Link]

We actually have to thank Microsoft for something here.

All webcams that want to use the 'Designed for Vista' logo must implement the USB video class.

So soon the UVC driver should be all that's needed in most cases.

http://en.wikipedia.org/wiki/USB_video_device_class

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 10, 2007 11:30 UTC (Mon) by ekj (subscriber, #1524) [Link]

Agreed. Now that USB Video Class exists, you should *definitely* refuse to buy any webcamera that isn't.

That way it'll work without hassle in any modern operating-system.

Besides, standards for these things are the right way to go. USB-mass-storage for example, means that any usb-storage-widget tends to "just work" everywhere. What is not to like ?

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 14:38 UTC (Fri) by mgross (subscriber, #38112) [Link]

Webcam's on linux have been painful for me to watch. Why does it have to suck so bad, or for so long? Its almost 2008 and V4L has been around since ~2000. Shouldn't this be a solved problem by now?

I have been fighting to get video streaming out of the V4L2 / SPCA5xx driver and the best I've ever gotten is a preview mode stream with bad image quality (note these types of camers need the host to control brightness and white ballance). Worse I go to web and look for utilites and libraries and the newest stuff I can find for V4L2 is dated 2003! Oh, and its not too stable eiter, with hangs and crashes comming from the device or stack.

note: I have had just started (last weekend) good luck with a newer camera using the UVC driver so there is hope. However i was only able to find one test applicaiton that could open the UVC (a logitec)camera. It shows a lot of potenial.

No lib's or API's located yet (but given that I've just started with the UVC camera it could be that I haven't stumbled over the propper web page yet.)

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 16:13 UTC (Fri) by cortana (subscriber, #24596) [Link]

I guess it is because there is no standard interface for capturing video from USB devices. As a previous poster mentioned, support for the USB video device class is a mandatory requirement for products to display the 'designed for Windows Vista' logo, so this problem will go away soon, I hope.

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 7, 2007 16:50 UTC (Fri) by JoeBuck (subscriber, #2330) [Link]

So every "Designed for Vista" webcam will work under Linux?

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 8, 2007 20:44 UTC (Sat) by Shizam (guest, #27011) [Link]

A list of UVC features and devices supported under Linux can be found at the UVC driver & tools
page maintained by Laurent Pinchart: http://linux-uvc.berlios.de

Configuring your webcam to work under Linux (Linux.com)

Posted Sep 14, 2007 19:40 UTC (Fri) by fred (subscriber, #14141) [Link]

Here is the list of Webcams devices on Hardware4Linux.info:

http://hardware4linux.info/type/161/
--
Fred - May the source be with you

Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds