How to capture live video online in (https://www.openprocessing.org/)

https://www.openprocessing.org/

Dear all, I am trying to capture a live video online by writing codes in openprocessing. Although the code work well in processing itself, it does not work in openprocessing and the message (Capture is not defined) usually appears.

what shall i do to fix this problem

this is the used code:

import processing.video.*;

Capture video;

void setup(){
  size(640,480);
  video= new Capture(this,640,480);
  video.start();
}

void captureEvent( Capture video){
  video.read();
}

void draw(){
  image(video,0,0,width,height);
}
1 Like

Unfortunately, Processing libraries (and some of the less commonly used p5.js ones) are not supported on Open Processing unless you buy a “Plus” account.

I recommend just switching to p5.js.
Here is an Open Processing p5.js sketch using video.

If you need help converting your code from Processing to p5 just ask.