It's a Bird. It's Another Bird!

 in

The End! Or Is It?

To fulfill my personal needs, the bash scripts and the bit of JavaScript really did all I needed. I can view the BirdCam from multiple computers in my house, and even from the Internet. Each "video frame" is around 600K, so although it still uses significant bandwidth, it's nothing like trying to stream full video. I have noticed that with slow cellular connections, sometimes the image freezes, because it tries to refresh before the original image is loaded. I settled on 2500 milliseconds as the refresh time, because it seems to work from most locations (Figure 5).

Figure 5. With the ability to view BirdCam remotely, I can get some great shots, even when I'm not home!

If you visit my BirdCam now, you'll probably notice I've done a little more tweaking. I've added a query to the local weather station, and I added the current temperature to the annotation. The big change, however, is one you hopefully shouldn't notice. Because I knew I'd be sending this to tens of thousands of potential bird watchers, I figured I probably should scale my solution to the cloud. Granted, 5Mbit upload speed is decent, but not if 100 people are trying to check out my backyard!

My simple solution was to replace the sleep command in the bird_update script with an scp command that uploads the bird.jpg file to my Web hosting provider. I still try to be a good netizen and upload the actual file to the ramdisk on my provider's server, but with the .jpg file being served from the cloud, I'm not worried about an influx of bird watchers. If you were worried about saturating my home connection, fear not; I planned ahead.

Winter Is Coming

If you set up a similar Webcam, I'd love to hear about it. You're also welcome to watch the exploits of my bird obsession as winter approaches. The bubbling bird bath soon will be replaced with a heated version, and I'll be adding more suet and peanuts for the winter birds. If you happen to be watching, and see a cool bird, don't hesitate to send me the photo! I had a visit from an Indigo Bunting one day that I saw via BirdCam, but that was when I was using an old iPhone, so the image is very poor quality. BirdTopia attracts more than just birds too. While the occasional squirrel is brave enough to visit, the most common non-aviary visitor is Zoey (Figure 6).

Figure 6. Bird water just tastes better.

I wish you an awesome weekend project! I have enjoyed playing with BirdCam almost as much as I enjoyed making a MAME cabinet years ago. There's just something about building with Linux that warms my heart.

______________________

Shawn Powers is a Linux Journal Associate Editor. You might find him on IRC, Twitter, or training IT pros at CBT Nuggets.