Camera Control

This is based on a £35 wireless pan and tilt camera, but with a bit of python running on a separate web server to control it. The camera comes with a rather messy user interface, that isn’t tablet/phone friendly but is fairly easy to pick apart and see how it operates by poking a few cgi files on the camera to give it instructions. The camera itself is running Linux (with a bit of a GPL violation as there is no source published as far as I can tell). The mjpeg video stream is direct from the camera and it has a clickable imagemap overlay which chops up the image into 40px squares. Clicking a square requests a simple web service running on a computer close to the camera which starts the camera moving and stops it again after a fraction of a second multiplied by the number of pixels it needs to move. The camera itself has no absolute or relative positioning (not quite true, you can set 8 preset absolute positions), it is just done by careful timing of the start and stop signals.

The camera can move in diagonal directions, it would be nice to get it to smoothly move to a new location smoothly first by panning and tilting, then the rest of the way on one axis. Might be nice to have something round the outside of the image to allow you to move double the distance, at the moment you can move a half frame in one click would be nice to be able to go a whole frame away.

The camera stream has a maximum of 4 concurrent viewers, a few more if I drop the resolution to 320×200. For lots of viewers I would use ffmpeg to reencode from mjpeg to something else on the fly and possibly pass it to a streaming server of some kind, the overlay control should work just as it is over a multicast video stream. In reality, if you are expecting more than a couple of concurrent viewers they are going to argue over control too much.

Source code is on launchpad and I will tidy it up somewhat as time goes by and make it more of a collaborative project (starting with some installation instructions, it uses apache and mod_python at the moment). Please share ideas for features in the comments here.

This is an image from the camera when you loaded this page, click through for the live steerable video

If you can’t see the video, try coming back later, it probably hit the limit of viewers.

2 Comments

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>