GLCapture Not Working

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:

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?

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

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:

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!

But that doesn’t require the V4L2 driver module.

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

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. It was a third party camera by the time but now I’m using a PI camera.

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/

Thanks for the help