Revision for “Webcams” created on 23 November, 2011 @ 14:13

<div id="bodyContent"><!-- start content --> <table class="toc" id="toc"><tbody><tr><td><div id="toctitle"><strong>Contents</strong> <span class="toctoggle">[<a id="togglelink" class="internal" href="#">hide</a>]</span> <ul> <li class="toclevel-1 tocsection-1"><a href="#Why_USB_Camera.3F"><span class="tocnumber">1</span> <span class="toctext">Why USB Camera?</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Supported_Webcams"><span class="tocnumber">2</span> <span class="toctext">Supported Webcams</span></a></li> <li class="toclevel-1 tocsection-3"><a href="#Requirements_Recommendation"><span class="tocnumber">3</span> <span class="toctext">Requirements Recommendation</span></a></li> <li class="toclevel-1 tocsection-4"><a href="#Compiling_the_kernel_with_the_correct_webcam_driver"><span class="tocnumber">4</span> <span class="toctext">Compiling the kernel with the correct webcam driver</span></a></li> <li class="toclevel-1 tocsection-5"><a href="#Testing_your_camera"><span class="tocnumber">5</span> <span class="toctext">Testing your camera</span></a></li> <li class="toclevel-1 tocsection-6"><a href="#Installing_V4L_libraries"><span class="tocnumber">6</span> <span class="toctext">Installing V4L libraries</span></a></li> <li class="toclevel-1 tocsection-7"><a href="#Installing_Webcam_Server"><span class="tocnumber">7</span> <span class="toctext">Installing Webcam Server</span></a></li> <li class="toclevel-1 tocsection-8"><a href="#Running_the_Webcam_server"><span class="tocnumber">8</span> <span class="toctext">Running the Webcam server</span></a></li> <li class="toclevel-1 tocsection-9"><a href="#Remote_monitoring"><span class="tocnumber">9</span> <span class="toctext">Remote monitoring</span></a></li> </ul></div> </td></tr></tbody></table> <h2> <span id="Why_USB_Camera.3F" class="mw-headline"> Why USB Camera? </span></h2> <p>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". </p> <h2> <span id="Supported_Webcams" class="mw-headline"> Supported Webcams </span></h2> <p>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: </p> <blockquote><pre> * Logitech, Inc. Notebook Deluxe * Quantum DC-2120 (OmniVision Technologies, Inc. OV519 Webcam) * Logitech C120 * PlayStation&reg;Eye </pre></blockquote> <h2> <span id="Requirements_Recommendation" class="mw-headline"> Requirements Recommendation </span></h2> <blockquote><pre> * Plug Computer loaded with Ubuntu 9.04 <a title="Ubuntu 9.0.4 Plug Computer Distribution" href="/plugwiki/index.php/Ubuntu_9.0.4_Plug_Computer_Distribution">Ubuntu_9.0.4_Plug_Computer_Distribution</a> * Kernel 2.6+ (recommended 2.6.29 + 2.6.30-rc5 patch) * Supported USB webcam * Apache web server </pre></blockquote> <h2> <span id="Compiling_the_kernel_with_the_correct_webcam_driver" class="mw-headline"> Compiling the kernel with the correct webcam driver </span></h2> <p>Please follow these <a title="Compiling Linux Kernel for the Plug Computer" href="/plugwiki/index.php/Compiling_Linux_Kernel_for_the_Plug_Computer">instructions</a> to compile 2.6.30-rc5 fresh kernel. before building the kernel edit the configuration with the following command: </p> <blockquote><pre>make menuconfig ARCH=arm </pre></blockquote> <p>Browse to Device Drivers-&gt;Multimedia Devices make sure the following are selected: </p> <blockquote><pre> * Video For Linux * Enable Video For Linux API 1 * Video Capture Adapters V4L USB Devices -&gt; (Select your appropriate camera driver) </pre></blockquote> <p>Save the configuration and continue building the kernel. </p> <h2> <span id="Testing_your_camera" class="mw-headline"> Testing your camera </span></h2> <p>After booting the device with the resulted kernel image. simply install dov4l which will check your camera connection. </p> <blockquote><pre>apt-get install dov4l </pre></blockquote> <p>Make sure the camera is connected to the USB socket, then enter: </p> <blockquote><pre>dov4l -q </pre></blockquote> <p>the command will query your camera capabilities and the driver that being used, you should get similar output to this: </p> <blockquote><pre>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) </pre></blockquote> <h2> <span id="Installing_V4L_libraries" class="mw-headline"> Installing V4L libraries </span></h2> <p>Install V4L libraries by entering: </p> <blockquote><pre>apt-get install libv4l-0 </pre></blockquote> <p><br> </p> <h2> <span id="Installing_Webcam_Server" class="mw-headline"> Installing <a rel="nofollow" class="external text" href="">Webcam Server</a> </span></h2> <p>Now it's time to install the application. simply install webcam-server. </p> <blockquote><pre>apt-get install webcam-server </pre></blockquote> <p>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: </p> <blockquote><pre>cp -apr /usr/share/doc/webcam-server/applet/ /var/www/ </pre></blockquote> <p>now edit the following file and change the URL value to point the correct IP address of the Plug Computer: </p> <blockquote><pre>/var/www/applet/webcam.html </pre></blockquote> <p><br> </p> <h2> <span id="Running_the_Webcam_server" class="mw-headline"> Running the Webcam server </span></h2> <p>Create a running script with the following content: </p> <blockquote><pre>#!/bin/bash export LD_PRELOAD=/usr//lib/libv4l/ webcam-server -s </pre></blockquote> <p>Run the script, and browse to the camera applet: <a rel="nofollow" class="external free" href="http://PLUG-IP/applet/webcam.html">http://PLUG-IP/applet/webcam.html</a> </p><p>for more information about webcam_server project please go <a rel="nofollow" class="external text" href="">here</a>. </p> <h2> <span id="Remote_monitoring" class="mw-headline"> Remote monitoring </span></h2> <p>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.&nbsp;:) </p><p><br> Return to the <a title="Main Page" href="/plugwiki/index.php/Main_Page">Main Page</a> </p> <!-- NewPP limit report Preprocessor node count: 115/1000000 Post-expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> <!-- Saved in parser cache with key plugwiki-mw_:pcache:idhash:96-0!*!0!!en!*!edit=0 and timestamp 20111123182310 --> </div></div></div></div>

OldNewDate CreatedAuthorActions
23 November, 2011 @ 14:13 jjacobs