Linux - 17 - Webcam

My webcam page is powered by Linux. This is how i managed it.

First job. Recompile kernel with USB support, something i though't i'd never need.

Next find out what webcam thinks it is.

  %lsusb
  Bus 002 Device 001: ID 0000:0000 Virtual Hub
  Bus 001 Device 001: ID 0000:0000 Virtual Hub
  Bus 001 Device 002: ID 046d:0840 Logitech Inc. QuickCam Express
  

Download, compile and install Quickcam express driver from the qce-ga sourceforge project.

Write a small setup script /etc/rc.d/rc.quickcam, add reference to script to main setup.

#!/bin/bash

QCBIN="/usr/local/bin"
QCVID="/dev/video1"

echo "Starting logitech quickcam driver"

# check module loaded
/sbin/modprobe quickcam

$QCBIN/qcset $QCVID equalize=1
$QCBIN/qcset $QCVID adaptive=1

Check it works. Note, i'm only using /dev/video1 because /dev/video0 is my TV card. Your setup may be different.

xawtv -c /dev/video1

Yes, it works. Find webcam software. Found a package called webcam already installed. Change configure script to upload to server (via SSH!, not ftp!).

Hacked a bit of Javascript to do an image refresh. Also created floating window. See page.

Done! Wow! In less than an hour.