HowTos > Webcams

Why USB Camera?

Using USB camera as a surveillance device that can be managed remotely is a very nice use case. Today IP cameras are not affordable to everyone due to their higher prices, however with the Plug Computer and a simple USB camera that you didn't use long time it is possible to have "IP Camera".

Supported Webcams

in kernel 2.6.30 a lot of camera are supported, you just need to compile the kernel with correct modules and enable V4L USB devices.
Currently tested:

     * Logitech, Inc. Notebook Deluxe
     * Quantum DC-2120 (OmniVision Technologies, Inc. OV519 Webcam)
     * Logitech C120
     * PlayStation®Eye

Requirements Recommendation

 * Plug Computer loaded with Ubuntu 9.04 Ubuntu_9.0.4_Plug_Computer_Distribution
 * Kernel 2.6+ (recommended 2.6.29 + 2.6.30-rc5 patch)
 * Supported USB webcam
 * Apache web server

Compiling the kernel with the correct webcam driver

Please follow these instructions to compile 2.6.30-rc5 fresh kernel. before building the kernel edit the configuration with the following command:

make menuconfig ARCH=arm

Browse to Device Drivers->Multimedia Devices make sure the following are selected:

   * Video For Linux
   * Enable Video For Linux API 1
   * Video Capture Adapters
     V4L USB Devices -> (Select your appropriate camera driver)

Save the configuration and continue building the kernel.

Testing your camera

After booting the device with the resulted kernel image. simply install dov4l which will check your camera connection.

apt-get install dov4l

Make sure the camera is connected to the USB socket, then enter:

dov4l -q

the command will query your camera capabilities and the driver that being used, you should get similar output to this:

Number of radio/tv channels if appropriate: 1
Number of audio devices if appropriate: 0
Maximum capture width in pixels: 640
Maximum capture height in pixels: 480
Minimum capture width in pixels: 48
Minimum capture height in pixels: 32

Image size (x,y): 640, 480

The channel number: 0
 The input name: zc3xx
 Number of tuners for this input: 0
 The input is a camera
 The norm for this channel: 0
Brightness: 32896
Hue: 0
Colour: 0
Contrast: 32768
Whiteness: 39321
Depth: 8
Palette: Unknown! (0)

Installing V4L libraries

Install V4L libraries by entering:

apt-get install libv4l-0

Installing Webcam Server

Now it's time to install the application. simply install webcam-server.

apt-get install webcam-server

make sure your Apache web server is properly configured and running. assuming your web root directory is /var/www, please copy the following directory to webroot:

cp -apr /usr/share/doc/webcam-server/applet/ /var/www/

now edit the following file and change the URL value to point the correct IP address of the Plug Computer:


Running the Webcam server

Create a running script with the following content:


export LD_PRELOAD=/usr//lib/libv4l/
webcam-server -s

Run the script, and browse to the camera applet: http://PLUG-IP/applet/webcam.html

for more information about webcam_server project please go here.

Remote monitoring

It's time to configure your router forwarding port 80 to the Plug Computer's IP. now you can watch remotely what is going on. :)

Return to the Main Page