Webcams are everywhere these days: they’re standard on a lot of laptops, LCD monitors are starting to incorporate them, and decent standalone USB webcams can be had for less than $40. In this two-part series we’ll set up a Webcam on Linux, and then use it to perform a number of amazing and fun tasks.
You won’t get television-quality video with an inexpensive Webcam; you’ll get small fuzzy herky-jerky. But it’s acceptable herky-jerky. A low-end Webcam typically supports 15 frames per second at 320 x 240 pixels. For comparison, movies run at 24 fps. Spending a bit more money will get you some silky smooth video. One example is the Logitech QuickCam Pro 9000. For $99.99 you get a built-in microphone, autofocus, good-quality optics, 30 frames per second, and high-quality video capture size up to 960 x 720 pixels.
It takes more than a good Webcam to get good performance. You should have a modern PC, dual-core if possible, because all that video processing takes some horsepower. A typical minimum bandwidth requirement for smooth video is 256 kbps both ways.
Linux support for Webcams is pretty good, thanks to a number of hardy Linux developers. As usual, the vendors themselves have no interest in supporting anything but MS Windows. Michel Xhaard, with little help, figured out how to support over 250 different Webcams from a common base driver. This base driver, GSPCA/SPCA5xx, is now included in Debian and its offspring. The good folks at Linux UVC driver and tools support a different set of Webcams, and the nice people at Philips USB Webcam Driver for Linux keep it maintained, even though it supports mostly older devices.
The bad news is “pretty good” means you may still have to compile and manually install drivers, and perform other manual tweakages. Just like the good old days.
If you’re still shopping, first find out what works best on your own particular Linux distribution. Mandriva is probably the Webcam-friendliest Linux. Logitech Webcams are the most popular, but not all of them have native Linux drivers.
If you’re using an inherited Webcam, you may get lucky and it will work as soon as you connect it. Here is the short way:
If Camorama doesn’t work, try the Testbed account in Kopete. Figure 1 shows me and my best friend in Kopete.
Figure 1 shows a problem with integrated Webcams: you have to adjust your whole screen to frame your image. I was sitting tall, too.
Camorama does not support v4l2, which is unfortunate because v4l2 has a lot of improvements and bugfixes over version 1. The Ubuntu forums are full of users asking what the “could not connect to video device (dev/video0)” error message means when they try to use Camorama. One reason is they’re using a driver that requires v4l2, or they don’t have v4l installed.
On a modern Linux distribution, udev and HAL should detect the Webcam, create /dev/video0 with the correct permissions, owner root and group video, and load the correct kernel module. If you are not in the “video” group, add yourself, then logout and log back in. Run the id command with no options to make sure. Run lsmod to verify that the correct kernel module loaded.
My own Webcam is built into a Viewsonic VX2255 LCD monitor. This monitor also has a built-in microphone. The Webcam requires a USB cable, so I connected it and ran these commands to see if Kubuntu Gutsy recognized it:
$ lsusb Bus 005 Device 002: ID 04f2:b021 Chicony Electronics Co., Ltd $ dmesg [20093.973828] usb 5-8: new high speed USB device using ehci_hcd and address 2 [20094.211937] usb 5-8: configuration #1 chosen from 1 choice [20094.318310] Linux video capture interface: v2.00 [20094.341023] uvcvideo: Found UVC 1.00 device ViewSonic 1.3M, USB2.0 Webcam (04f2:b021) [20094.344865] usbcore: registered new interface driver uvcvideo [20094.345151] USB Video Class driver (v0.1.0)
That reveals that this Webcam is supported by the uvcvideo kernel module, and if I need to do a Web search for more information I have the Super Secret Webcam Name and Number. Take that, Viewsonic! Remember that dmesg updates as you plugin or remove peripherals, so its most recent output always shows the latest activity. If dmesg doesn’t see a device, then the kernel does not see it, and you’re probably out of luck.
Come back next week and we’ll get cracking on some fun stuff, such as spying on people and displaying ourselves on the Internet. Please visit Resources for all manner of helpful links.
Carla Schroder is the author of the Linux Cookbook and the newly-released Linux Networking Cookbook, and is a regular contributor to LinuxPlanet.
This article was first published on LinuxPlanet.com.
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
FEATURE | By Samuel Greengard,
November 05, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
FEATURE | By Cynthia Harvey,
October 07, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020
Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.
Advertise with TechnologyAdvice on Datamation and our other data and technology-focused platforms.
Advertise with Us
Property of TechnologyAdvice.
© 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this
site are from companies from which TechnologyAdvice receives
compensation. This compensation may impact how and where products
appear on this site including, for example, the order in which
they appear. TechnologyAdvice does not include all companies
or all types of products available in the marketplace.