Processing 3.5 and 4 (alpha) still can't find MacOS camera. Issue with the Video Library

Hi everyone.
I am having a problem with the video library the capture part, which keeps telling me the program can’t see any devices. I am aware of the issue with the video library, which mentioned here in the issue #134, and have read some other duplicated topics.

So I have tried most (maybe all of them, actually) solution described in the issue #134 until the very end of Ben Fry’s post that tell people about the Processing 4.

Thus, I downloaded the latest one: Processing 4 (alpha 3), but still did not work. Most of the people who had this issue also have different errors than mine. So I am curious if there’s something else I did wrong or missing.

Here’s my error which depends on if I use the camera’s name, or the index of the cam list:

Could not find device FaceTime HD Camera
and

ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

And, here’s what is my current status, and what I have done:

  • I am on Mac Catalina 10.15.7, Retina, Pro 15-inch, mid 2014
  • I have changed the video file followed ihaveaccount
  • I have tried the camera name like, danieloskarsson said. I also made sure that my camera hardware name is correct. Mine does not has the “(Built-in)” title like everyone else.
  • My MacBook always sees Processing in the security and permission. It always and already checked to give access to the camera to Processing. Currently, I can see that the Processing access to the camera is the Processing 4 alpha 3 from the name showed in there.
  • I have tried deleting the quarantine flag like, fdb said
  • I finally tried updating the video library to 4 then 5 versions of it.
  • However, my gstreamer is still at 1.14 while many on the issue mentioned 1.16. (Is this a problem?)
  • Finally, I have tried the basic capture code with Processing 3.5.4 and 4 alpha 3. I still have both versions on my computer just to test this issue. (Is this maybe make a conflict between the two? I have had two programs named differently before but, maybe this time it’s different!?)

So there are my two questions here:

  1. Should I try to update my gstreamer and it may help? And how do I update that correctly? Download GStreamer. Do I need both of them as mentioned on the site? Is this why the video libraries 4 and 5 did not work?
  2. Anyone else has the same error that the processing in MacOS can’t find the camera no matter what still? Should I just find a Windows computer now? LOLOL

Any suggestion is appreciated. Thank you!!

Have you tried using "pipeline:autovideosrc" as the camera name? What happens?

Hi,
No, I don’t think so.
Could you please describe more how can I work on that? Should I do this in terminal?

In the sketch, as in Processing can't find the camera - Video Libraries don't work - #13 by neilcsmith

This will bypass the camera detection code in the library, which can have issues, and use whatever GStreamer can find by default. It might show you a test source instead, which would help narrow down where the issue is.

1 Like

OMG! Thank you. it works! It still can’t see the list of cameras but the built-in cam works but the USB camera. I have checked what is that string “pipeline:autovideosrc” you told me to do and it’s very interesting although I have not figured out how to use it other ways.

So is there any ways to use this for a USB cam?

1 Like

The pipeline prefix basically allows you to pass in a GStreamer pipeline description. This is using the autovideosrc element that is documented at autovideosrc

For some reason I can’t find a page for avfvideosrc which is what it should be using underneath I think, both with the auto source and in Processing Video. There’s a docs page for the Windows equivalent at ksvideosrc and there’s the avfvideosrc source code at gst-plugins-bad/avfvideosrc.m at master · GStreamer/gst-plugins-bad · GitHub

Both have a device-index property. So you could try "pipeline:avfvideosrc device-index=1" and see if that picks up your other camera or not.

1 Like

Thank you for the explanation. It has solved my issue on my Macbook Catalina. The “device-index=1” also works well.