IPCapture (No video)

edited June 2016 in Library Questions

My code seems fine. But when i compile the code, only grey screen shows up. No error message in the console.

import ipcapture.*;

IPCapture cam;

void setup() {
  size(320,240);
  cam = new IPCapture(this, "http://10.1.1.1:5502", "root", "admin");
  cam.start();

}

void draw() {
  if (cam.isAvailable()) {
    cam.read();
    image(cam,0,0);
  }
}

void keyPressed() {
  if (key == ' ') {
    if (cam.isAlive()) cam.stop();
    else cam.start();
  }
}
Tagged:
Sign In or Register to comment.