# The constructor Capture is undefined

**URL:** <https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327>\
**Category:** Libraries\
**Created:** [December 27, 2022, 2:54pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327 "2022-12-27T14:54:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Danii](https://discourse.processing.org/u/Danii)\
**Post date:** [December 27, 2022, 2:54pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/1 "2022-12-27T14:54:13Z")

</div>

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 ☹

import processing.video.\*;

Capture video;

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

void draw() {  
}

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/3/a3f0a41475c80c5ab088100999b8b074ccbde3a2.png)

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [December 27, 2022, 4:16pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/2 "2022-12-27T16:16:38Z")

</div>

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

 ![dummy5](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/0/e00dbb3ddaf45636c80b4be8f0c4940240964ea8.png)

Select here …

 ![dummy4](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/d/6d246a4ec9bfe36fed23fd15606aced3766b9a93.png)

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![Danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Danii](https://discourse.processing.org/u/Danii)\
**Post date:** [December 27, 2022, 4:35pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/3 "2022-12-27T16:35:10Z")

</div>

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 ☹

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/f/efcf189bce1a1fefcf12306d4d692c4c58c504eb.png)

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [December 27, 2022, 5:17pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/4 "2022-12-27T17:17:23Z")

</div>

Hmmm! Suspicious!?

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

GitHub is still available from here…

> **[Release Video Library Release 8 (2.0) · processing/processing-video](https://github.com/processing/processing-video/releases/tag/latest-processing3)**
>
> Stable release of the version 2.0 of the video library, compatible with Processing 3.x. To use the video library with Processing 4, download version 2.1 or higher of the library.
> It is based on Got...

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [December 27, 2022, 5:57pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/5 "2022-12-27T17:57:52Z")

</div>

Check the usage, the parameters

See [Capture / Libraries / Processing.org](https://processing.org/reference/libraries/video/Capture.html)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [December 27, 2022, 6:25pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/6 "2022-12-27T18:25:43Z")

</div>

Hello @Danii,

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/5/756fa3485a5dd96589e5dedb099a2ca1b96d391f.png)

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

Related:

> **[The constructor Detector(rotoTest05.Rotor, int, int, int, int, int) is...](https://forum.processing.org/one/topic/the-constructor-detector-rototest05-rotor-int-int-int-int-int-is-undefined)**
>
> Processing Forum

`:)`

---

<div class="post-metadata">

**Author:** ![Danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Danii](https://discourse.processing.org/u/Danii)\
**Post date:** [December 27, 2022, 6:49pm UTC](https://discourse.processing.org/t/the-constructor-capture-is-undefined/40327/7 "2022-12-27T18:49:28Z")

</div>

YESSS, THAT WAS THE PROBLEM HAHA

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

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/7/a749b19872bdd9a5aef0c7bd0a00d31cb37dd738.png)
