Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created August 28, 2015 03:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atduskgreg/be3f71963bb5b805c57a to your computer and use it in GitHub Desktop.
Save atduskgreg/be3f71963bb5b805c57a to your computer and use it in GitHub Desktop.
import ipcapture.*;
IPCapture cam;
void setup() {
size(640,480);
cam = new IPCapture(this, "http://3636782061:80/mjpg/video.mjpg", "", "");
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();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment