Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

| Views: 930
I've written previously about setting up a traffic webcam on OS X, well now I decided to move away from my old OS X Lion Server so couldn't use those scripts any more. This past weekend I took some time to rewrite my cam scripts to work on Linux and this is what I ended up with...

OK so it looks more or less the same as it always has, but the scripts are cleaner, more configurable and easier to work with. I've made them all open source and put them up on GitHub, so you can get them here - https://github.com/ikromin/trafficr.

The scripts assume that you have a Linux machine with a webcam connected and you upload frames from that webcam to a website. Frame capture is done with some common packages like FFMPEG/Video4Linux, image processing and watermarking is done using ImageMagick,and uploads are handled via cURL. The uploads are secured out of the box, you just need to make sure you password protect the web site upload script, which is covered in the README.

On the website side there are a couple of scripts that let you upload and retrieve frames. There is also a JavaScript script that fetches all the frames and plays them back in correct order. The sample HTML page shows how that is all set up.

I still want to implement fetching new frames without having to reload, that's something for the future though.

My traffic cam is using these scripts and can be accessed here: Riverside Expressway Cam.

If you do end up using my scripts, please let me know!


Have comments or feedback on what I wrote? Please share them below! Found this useful? Consider sending me a small tip.
comments powered by Disqus
Other posts you may like...