processing-video icon indicating copy to clipboard operation
processing-video copied to clipboard

Export to Application not working with the current video library

Open benfry opened this issue 4 years ago • 17 comments

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: https://github.com/processing/processing4/issues/176 which is not a PDE issue.

benfry avatar Jun 18 '21 21:06 benfry

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.

benfry avatar Jun 18 '21 21:06 benfry

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.

Avanividhani avatar Jul 31 '21 11:07 Avanividhani

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.

dualdiode avatar Jul 31 '21 13:07 dualdiode

Hey!

I figured it out!!! So you have to use video library-2.0-beta1 in which the gstreamer supports. Just type on google “video library -2.0-beta1” you will find a link, if not let me know I will send you the link.

Regards,

On Sat, 31 Jul 2021 at 7:05 PM, dualdiode @.***> wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/processing/processing-video/issues/188#issuecomment-890349849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQZ6KJYBQAHX6FFFRPNEQQDT2P33ZANCNFSM466LYNMQ .

-- Avani Vidhani

Avanividhani avatar Jul 31 '21 13:07 Avanividhani

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 avatar Jul 31 '21 15:07 dualdiode

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: https://github.com/processing/processing-video/issues/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).

dualdiode avatar Aug 01 '21 10:08 dualdiode

Ok, I'll check it out.

On Sun, 1 Aug 2021 at 4:23 PM, dualdiode @.***> wrote:

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 https://github.com/processing/processing-video/issues/80 I can't get this to work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/processing/processing-video/issues/188#issuecomment-890495512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQZ6KJ3PQNPLXKRBXULJKMDT2URRVANCNFSM466LYNMQ .

-- Avani Vidhani

Avanividhani avatar Aug 01 '21 11:08 Avanividhani

@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.

benfry avatar Aug 01 '21 14:08 benfry

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

dualdiode avatar Aug 01 '21 15:08 dualdiode

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

benfry avatar Aug 01 '21 16:08 benfry

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 avatar Aug 02 '21 13:08 dualdiode

@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 avatar Aug 02 '21 21:08 dualdiode

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.

dualdiode avatar Aug 03 '21 00:08 dualdiode

hey, @dualdiode yes you have to install video library-2.0-beta1 with the latest java. Then it should work.

On Tue, Aug 3, 2021 at 2:47 AM dualdiode @.***> wrote:

@Avanividhani https://github.com/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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/processing/processing-video/issues/188#issuecomment-891339657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQZ6KJ22R3OZ3XFECLKZPXDT24DO7ANCNFSM466LYNMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Avani Vidhani

Avanividhani avatar Aug 03 '21 04:08 Avanividhani

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: https://github.com/processing/processing4/issues/176#issuecomment-855268791

benfry avatar Aug 03 '21 15:08 benfry

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.

dualdiode avatar Aug 16 '21 16:08 dualdiode

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.

jmej avatar Aug 17 '21 21:08 jmej