# GLCapture Not Working

**URL:** <https://discourse.processing.org/t/glcapture-not-working/5805>\
**Category:** Processing for Pi\
**Created:** [November 21, 2018, 9:16pm UTC](https://discourse.processing.org/t/glcapture-not-working/5805 "2018-11-21T21:16:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatterLinx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matterlinx/32/3121_2.png) [@MatterLinx](https://discourse.processing.org/u/MatterLinx)\
**Post date:** [November 21, 2018, 9:16pm UTC](https://discourse.processing.org/t/glcapture-not-working/5805/1 "2018-11-21T21:16:02Z")

</div>

Hello, i’m trying to get processing to work with my Raspberry Pi camera.

I made sure the camera is enabled in the Raspberry Pi Configuration tool. I also added “bcm2835\_v4l2” to /etc/modules.

The camera works properly, I can take pictures with it using  
`raspistill -o image.jpg`

I tried to run the SimpleCapture example from the GL Video library, but I get this error:

```auto
GLVideo: v4l2src1: Device '/dev/video0' is busy
Debugging information: gstv4l2object.c(3592): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline1/GstV4l2Src:v4l2src1:
Call to S_FMT failed for YUYV @ 320x200: Device or resource busy
GLVideo: v4l2src1: Internal data stream error.
Debugging information: gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline1/GstV4l2Src:v4l2src1:
streaming stopped, reason not-negotiated (-4)

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![MatterLinx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matterlinx/32/3121_2.png) [@MatterLinx](https://discourse.processing.org/u/MatterLinx)\
**Post date:** [November 22, 2018, 1:27am UTC](https://discourse.processing.org/t/glcapture-not-working/5805/2 "2018-11-22T01:27:29Z")

</div>

I used `GLVideo.enableDebug()` to get some more information.  
**Here are the results:**

```auto
0:00:00.226271203 1591 0x5f29b0c0 WARN default v4l2-utils.c:189:gst_v4l2_error:<v4l2src1> error: Device '/dev/video0' is busy
0:00:00.226379586 1591 0x5f29b0c0 WARN default v4l2-utils.c:192:gst_v4l2_error:<v4l2src1> error: Call to S_FMT failed for YUYV @ 320x200: Resource temporarily unavailable
0:00:00.226846194 1591 0x5f29b0c0 WARN basesrc gstbasesrc.c:2939:gst_base_src_loop:<v4l2src1> error: Internal data stream error.
GLVideo: v4l2src1: Device '/dev/video0' is busy
0:00:00.226881714 1591 0x5f29b0c0 WARN basesrc gstbasesrc.c:2939:gst_base_src_loop:<v4l2src1> error: streaming stopped, reason not-negotiated (-4)
Debugging information: gstv4l2object.c(3592): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline1/GstV4l2Src:v4l2src1:
Call to S_FMT failed for YUYV @ 320x200: Resource temporarily unavailable
GLVideo: v4l2src1: Internal data stream error.
Debugging information: gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline1/GstV4l2Src:v4l2src1:
streaming stopped, reason not-negotiated (-4)

```

**Here are the camera configs:**

```auto
Devices:
[0] "mmal service 16.1"
The format returned by configs() is informational only and might change in future versions of the library.
Configs:
[0] "video/x-raw, format=(string)YUY2, width=(int)[32, 2592, 2], height=(int)[32, 1944, 2], pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ bt601 }, framerate=(fraction)[1/1, 90/1]"
Final caps: video/x-raw(memory:GLMemory), width=(int)320, height=(int)200, framerate=(fraction)90/1, format=(string)RGBA, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, texture-target=(string)2D

```

I also tried running this in the terminal **sudo modprobe bcm2835-v412** as suggested by Ghans in an older post.  
Unfortunately I got this message after trying to run it **modprobe: FATAL: Module bcm2835-v412 not found in directory /lib/modules/4.14.79-v7+**

If anyone has any input, I would really appreciate the help!

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [November 22, 2018, 8:46am UTC](https://discourse.processing.org/t/glcapture-not-working/5805/3 "2018-11-22T08:46:15Z")

</div>

> [@MatterLinx](#):
>
> The camera works properly, I can take pictures with it using  
> `raspistill -o image.jpg`

But that doesn’t require the V4L2 driver module.

> [@MatterLinx](#):
>
> I also tried running this in the terminal **sudo modprobe bcm2835-v412**

That should be bcm2835-v4l2 I think - an L (lower case) not a 1. Video 4 Linux 2.

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [November 22, 2018, 5:12pm UTC](https://discourse.processing.org/t/glcapture-not-working/5805/4 "2018-11-22T17:12:38Z")

</div>

I had some problem also the last time I tried to make my camera works. I finally got it to work by simply using the PI image you can find on the processing website.

Here is the discussion if you want to read it: [Issues with third-party camera](https://discourse.processing.org/t/issues-with-third-party-camera/2075/12). It was a third party camera by the time but now I’m using a PI camera.

---

<div class="post-metadata">

**Author:** ![MatterLinx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matterlinx/32/3121_2.png) [@MatterLinx](https://discourse.processing.org/u/MatterLinx)\
**Post date:** [November 22, 2018, 7:50pm UTC](https://discourse.processing.org/t/glcapture-not-working/5805/5 "2018-11-22T19:50:30Z")

</div>

I tried bcm2835-v4l2 with a lower case l, and it didn’t change anything.Did you get the image from from this page? [https://pi.processing.org/get-started/](https://pi.processing.org/get-started/)

Thanks for the help
