Bespoke access of an IP 9100a

I recently bought a IP 9100a video server from with the intent of using it to produce automatically updating snapshots of a selection of satellite tv quiz channels for use on another website.

It swiftly became apparent that it was not going to be that easy. After some initial confusion because the IP server web interface drops into a "simple" mode if you don't use Internet Explorer to access it, (I use Opera,) it seems that the predominant method of accessing it is via a bespoke ActiveX control.

I tried using the motion-detection ftp option to upload snapshots to an ftp server, but it mustn't like being behind a firewall and router, and with no passive option apparent, that quickly became a dead end.

A bit of googling about found this page where Graham had done some initial digging into how to access the images directly.

You can indeed get at the 'current' image via http://server/Jpeg/CamImg*.jpg but how to pick the channel. As Graham discovered, there is another option http://server/SetChannel.cgi?Channel=M which seems to work.

The problem here is that it takes a moment for the channel change to occur! GetStatus.cgi turned out to be the answer. Along with a lot of other bits of data, the current channel number is shown. Simply keep calling that until it changes, THEN fetch the image! But how do you get that all into a web page anyway?

The result is the bit of php below. You call it as an image, with a channel number as a parameter, and you get back the image for that channel! What more could you want..

It's fairly simple in operation. It calls change channel, calls status, then loops until it's on the correct channel, then gets the image! Additionally, it caches an image from each channel, so that repeated calls can serve up the image much quicker without having to keep changing channels. It also has some locking so it will only be waiting for one image at any one time. For my use, this was fine as a snapshot ever 10 seconds is sufficient.

I hope you find it of use ! Donations are welcome but not obligitory.

27-jan-2006. Credit to Timo, for the following note:

By the way, I don't know if you've tried this but you might like to mention in your script that you can use the following format to access a password protected server

$server = "user:password@camera-domain-or-ipportnumber";

It works for me. The great thing is this info is hidden within the PHP script so it's not visible to viewers of a web page (who, with a bit of knowledge, could otherwise go in and change the video server passwords, etc, even if you set up a non-admin login!).

It's also perhaps worth mentioning, that because of the way the script works, (only providing snapshots at intervals, and caching it locally too) there is minimal network traffic between your webserver and the IP9100. This makes it quite practical for the two to be at distinctly different locations, without using up lots of bandwidth on a constant video stream between the two. You coould quite easilly have the IP9100 hung off your home internet connection, and a commerical grade webserver getting thousands of hits per second to the snapshots, and you'd never even notice.


Status so far

26 Apr 2008. V0.13a. Option added to disable all caching to allow script to be used as a pure proxy. This WILL put load on your video server, as every access to the script will cause an image to be loaded from the IP9100. Most useful for debugging connection and cache-directory permission issues!
17 Jan 2006. V0.12. Now autocreates thumbnail of image when fetched. Call with cam.php?thumb&chan=n to return a thumbnail rather than a full size image. HTML page returned when neither "img" nor "thumb" is specified now includes option to swap between the two sizes by clicking on the image. You can add a parameter size=big|small to set default if required. All thumbnail options can be disabled in configuration section. You require GD graphics library to be installed into PHP if you enable these options.
14 Jan 2006. V0.11. Call with cam.php?chan=0 and serves up html page with an auto refresh and a single image link. Call with cam.php?img&chan=0 for the image itself!

© 2006 R.O'Donnell.
Back to Home