« Escapepodder - New feeds found | Main | More Webcamming »
Monday, January 15, 2007
Installing a Webcam in Ubuntu Edgy
Here are my notes about how to install a webcam in Ubuntu Edgy. Please note that I am not yet successful, but I have made some progress so that hopefully someone will find this somewhat useful.
- Read this page first. Also check out this page, which is more specific to my camera (see below).
- Modify the /etc/apt/sources.list file by typing "sudo vi /etc/apt/sources.list".
- Make sure that the universe repository is uncommented.
- Add 'deb http://blognux.free.fr debian unstable main' to install easycam.
- Run 'sudo apt-get update' to update the software listings
- Run 'sudo apt-get install easycam'
- Run 'sudo apt-get install camorama'.
- Run 'sudo apt-get install xawtv'
You should be able to run easycam from the System->Administration menu. Unfortunately, my cam (ID 2770:9120 NHJ, Ltd Che-ez! Snap / iClick Tiny VGA Digital Camera) wouldn't autodetect. Looks like someone has here.
I changed /usr/share/EasyCam2/drivers/sqcam to comment out sq905.c, line 855 (USB owner).
Replace the line:
- if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
with:
- if (remap_pfn_range(vma, start, page >> PAGE_SHIFT, PAGE_SIZE, PAGE_SHARED)) {
Save and close. Compile with 'sudo make'.
If that doesn't work due to a missing build directory, do the following:
- cd /lib/modules/2.6.17-11-386 (or whatever uname -r gives you)
- mkdir build
- cd build
- sudo ln -s /boot/config-2.6.17-11-386 .config (Fix as appropriate)
$ sudo cp sqcam.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/ (I had to create the media directory)
$ sudo depmod -a (this command took a long time to execute)
$ sudo modprobe sqcam
I had to reboot once after playing with the driver. If you need to replace the driver, use 'sudo modprobe -r sqcam' to remove the driver, before recopying the driver.
I tested with xawtv, as it seemed to detect everything better. I then added a script to take shots with streamer:
- streamer -o xxx.jpeg
Streamer seems to like the jpeg extention better, so I just used that command, then renamed the resulting file to jpg.
