Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to Application not working with the current video library #188

Open
benfry opened this issue Jun 18, 2021 · 17 comments
Open

Export to Application not working with the current video library #188

benfry opened this issue Jun 18, 2021 · 17 comments

Comments

@benfry
Copy link
Contributor

benfry commented Jun 18, 2021

After installing the current release of the video library from the Contribution Manager with 4.0a4, attempting to Export to Application on macOS (Catalina, Big Sur) results in UnsatisfiedLinkError for gstreamer.

Might be related to this report: benfry/processing4#176 which is not a PDE issue.

@benfry benfry added the mac label Jun 18, 2021
@benfry
Copy link
Contributor Author

benfry commented Jun 18, 2021

Marking as macOS since I've not had a chance to check it on Linux and Windows. I assume it's probably there as well.

@Avanividhani
Copy link

same is happening in windows! I am making a project with processing. The sketch is a game with three stages, and works with mic threshold. When the user's voice crosses a certain range of threshold, it reaches another level of the game. This sketch includes a total of six videos and button pngs. The sketch is working fine with the pde file but I am trying to export it in application (exe). After exporting, when I try to open the exe it just shows me a grey screen, and sometimes the screen freezes.

Kindly help me with this, and I hope to hear from you soon with a solution.

@dualdiode
Copy link

I have the same issue, and wondered if it is related to the standalone application not successfully requesting macOS Catalina camera access control?
For me, Catalina did recognise and approve the Processing 4 app request for camera use, but the standalone app does not trigger an approve access of camera dialog.

@Avanividhani
Copy link

Avanividhani commented Jul 31, 2021 via email

@dualdiode
Copy link

dualdiode commented Jul 31, 2021

Hi, I installed that library and the GettingStartedCapture works in Processing 4 but I still can't get standalone apps to run, one of the errors is "GettingStartedCapture has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 "
Might you know of a fix for this? I reinstalled the latest jdk-16.0.2_osx-x64_bin and jre-8u301-macosx-x64.dmg - but still getting the same error.
Forgot to say, thanks so much for pointing that out!!

@dualdiode
Copy link

dualdiode commented Aug 1, 2021

Tried to work this out for several hours, and found that when using the video library, java is not included properly in the export application, similar to this issue: #80

So, with the latest JRE installed and exporting an app in p5-4 using the video library I get the error "GettingStartedCapture has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 "

And, without JRE installed, I get the error "Unable to load Java Runtime Environment"

When I export an app that does not use the video library there are no issues (with and without JRE installed).

@Avanividhani
Copy link

Avanividhani commented Aug 1, 2021 via email

@benfry
Copy link
Contributor Author

benfry commented Aug 1, 2021

@codeanticode It looks like the problem is this line: https://github.com/processing/processing-video/blame/master/src/processing/video/Video.java#L285

You could check to see if the macosx subdirectory exists, so that things run without changes from Eclipse, but the macosx directory should be transparent to the library… The whole point of how libraries are structured in Processing is to avoid all those buildXxxxxPaths() in the code. The macosx directory is not present after Export to Application. I'm surprised that this is working from inside the PDE at all; it must be picking up the original library folder which retains the structure.

@dualdiode
Copy link

dualdiode commented Aug 1, 2021

There is a MacOS subdirectory (but not a macosx subdirectory) at /Processing/libraries/video/examples/Capture/GettingStartedCapture/application.macosx/GettingStartedCapture.app/Contents/MacOS

@benfry
Copy link
Contributor Author

benfry commented Aug 1, 2021

Yes, and the problem is that the video library is hard-wired to look for a macosx subdirectory.

@dualdiode
Copy link

Might you know of a workaround of the macosx / MacOS subdirectory naming issue (I suppose to make the app find gstreamer)? I tried for best part of the day and can't find a way to get it to run.

@dualdiode
Copy link

@Avanividhani when you say you found a way to get this to work, do you mean a standalone application using camera capture running on MacOS Catalina exported from Processing 4 using video library-2.0-beta1 ? Sorry to ask again, I just want to be sure I understood correct as I think I tried everything the past days. Need to finish this tomorrow morning, the only alternative I can think of is running a separate linux system just for the capture, not ideal. Thank you

@dualdiode
Copy link

ok I found running the sketch through processing-java works and is the closest to a standalone app, not perfect but will do for now, many thanks for your thoughts.

@Avanividhani
Copy link

Avanividhani commented Aug 3, 2021 via email

@benfry
Copy link
Contributor Author

benfry commented Aug 3, 2021

Might you know of a workaround of the macosx / MacOS subdirectory naming issue (I suppose to make the app find gstreamer)? I tried for best part of the day and can't find a way to get it to run.

Until the issue is fixed, you can manually put parts of the library into a folder called macosx.

See this comment for an image of what that looks like: benfry/processing4#176 (comment)

@codeanticode codeanticode added this to the Version 2.1.0 milestone Aug 14, 2021
@dualdiode
Copy link

Ah thanks so much for pointing that out, I had tried adding the macosx folder to the main Contents folder (where the MacOS folder is situated) but didn't think to put it in the /Java folder - thank you I will try this.

@jmej
Copy link

jmej commented Aug 17, 2021

This is a problem on windows as well using the latest beta (2.0 beta 5) of the library. Manually putting the video library files in lib/windows64/ inside of the export directory resolves most of the library not found errors. The problem is now "could not load gsteamer plugins from . . ." -- the path it gives is an absolute path to the exported folder and then /lib/windows64/gstreamer1.0/. This error shows up even though the gstreamer files have been manually put there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants