Skip to content

Tech Series: Your Own WebCam Mystery Cache

This cache has been archived.

CC: Grabbed the cache today.

More
A cache by cc Message this owner
Hidden : 2/15/2009
Difficulty:
2.5 out of 5
Terrain:
1 out of 5

Size: Size:   small (small)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:

Cache is an Altoids tin that was burned with a torch then painted.

This installment of the tech series focuses on setting up a webcam. Webcams are fun and entertaining. There is something voyeuristic about watching your own webcam and seeing what it sees. This installment we will discuss cameras, how to setup your webcam and how to give the world access.

Setting up a webcam has three basic components. First you need a camera. Once you have a camera, you will need software to snap shot a moment in time as a computer image and finally you need some way to share it with the world.

The Camera: Any PC camera will do. The higher resolution the camera supports the clearer your picture be. There is a trade off though. The higher the resolution, the bigger the picture and the longer it takes to sent it to the web server and the longer it takes users to download it. Generally speaking, a 640X480 resolution image is good enough and can be compressed to between 30kb and 70kb (depending again on your quality desires) which is are reasonable sizes. Most of today’s cameras connect to your computer via USB. This makes them pretty easy to use but limits placement and availability. They only work when your computer is on and the camera is connected and pointed where you want it. Another option is a 802.11 WiFi camera. These can be placed anywhere you have an electrical outlet and are not limited to your computer’s location. The WiFi cameras have built in web servers and software that can periodically upload pictures to a FTP server. I use a WiFi camera for my webcam. Prices range from $10 a couple hundred bucks depending on resolution and features. You can get camera that the user can remotely control and move. My WiFI camera cost about $50 on sale is is mounted in a sheltered area outside pointed across my front yard. USB cameras can be found a cheap as $10.

Getting a picture from your camera: A simple Google search for “webcam software” returns 1,210,000 results ( http://bit.ly/Pb53a). You can add the keyword “free” to limit the results to free webcam software. Many of these tools will run on your computer and periodically take a picture from the web cam and upload it to your web server service automatically. Some will even generate a web page for you so all you have to do is point it at your web server service and it will do everything. Windows XP/Vista users can download the free “Webcam Timershot” PowerToy from Microsoft to grab the current image from the webcam. Depending on your skill level, you can setup your computers task scheduler to automate running programs that get the current image from your webcam and send it to your web server service. If you use a WiFi webcam, they already contain the ability to periodically send the current image to your web server service. You just need to connect to the camera and set the appropriate setting. For USB connected webcams I have used both YawCam (http://www.yawcam.com) and TinCam (http://www.tincam.com). Of course now, I don’t use either of the two since my webcam does it all automatically. Also, some software will allow you to modify the image with borders, date/time and other features. These are all nice and can be fun too.

Sharing your webcam with the world: The most common way is to pick any free service that offers both free webpages and ftp access that permit webcam uploads (many do not). Here, you are on your own. You might find a free or cheap hosting service that allows FTP access for webcams but the half dozen I researched specifically forbid webcam uploads in their terms of service. I run my own personal web server. It is easy and free to do. Many computers already have a web server. My Windows Vista Home Premium comes with a web server. But it is real easy to install one of the many free, small, easy to use web servers. I hear Abyss is good but I use Apache. Apache is the granddaddy and worlds best web server. It installs in a snap and is pretty much ready to use.

From here on, we will assume you have your webcam and software already installed and have already selected the image size and quality and frequency (I recommend 1 or 2 minutes) it takes images. Now you are ready to send pictures somewhere. Now is a good time to make a mental note of your choice in image file name. I’ll use webcam.jpg for reference. You will need to substitute your own image name where I use webcam.jpg.

If you find a suitable hosting service and plan to use it for your webcam images, there are just a couple simple steps to having your webcam online in just a few minutes. Simply configure your software to ftp the current image to the web hosting account and path where you want it stored there. For simplicity, don’t use a separate folder just copy it to the home directory (usually just don’t enter a path). Your pictures should start coming right away. Skip the next paragraph to see how to test your image uploads.

If you are using a personal web server all you need to do is point your webcam software to save a copy of the image to the web server directory. For example, in apache, the path is c:\apache\htdocs. You can test the images (as described in the next paragraph) by pointing your browser to http://localhost/webcam.jpg.

You can test everything by pointing your browser directly at your images on your hosting service e.g. http://mysite.myhostingservice.com/webcam.jpg (this is not a real address, I just made it up here as an example). You should see your image. Wait until a new picture is taken (based on your frequency setting) and refresh your browser (reload, refresh, whatever it is called on your browser. Both IE and Firefox support pressing F5).

If you are using a WiFi webcam I’ll simply describe how mine is setup. I have a local computer that runs apache and a free, simple FTP server named Firezilla (if using a hosted service, they already have a ftp server). I configured my WiFi camera to ftp images every 20 seconds to my FTP server and save them in the webcam image folder. That is all I needed to do. Every 20 seconds a new image overwrites the old one..

More on my setup; After my initial webcam setup, I wanted to keep a days worth of images which is about 4300 (3*60*24). Since my webcam already allows me to add a sequence number to my webcam image, I was able to tell it to start at 1 and end at 4400 where it starts over. I then wrote a simple perl program that finds the newest picture and copies it to webcam.jpg so the webpage always loads the newest picture. Below is both an example of my perl program and the generic web page I use to display the webcam image. Using Windows task scheduler, I schedule the program to run every minute (the minimum it supports). I put the perl program in a windows batch file that is called by the scheduler. The batch file runs my perl program, waits 15 seconds, repeats, waits 15 seconds and repeats again. This way I get an image every 15 seconds.

My Perl One-liner to copy the newest image to webcam.jpg:
perl -e "$foo=`ls -rt webcam_* | tail -1`;system(\"cp $foo webcam.jpg\");"

The batch file simple has:
perl -e "$foo=`ls -rt webcam_* | tail -1`;system(\"cp $foo webcam.jpg\");"
sleep 15
perl -e "$foo=`ls -rt webcam_* | tail -1`;system(\"cp $foo webcam.jpg\");"
sleep 15
perl -e "$foo=`ls -rt webcam_* | tail -1`;system(\"cp $foo webcam.jpg\");”

Sample web page (all you would have to change is the src section of the img tag):
This link is to the HTML code to display your own webcam. This is what I use for my webcam. http://www.netbert.com/webcam/webcam_source.html

I hope you enjoyed this installment of the Tech Series. Good Luck!


Coordinates may not be extractable at all times. Patience may be required. Standard logging rules apply. You must sign the log and it must be after the cache is published.
note: the coords might be off a bit. They were averaged 120 sample in the rain. Find the obvious object in the hint.

Additional Hints (Decrypt)

fgenvtug qbja sebz erq qbg naq bar gb gur evtug purpxfhz svsglfvk

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)