processing / processing-video

GStreamer-based video library for Processing
276 stars 130 forks source link

Video capture not working in Mac OS Catalina (and later) #134

Closed grauwald closed 3 years ago

grauwald commented 4 years ago

Running the example file that comes with the Processing video library throws the following error:

libc++abi.dylib: terminating with uncaught exception of type NSException Could not run the sketch (Target VM failed to initialize). Make sure that you haven't set the maximum available memory too high. For more information, read revisions.txt and Help → Troubleshooting.

This issue is also reported here:

https://discourse.processing.org/t/did-macos-catalina-or-something-break-the-video-library/14699

There is some speculation in that thread that the library depends on 32bit compiled code which is no longer supported in Mac OS Catalina as Apple is now requiring applications be 64bit.

Resolving this issue is beyond my expertise but it would be awesome if Mac users could continue to use the video library without having to downgrade to older versions of OS X.

C0T0N commented 4 years ago

@lucidprojects Thank you so much, that did it for me. It was very easy to follow your walkthrough and it worked like a charm, I now have access to the built in cam with processing! Thanks again!

lucidprojects commented 4 years ago

@C0T0N sweet glad it worked! ... it was the result of a long night of going down a few rabbit holes to get it sorted LOL

sukmapolitala commented 4 years ago

@lucidprojects I have tried it but it still remains the same result. not working. even though processing has shown up in SystemPrefs / privacy / camera. I followed every step you wrote, and the steps were completed to be followed, but it still didn't work.

lucidprojects commented 4 years ago

@sukmapolitala what versions of OS and video library do you have installed? What error(s) are you getting?

sukmapolitala commented 4 years ago

os version catalina 10.15.3. processing 3.5.4 video library processing 1.0.1, i'm install via add library in processing. and error like this : libc++abi.dylib: terminating with uncaught exception of type NSException Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

please help me

lucidprojects commented 4 years ago

@sukmapolitala the others I helped get it working on running Catalina needed the 2.0-beta 3 video library installed.

You need to remove the 1.0.1 lib from the add library panel in processing, download the beta lib and manually drag / copy it to your documents/processing/libraries dir

sukmapolitala commented 4 years ago

@lucidprojects Great, it worked for me. Thank you so much for your help. finally able to rest after thinking about this.

lucidprojects commented 4 years ago

@sukmapolitala nice 💪🏼💪🏼💪🏼

Real-John-Cheung commented 4 years ago

@lucidprojects It works for me too! Thank you so much!

Real-John-Cheung commented 4 years ago

This process is working for me and a few others as a work around. Not the best but it does allow to permanently add camera access. This is working on both Mojave and Catalina. (Catalina needs to have the Video 2.0-beta3 lib installed).

  1. turn off SIP a.) reboot/restart in safe mode - hold cmd R on restart b.) from the menu bar go to utilities/terminal c.) enter cmd - csrutil disable d.) restart computer
  2. in terminal navigate to ~/Library/ApplicationSupport/com.apple.TC a.)cd /Users/##YOUR_USER##/Library/Application Support/com.apple.TC
  3. open sqlite db - sqlite3 TCC.db (as extra precaution maybe copy TCC.db to back up (cp TCC.db TCC_BACKUP_DATE.db) )
  4. OPTIONAL modify view (this just makes it easier to look at) a) .mode columns b) .headers on
  5. OPTIONAL - see everything with access select * from access;
  6. ADD camera access for processing - run this insert query - this will add a camera access entry for Processing to the TCC database INSERT INTO access (service, client, client_type, allowed, prompt_count) VALUES ('kTCCServiceCamera','org.processing.app',0,1,0);
  7. TEST - open processing & check camera access - also you can test that Processing shows up in SystemPrefs/privacy/camera
  8. If success quit sqlite - ctrl-d
  9. Turn SIP back on (REVERSE of STEP 1 - restart back into safe mode) but instead run csrutil enable
  10. After restart you may need to re-install Processing.app. It kept crashing, re-installing fixed it

Hope it helps some.

It works for me, but I want to mention that in my system the TCC.db file is in /Library/Application\ Support/com.apple.TCC

NoBodyButMe commented 4 years ago

Any news on this problem? I can't use Processing anymore with my students due to this problem.

NoBodyButMe commented 4 years ago

I tried all the solutions, nothing seems to work. I still receive a bunch of errors.

lucidprojects commented 4 years ago

@KrisMerckx what version of os, processing, & video lib do you have installed?

NoBodyButMe commented 4 years ago

The latest Catalina update and the latest version of processing. Following the instructions on github, I already updates the gstreamer version to beta 4.

Op wo 11 mrt. 2020 00:28 schreef Jacob Sherwood notifications@github.com:

@KrisMerckx https://github.com/KrisMerckx what version of os, processing, & video lib do you have installed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/processing/processing-video/issues/134?email_source=notifications&email_token=ABJ7EJJLY2FH6UESZECB3QTRG3EK5A5CNFSM4JCNEO4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEONSECQ#issuecomment-597369354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ7EJIYUG5BR3F55ITGPS3RG3EK5ANCNFSM4JCNEO4A .

lucidprojects commented 4 years ago

@KrisMerckx on Catalina, those that have gotten it working have needed the 2.0-beta 3 video library installed.

JingtianZong commented 4 years ago

@lucidprojects Hello. A few of my students are having the same issue and as @KrisMerckx did, we tried all solutions in the thread and nothing has worked so far. After trying your solution, there's still no Processing option in their privacy setting. The only clue I could see is that they all have the new MacBook Pro (2018 or 2019). Could the new MacBook be the cause to the problem?

lucidprojects commented 4 years ago

@JingtianZong I have this working on my 2018 mbp on Mojave.

Are you sure you made the update to the TCC.db to add the camera access for Processing?

If you're not seeing it in systemprefs then it sounds like that update was not done.

Can you post what your / your student's TCC.db says for processing?

select * from access where client like '%processing%' ;

JingtianZong commented 4 years ago

@lucidprojects Hi, not sure if she's doing it the correct way but here's what my student got:

2020-03-1711 15 05
lucidprojects commented 4 years ago

@JingtianZong it looks like she forgot the ; at the end of the query so it didn't actually run.

select * from access where client like '%processing%' ;

jamcoinc commented 4 years ago

For those of you still having this problem I found a trick that worked on my MacBook Pro 2019. I tried everything else here and still no luck until this. That being said I am running Processing beta 4 The Video 2.0 beta 4 video library GStreamer 1.16.2

If you run the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!

1)Install "processing-java" so you can run a sketch from terminal. From the processing tools menu select - install processing-java. Select For all users when prompted.

2)Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Use the full path to the directory containing the sketch on your machine. For me it looked like this

processing-java --sketch=/Users/jamesc/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run

dkgrieshammer commented 4 years ago

For those of you still having this problem I found a trick that worked on my MacBook Pro 2019. I tried everything else here and still no luck until this. That being said I am running Processing beta 4 The Video 2.0 beta 4 video library GStreamer 1.16.2

If you run the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!

1)Install "processing-java" so you can run a sketch from terminal. From the processing tools menu select - install processing-java. Select For all users when prompted.

2)Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Use the full path to the directory containing the sketch on your machine. For me it looked like this

processing-java --sketch=/Users/jamesc/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run

👏🤝😻🙏 Mac Catalina - works. Thanks a ton 👯‍♂

poswaggle commented 4 years ago

I have tried this so many times and still no joy. Trying to run the getting started sketch gives me this error:

Processing video library using GStreamer 1.16.0 Available cameras: [0] "FaceTime HD Camera (Built-in)" Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

I'm not seeing processing come up in the camera privacy tab in my system preferences. Is there a step I have missed?

thanks for any help.

Shhmoogly commented 4 years ago

Hello all, I am completely new to coding and I am having issues with my Mac.

I updated to OS Catalina 10.15.4

Camera is not working at all and my wife needs it to use for her ZOOM conferences. Please help me. Anything to help a new CODER out! <3 I have always wanted to learn and stumbled across this when trying to fix the camera. Everything above me is gibberish and I have no clue what to do.

I have opened Terminal before and that is about it!

TIA!

vwls commented 4 years ago

Hi @Shhmoogly! Is your issue occurring within the Processing environment? It sounds like it is not given that you're referring to Zoom.

That said, I did have a problem ("no camera connected" or something like that) when trying to video conference recently and this fixed it for me:

I may be way off, but wanted to reply in the event that this would solve your problem.

Shhmoogly commented 4 years ago

Hello @vwls , I was just referring to Zoom as a video capture example. All video is not working, weather that be in photo booth, facetime or even facebook video call.

You are correct it does give me a ("no camera connected") when trying to use the camera.

I have also tried the sudo killall VDCAssistant in the Terminal and it says that "No matching processes were found" yet the camera still does NOT work.

The series of events that lead up to this: Camera worked fine a few weeks ago, then my wife tried to use the camera the other day and I saw that I needed to system update, so I did to CATALINA and then the camera stopped working.

vwls commented 4 years ago

Try this (execute both commands in Terminal): sudo killall VDCAssistant sudo killall AppleCameraAssistant

If this doesn't work. Try restarting your computer - that might help.

Shhmoogly commented 4 years ago

Try this (execute both commands in Terminal): sudo killall VDCAssistant sudo killall AppleCameraAssistant

If this doesn't work. Try restarting your computer - that might help.

Just tried both of these and still no camera working on any applications.

Also, I reset my computer and nothing at all!

danieloskarsson commented 4 years ago

Hello all, I am completely new to coding and I am having issues with my Mac.

I updated to OS Catalina 10.15.4

Camera is not working at all and my wife needs it to use for her ZOOM conferences. Please help me. Anything to help a new CODER out! <3 I have always wanted to learn and stumbled across this when trying to fix the camera. Everything above me is gibberish and I have no clue what to do.

I have opened Terminal before and that is about it!

TIA!

Hi Shhmoogly.

Your problem seems to have very little to do with the technical aspects discussed in this thread, please refrain from continuing to dilute the content of this thread by posting general questions.

In general the shared larger issue is that since macOS Catalina 10.5 the operating system requires you as a user to give every single app the permission to use certain resources including (but not limited to) the camera. If done correctly by the developer of a given app that app should upon first use of a given resource display a dialog where you as a user allow the requested permission. You can find all permissions in System Preferences under Secury & Privacy > Privacy. Permissions can later be modified in the Privacy preferences, but not added manually.

This interaction with permission dialogs is what needs to happen for the camera to start working and it is up to the publisher of each application to make sure it does work correctly. If it doesn't you should seek support from the publisher of the application in question, e.g. for Zoom that is the Zoom Help Center.

GSAIxDPaul commented 4 years ago

Hi everyone. After much trying I have now got the video library working. Here are my specs: OSX Catalina 10.15.4 Processing 3.5.4 Video Library Release 6 (version 2.0-beta4)

I'll outline my journey through this:

GStreamer version issue and Capture.list() empty I followed the instructions given earlier by multiple people and made clear in this post but the GettingStartedCapture didn't work reporting that my GStreamer version was 1.12 and that the Capture.list() was empty. I thought that was strange as everyone else seemed to have 1.16. (I'm not sure when this framework was ever installed?!? By Processing?). I downloaded the 1.16 version from here and installed it. I restarted and still no success with the same example but this time it reported the GStreamer version as 1.16. Significantly the Capture.list() now contained a single entry for my Facetime HD Camera. But it still wouldn't run and the error became the familiar 'TargetVM not initialised' error...

No Processing in Security & Privacy/Privacy/Camera I noticed that Processing would never appear in my System Prefs/Security & Privacy/Privacy/Camera area – it should do the first time Processing asks for access to the camera. I read here that others experienced this problem. A clever solution was posted here which involved editing an SQL .db file in the user's Library using Terminal: /Users/YOUR_ACCOUNT_NAME/Library/Application Support/com.apple.TCC/TCC.db The method used to edit this file was a bit abstract to me and involved multiple restarts. I googled how to edit a .db file and found this little utility app. I copied the file out of the original folder and opened it up in this app. This app allows a visual way of making simple edits to .db files. I opened the version I copied out. Select 'Browse Data' then 'New Record'. This opens an empty record. In the 'service' field I pasted 'kTCCServiceCamera' and in the 'client' field I pasted 'org.processing.app' then set 'client_type' to 0, 'allowed' to 1, 'prompt_count' to 0. Then I pushed the 'Write Changes' and this saved the file. I copied the original somewhere safe in case something went wrong then replaced it the original with my new version. I opened System Prefs/Security & Privacy/Privacy/Camera and Processing had magically appeared. This method is a bit less intimidating for users with little Terminal experience.

I launched Processing and the GettingStartedCapture example and boom – it worked. Thanks to everyone here for their help in sorting this out. While this stuff is still not quite easy enough for a class of students of different abilities to implement it helps me develop classes for next academic year and do my artwork. Hopefully it will all be smoothed out soon with an update. Thanks again and hope this helps!

GSAIxDPaul commented 4 years ago

Yes indeed it’s not good. The video breaking issue was a serious problem for me last semester for a video-specific project. My workaround was to use Kinect video streams. If what you teach exclusively involves the use of live video in Processing and you have no way to workaround this using Kinect or Syphon or even a PS3 camera then you have a problem.

The Processing environment is by far the best teaching environment for any student hoping to develop a creative coding practice and for any student in an art school. The Video library Capture problem (Movie playback works) is only a small part of the wider Processing world. OpenFrameworks is not a good option for beginners in my opinion. I thought I’d share my journey and show some light at the end of the tunnel.

VendrellPT commented 4 years ago

As a student starting to use Processing wanting it to work and after a day of searching Forums and threads this is what worked for me in 7 (almost) easy steps: macOs Catalina 10.15.3 (MacBook Pro, 2018)

  1. replace ~/Documents/processing/libraries/video with "video" folder from https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4

By now the video library was not recognized so I followed @ihaveaccount comment (https://github.com/processing/processing-video/issues/134#issuecomment-550000519) but used @easytarget2000 commands (https://github.com/processing/processing-video/issues/134#issuecomment-550359384)

  1. Open Terminal and run these commands:
    • cd ~/Documents/processing/libraries/video/library/macosx
    • xattr -p com.apple.quarantine libavcodec.58.35.100.dylib

"it will return string like this: 0081;5dc1bfaa;Chrome;78F18F7D-3F71-4E55-8D58-BAB946AB4707 replace 0081 with 00c1 and copy string then replace STRING in the following command with your string"

Nothing new in this comment section, but by now I got the library reading but this error messages "Processing video library using GStreamer 1.16.0" e "Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting."

The built-in camera was recognized using these lines of code: String [] cameras = Capture.list(); println(cameras[0]); capture = new Capture(this, 320, 240, cameras[0]);

But just a big crash report after running the sketch (Processing app was not authorized to use the camera)

My solution for this:

  1. Go to /Applications and right-click on the Processing app to "show Package Contents"
  2. Go to Processing.app/Contents/MacOS folder and run the "Processing" file (it should open Terminal and then Processing)
  3. Go to "Files Open Recent" or "Exemples" and run a sketch WITH the "Capture" function
  4. This should Pop-Up a request access to the camera! Accept it
  5. After closing Terminal and Processing it worked perfectly for me!

I advise reading the tagged comments before you follow these steps since they are from much more experienced people than I am!

Hope it helps! And sorry for grammar or some noob mistakes since I created an account just to post this and to thanks all of the comments since it's from them that I was able to do this.

VendrellPT commented 4 years ago

@KrisMerckx Well honestly commenting that it doesn't work out for you without adding any specific problem or your current difficulties does nothing. This is obviously something that will eventually be solved but for now, copying and pasting 4 commands in Terminal isn't exactly too complicated to anyone in my opinion. Adding a series of screenshots allows to a very simple set of directions (believing that what I commented works for you and your students) it worked for all my colleagues that were in this situation and basically no one had ever used Terminal.

dkgrieshammer commented 4 years ago

@KrisMerckx please stop repeating after each attempt to solve the Problem, we got that it’s not working for you by now and it‘s unfortunate. Please don’t get me wrong, I feel u, also working with students, but repeating without new insight just fills up the comment section.

Btw p5js camera is working fine, last course students switched to p5 for camera sketches while learning about web and js - not the same but quite good. Also easily presentable via web in lockdown times.

dantepfer commented 4 years ago

@KrisMerckx you do realize Processing is free software, yes? Nobody's getting paid to make it work, and nobody owes you anything. If you can fix this problem, then by all means do it yourself by writing your own video library. If you can't, then stop complaining and be grateful that others are working on it for free. Obviously, everyone here agrees with you that it would be great if this worked right out of the box.

dkgrieshammer commented 4 years ago

You realize that we‘re not affiliated, we‘re also teachers and users, in the same situation as u trying to to help each other including you. Instead of saying thanks when somebody tries to find a solution for you you’re rude. As said, same situation here, last course we switched to p5, Video worked for all students. give it a try, hope it helps.

johnbcarpenter commented 4 years ago

I was able to get the GettingStartedCapture.pde example working on a 2017 MacBook Pro running Catalina (10.15.4) by following the instructions discussed above (download the beta4 video library + fix the library quarantine settings + calling out the camera "FaceTime HD Camera (Built-in)" + installing processing-java to launch via the terminal)... but I'm still not sure exactly how. I went through the steps and attempted to run GettingStartedCapture.pde via the terminal: processing-java --sketch=/Users/USERNAME/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run and wasn't able to get the sketch to do anything (beyond the gray screen), so I worked on something else. Today I REBOOTED, attempted to run the processing-java command again and got an error about permissions issues. Went through the xattr quarantine setup a second time, launched the sketch and triggered a MacOSX pop-up asking if I wanted to allow access to the camera, and I can run the example. It's strange -- for me the fix was some combo of the above steps with a reboot. I also had a student report a similar experience: that the reboot at some point fixed things. Something to try for people still having trouble.

verdasgr commented 4 years ago

For those of you still having this problem I found a trick that worked on my MacBook Pro 2019. I tried everything else here and still no luck until this. That being said I am running Processing beta 4 The Video 2.0 beta 4 video library GStreamer 1.16.2

If you run the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!

1)Install "processing-java" so you can run a sketch from terminal. From the processing tools menu select - install processing-java. Select For all users when prompted.

2)Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Use the full path to the directory containing the sketch on your machine. For me it looked like this

processing-java --sketch=/Users/jamesc/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run

It worked after 5 hours of trying everything else! Thank you so much, on another note when you first said "run it on terminal" I just dragged the sketch to terminal and hit enter, which was saying the file cannot be found. How did you know you had to type "processing-java --sketch=" in the beginning and "--run" in the end? Is there a guide to how to use the terminal for this kind of stuff? (to study and learn) thanks!

EDIT: It only worked for gettingStartedCapture sketch not for other video sketches. This work around by Enigmeta did the job for others:

In each example, the Capture constructor requires the name of the camera. Adapt each example like so: // old code video = new Capture(this, 640, 480);

// new code String[] cameras = Capture.list(); video = new Capture(this, 640, 480, cameras[0]);

Zad2 commented 4 years ago

For those of you still having this problem I found a trick that worked on my MacBook Pro 2019. I tried everything else here and still no luck until this. That being said I am running Processing beta 4 The Video 2.0 beta 4 video library GStreamer 1.16.2

If you run the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!

1)Install "processing-java" so you can run a sketch from terminal. From the processing tools menu select - install processing-java. Select For all users when prompted.

2)Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Use the full path to the directory containing the sketch on your machine. For me it looked like this

processing-java --sketch=/Users/jamesc/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run

Works on Catalina, 2018 mac. Thanks a lot!!

andmaliang commented 4 years ago

As a student starting to use Processing wanting it to work and after a day of searching Forums and threads this is what worked for me in 7 (almost) easy steps: macOs Catalina 10.15.3 (MacBook Pro, 2018)

1. replace ~/Documents/processing/libraries/video with "video" folder from https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4

By now the video library was not recognized so I followed @ihaveaccount comment (#134 (comment)) but used @easytarget2000 commands (#134 (comment))

1. Open Terminal and run these commands:

* cd ~/Documents/processing/libraries/video/library/macosx

* xattr -p com.apple.quarantine libavcodec.58.35.100.dylib

"it will return string like this: 0081;5dc1bfaa;Chrome;78F18F7D-3F71-4E55-8D58-BAB946AB4707 replace 0081 with 00c1 and copy string then replace STRING in the following command with your string"

* xattr -w com.apple.quarantine "STRING" *.dylib

* cd gstreamer-1.0

* xattr -w com.apple.quarantine "STRING" *.dylib

Nothing new in this comment section, but by now I got the library reading but this error messages "Processing video library using GStreamer 1.16.0" e "Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting."

The built-in camera was recognized using these lines of code: String [] cameras = Capture.list(); println(cameras[0]); capture = new Capture(this, 320, 240, cameras[0]);

But just a big crash report after running the sketch (Processing app was not authorized to use the camera)

My solution for this:

  1. Go to /Applications and right-click on the Processing app to "show Package Contents"
  2. Go to Processing.app/Contents/MacOS folder and run the "Processing" file (it should open Terminal and then Processing)
  3. Go to "Files Open Recent" or "Exemples" and run a sketch WITH the "Capture" function
  4. This should Pop-Up a request access to the camera! Accept it
  5. After closing Terminal and Processing it worked perfectly for me!

I advise reading the tagged comments before you follow these steps since they are from much more experienced people than I am!

Hope it helps! And sorry for grammar or some noob mistakes since I created an account just to post this and to thanks all of the comments since it's from them that I was able to do this.

Thanks, VendrellPT, some of us followed this step and runs very well, but some of us if we check the mac preferences the permission of camera allows not processing app, but terminal, after we opened the content folder and open procssing by terminal. so each time we open processing and using video library , we have to go inside processing cotent and open it by terminal, how to ssolve this problem ?

crcdng commented 4 years ago

My step-by-step workaround for camera and microphone (requires that you are a member of the Apple Developer program) here:

https://gist.github.com/i3games/b063987dfb62baf5d0afda422631b480

tobiasalbirosa commented 4 years ago

Running the example file that comes with the Processing video library throws the following error:

libc++abi.dylib: terminating with uncaught exception of type NSException Could not run the sketch (Target VM failed to initialize). Make sure that you haven't set the maximum available memory too high. For more information, read revisions.txt and Help → Troubleshooting.

This issue is also reported here:

https://discourse.processing.org/t/did-macos-catalina-or-something-break-the-video-library/14699

There is some speculation in that thread that the library depends on 32bit compiled code which is no longer supported in Mac OS Catalina as Apple is now requiring applications be 64bit.

Resolving this issue is beyond my expertise but it would be awesome if Mac users could continue to use the video library without having to downgrade to older versions of OS X.

https://github.com/processing/processing-video/releases I'd tried whit an lower version and work it, i have mac os catalina 10.15.16(updated today) and processing 3.5.4(updated today), using Video Library Release 5 (version 2.0-beta3)([https://github.com/processing/processing-video/releases/tag/r5-v2.0-beta3]), the last Release is the 6

tobiasalbirosa commented 4 years ago

Running the example file that comes with the Processing video library throws the following error:

libc++abi.dylib: terminating with uncaught exception of type NSException Could not run the sketch (Target VM failed to initialize). Make sure that you haven't set the maximum available memory too high. For more information, read revisions.txt and Help → Troubleshooting.

This issue is also reported here:

https://discourse.processing.org/t/did-macos-catalina-or-something-break-the-video-library/14699

There is some speculation in that thread that the library depends on 32bit compiled code which is no longer supported in Mac OS Catalina as Apple is now requiring applications be 64bit.

Resolving this issue is beyond my expertise but it would be awesome if Mac users could continue to use the video library without having to downgrade to older versions of OS X.

capture
seungtaehello commented 4 years ago

For those of you still having this problem I found a trick that worked on my MacBook Pro 2019. I tried everything else here and still no luck until this. That being said I am running Processing beta 4 The Video 2.0 beta 4 video library GStreamer 1.16.2

If you run the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!

1)Install "processing-java" so you can run a sketch from terminal. From the processing tools menu select - install processing-java. Select For all users when prompted.

2)Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Use the full path to the directory containing the sketch on your machine. For me it looked like this

processing-java --sketch=/Users/jamesc/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run

Thank you so much for this!! I have spent two days to solve this problem. Now it works!

makakken commented 4 years ago

okay, new update, after installing with the workaround of: https://github.com/processing/processing-video/issues/134#issuecomment-550000519

i got the following error:

Processing video library using GStreamer 1.16.0
Available cameras:
FaceTime HD-Kamera (integriert)
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.

I really need that fix ;) Can i help in any way?

MacOS Catalina 10.15.6 Processing 3.5.4

So, i tryed from command line:

Processing video library using GStreamer 1.16.0
Available cameras:
[0] "FaceTime HD-Kamera (integriert)"
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.
Could not run the sketch.
[Finished in 6.8s with exit code 1]
[cmd: ['processing-java', '--force', '--sketch=/Users/gooze/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture', '--run']]
[dir: /Users/gooze/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture]
[path: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin]
rodinia814 commented 4 years ago

I followed the steps here which fixed the issue for me (make sure Processing is not running, or quit and restart it after doing these steps): https://discourse.processing.org/t/did-macos-catalina-or-something-break-the-video-library/14699/17

benfry commented 4 years ago

Hi all, sorry that this has been broken for so long. The video and sound libraries were moved out of the core because 1) they were very large, and 2) so that others could maintain them. Unfortunately there's nobody doing that maintenance at the moment, so here we are.

I've made some additional edits for the next Processing 4 release (alpha 3) that should at least provide the basis for this, so that code will request camera access. We'll have to get a new video release out, however, so that it works without additional messing with folders and .dylib files.

Thanks very much to @VendrellPT for the helpful comment on how to get things working in the meantime.

johnbcarpenter commented 4 years ago

Thanks for all your work on the Processing codebase Ben!

benfry commented 3 years ago

Thanks, @johnbcarpenter.

Alright folks, @codeanticode was able to make some additional updates to the video library and has posted a new 2.0 release!

You can find the release here: https://github.com/processing/processing-video/releases/tag/latest and it should show up as an update in the Contributions Manager sometime soon.

Also, be sure to read the following from the release notes:

Camera capture should work in Processing 3.x when running on Windows and Linux, unfortunately, due to security & privacy changes in macOS since Mojave, it will not work on macOS 10.14 and newer. Camera capture is supported on macOS only in Processing 4.x. Video playback should work in Processing 3.x across all platforms though.

benfry commented 3 years ago

(Didn't mean to close that…) We'll post a 4.0a3 release soon which incorporates the additional changes so that applications prompt for the necessary permissions. Once that's done, we should be all set.

In the meantime, you can build Processing 4 from the source and manually install the latest video release if you don't want to wait.

doronby commented 3 years ago

ETA ?