In order to install webcam_server, download the .deb file from one of the mirrors listed on the webcam_server packages page. Once that file has been downloaded, open up a terminal window and follow these directions:
Change into the directory the webcam_server file was saved to.
Issue the command sudo dpkg -i webcam_server_XXX.deb
Where XXX is the release number.
Type your sudo password and hit Enter.
Allow the installation to complete.
The Webcam server is ready to be started, but before this is done, make sure a Webcam is connected and working. Once the Webcam has been recognized (This can be checked with a tool like Cheese Webcam Booth) start the server with the command webcam-server
. That command will start the server without any options.
If you need to have the webcam-server start at boot (or to start with specific options) a script will be necessary. You have two options, create a new script, or take the easy way out. The easy way is to download this file and save it to /etc/init.d
. (In order to copy or move the file use sudo to gain the necessary privileges.) Make sure to adjust any of the settings, in the downloaded file, necessary to fit any specific needs not addressed in the default (The defaults should work just fine.) After the file has been moved, give the file executable rights with the command chmod +x /etc/init.d/webcam-server
and then add the script to the init defaults with the command sudo update-rc.d webcam-server defaults
.
If the webcam-server script is being used as a startup service, it will need to be started by issuing the command sudo /etc/init.d/webcam-server start
. If the output "Starting webcam-server: Started!" is displayed, congratulations, the Webcam server is up and running. Now, we have to make Apache aware of this.
When the webcam-server package was installed all of the necessary files were placed in /usr/share/doc/webcam-server/applet
. Those files need to be moved to the document root of the Apache server with the command sudo cp /usr/share/doc/webcam-server/applet/* /var/www/
. Now open up the file /var/www/webcam.html
(with a text editor) and edit it to fit specific needs. The values that might need personalization are:
Title: This is the title page for the Webcam page served up.
URL value: This is the address of the Webcam server. By default this is set to localhost:8888. If this is not changed, the only address the Webcam server will be able to connect to is localhost. If an IP address or domain is used, make sure the change is reflected in this entry.
FPS value: This is the Frame Per Second value. By default it is set to 1 second.
Width value: This is the width of the java applet in the browser window.
Height: This is the height of the java applet in the browser window.
Save that file and it's time to start viewing.
In order to view the new Webcam server, open up a browser and point it to the address configured in /var/www/webcam.html
. So, by default, open up http://ADDRESS_TO_SERVER/webcam.html and what is being seen by the Webcam should be displayed, updated at the frames per second configured in webcam.html
(see Figure 2).
My cheesy grin shows our Webcam server is a GO!