Gawker Image Fetch Script
There’s not a lot more to it than the title suggests. I’ve made a script you can use to fetch webcam images from any host on the Internet that’s running Gawker.
The script takes arguments of the host and port to connect to as well as the file to overwrite with the latest exciting image. Together with some javascript you can do neat things like have a live updating webcam image.
Silly things like half-written images are dealt with, but that means the directory that has the image file in it needs to be writable. If the camera sends images faster than your local machine can write out to disk, that’s bad. So don’t do that.
In the future, I’ll make changes that fulfill desires I have, like producing a timelapse movie of the last 24 hours. And more complicated, a timelapse movie that skips the dark frames in the night that are less interesting.
After a few minutes of thought: Future changes like reconnecting in the event of a failure spring to mind as well. For now though, this is scratches-an-itch-ware.
Update: My script now resides at Google Code with the code available in Subversion at http://gawker-image-fetch.googlecode.com/svn/trunk/. It now supports finding cameras with Zeroconf and reconnecting automatically.
Later Update: New features are appearing, like support scripts for doing time-lapse movies. Check the code site for the latest information.
0 comments:
Post a Comment