This code should get you start experimenting:
- import java.awt.image.BufferedImage;
import java.awt.*;
PImage screenShot;
void setup() {
size(screen.width, screen.height);
screenShot = getScreen();
}
void draw () {
image(screenShot,0,0, width, height);
}
PImage getScreen() {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
DisplayMode mode = gs[0].getDisplayMode();
Rectangle bounds = new Rectangle(0, 0, mode.getWidth(), mode.getHeight());
BufferedImage desktop = new BufferedImage(mode.getWidth(), mode.getHeight(), BufferedImage.TYPE_INT_RGB);
try {
desktop = new Robot(gs[0]).createScreenCapture(bounds);
}
catch(AWTException e) {
System.err.println("Screen capture failed.");
}
return (new PImage(desktop));
}
You could specify the location of the videostream in your browser to capture it.
However, if you just share the link of your video, we can actually see what's possible.