Created
August 28, 2015 03:23
-
-
Save atduskgreg/be3f71963bb5b805c57a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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