The constructor Capture is undefined

Hi, I’ve been looking for a reason why my code is not working. It does not matter what arguments I put in between parenthesis. The error message is always similar. Please help :frowning:

import processing.video.*;

Capture video;

void setup() {
size(600, 400);
//Capture(parent, width, height, fps)
video = new Capture(this, 640, 480, 30);
}

void draw() {
}

Hi @Danii,

you need to install the video library for processing through contribution manager. In your case, as you are using processing 3, the version for video library for processing 3.

From top level Menu choose

Select here …

Cheers
— mnse

1 Like

Hii, thanks for replying.

I already had installed the library. I tried to download the library to add it locally, but found the github repository is not available anymore :frowning:

Hmmm! Suspicious!?

Can’t test currently as I’m not at my box.

GitHub is still available from here…

Cheers
— mnse

1 Like

Check the usage, the parameters

See Capture / Libraries / Processing.org

1 Like

Hello @Danii,

image

Rename your sketch to something other than Capture (name of the class) and it will work!

Related:

:)

3 Likes

YESSS, THAT WAS THE PROBLEM HAHA

Omg I feel really silly right now but thank you so much guys! :face_holding_back_tears:

1 Like