Hari's Corner
Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and thenGetting the HP Pavilion 6314 in-built webcam working on Linux
Filed under:
Tutorials and HOWTOs by
Hari
Posted on Thu, Dec 20, 2007 at 20:04 IST (last updated: Wed, Oct 29, 2008 @ 21:53 IST)
make
, make install
and copy the module output file to the directory /lib/modules/2.6.x/
(substitute 2.6.x
for your kernel version).
Get the kernel headers
You should first install the kernel headers package. On my system this is currently the package namedlinux-headers-2.6.22-3
. Usually the package is named kernel-headers
or linux-headers
along with the version number. Choose the correct headers package matching your running kernel.
The command is
apt-get install linux-headers-2.6.22-3
Get the source code for uvcvideo
On Debian this package is namedlinux-uvc-source
. If you cannot find that package simply download the uvc sources from this website: http://linux-uvc.berlios.de/ and compile the driver like you would compile any other application.
On Debian (or Debian-like systems, e.g. Ubuntu) run:
This will automatically install module assistant and other necessary tools to simplify compiling and installing this driver.apt-get install linux-uvc-source
Install the driver module
Login or su as root and then run the following commands.That's it! This will automatically compile and install the kernel module required for this device. Then run modprobe to load the driver:m-a prepare m-a a-i linux-uvc
If you didn't get any error messages at this stage, you've successfully installed the driver! Otherwise check whether your compilation failed and why it did. module-assistant works 99.99% of the time on Debian since it automatically takes care of the necessary dependencies.modprobe uvcvideo
Now check the video output
To check whether video works, you can use ffmpeg. Install ffmpeg (if you haven't already) using apt-get. Then to test whether recording works via the webcam run something like this:It won't show anything while recording, but the blue LED near your webcam's lens show now glow. After you have recorded for a few seconds, quit ffmpeg and play back the temp.mpg file to check the video output. Obviously audio wouldn't have been captured in this case. But I can confirm the the built-in microphone on this laptop also works with ALSA, so you should merely have to specify the audio input parameter in ffmpeg. That's all. If I have missed out any steps or you have any questions regarding this HOWTO, just feel free to drop a comment here!ffmpeg -f video4linux2 -s pal -i /dev/video0 temp.mpg
Comments closed
The blog owner has closed further commenting on this entry.
4 comment(s)
Comment by Ramshankar (visitor) on Fri, Dec 21, 2007 @ 11:06 IST #
Comment by hari (blog owner) on Fri, Dec 21, 2007 @ 11:29 IST #
Comment by shadow.seeker (visitor) on Tue, Apr 1, 2008 @ 10:14 IST #
Comment by hari (blog owner) on Tue, Apr 1, 2008 @ 10:23 IST #