views:

357

answers:

3

We have Sony security cameras which have an inbuilt web server, giving a web interface to view and control the camera. We would like to integrate the camera picture into a Java web application, is there a way to connect to the camera from my code?

I see plenty of generic software (for PC, PDA, Iphone etc) whereby you just tell the software your camera model and IP address and it will pull in the camera image - obviously it talks to the camera and bypasses the web interface because you it just gives the image, not the whole web interface. How do these programs work and how can I replicate that?

+1  A: 

It's not a requirement that they "bypass" the web interface, they might just "surf" the camera programmatically. If the camera's design is simple enough, the image might even have a static URI, e.g. http://camera.ip.address/images/image00.jpg or whatever might always return the latest image.

You should probably read the HTML source served by the camera to figure out how the images are accessed, and mimic that.

unwind
It's an mpeg, somehow served with activex.
Fletch
+1  A: 

Is it a video feed or just plain images? It should be fairly easy if you just use that elements URL in your Java app. Obviously maintenance wise it's fairly messy, but it would work.

For instance if the camera outputs it's images to a url like:

192.168.0.2:80/camera/cameraimage.jpg

or

192.168.0.2:80/camera/cameraimage.swf,

you just reference that in your app. Shouldn't be too troublesome.

Dominic Bou-Samra
Just remember that java does not support flash ;-)
Paul de Vrieze
Yeah I tried that... the URL creates the border around the image and then calls a .cab file. It's all done with horrible Javascript (!). And I guess the cab does the rest. I'm not too familiar with this .cab stuff... not sure what to do. The second issue is that I need to integrate basic authentication (no prompting).function activateAViewerAuto (){ document.write('<OBJECT ID="SonySncP5View" CLASSID="CLSID:5CB430A9-CAAC-4C91-AF61-6D410EEE1221" CODEBASE="../program/SonySncP5View.cab'); document.write('#version='); document.write(AViwerVer); document.write('"></OBJECT>');}
Fletch
A: 

Most CCTV cameras that I have worked with (and I have worked for 2 CCTV camera companies) interface directly to the camera using RS-232 or RS-423 (I think). Typically, the cameras are connected directly to a remote system using some serial protocol. You control the remote system using some wider networking protocol. Typically, they are connected to an ISDN like or something similar.

There may well be USB connections now to cameras, but certainly a lot of the current systems are using serial communications.

Xetius
Nah there's no serial connection, it's connected to an ethernet cable.
Fletch