Hi everybody. I'm trying to connect Ip camera of VISTALINE with processing but I can not get live image in sketch. Console always shows: Unable to open I/O streams: Server returned HTTP response code: 502 for URL: http://192.168.0.129:80/axis-cgi/mjpg/video.cgi?resolution=320x240
The code & IP configuration of camera are shown as pictures below:
IPCapture cam;
void setup() {
size(320,240);
cam = new IPCapture(this, "http://192.168.0.129:80/axis-cgi/mjpg/video.cgi?resolution=320x240", "admin", "admin");
cam.start();
// this works as well:
// cam = new IPCapture(this);
// cam.start("url", "username", "password");
// It is possible to change the MJPEG stream by calling stop()
// on a running camera, and then start() it with the new
// url, username and password.
}
void draw() {
if (cam.isAvailable()) {
cam.read();
image(cam,0,0);
}
}
void keyPressed() {
if (key == ' ') {
if (cam.isAlive()) cam.stop();
else cam.start();
}
}
Anybody can help me,please?