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

video library not working on debian 12: "Unable to load library 'avresample'" and other error messages #221

Open
joachimheintz opened this issue Sep 24, 2023 · 8 comments

Comments

@joachimheintz
Copy link

i cannot use the video library at all.
this is my system (uname -a):
Linux debian12 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64 GNU/Linux
and java --version reports:

openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.8+7-Debian-1deb12u1, mixed mode, sharing)

and this is what i did:

  1. downloaded processing 4-3 from https://github.com/processing/processing4/releases/download/processing-1293-4.3/processing-4.3-linux-x64.tgz, unpacked and ran.
  2. installed Video Library for Processing 4 via Sketch > Import Library > Manage Libraries.
  3. ran AsciiVideo from the Examples (File > Examples > Libraries > Video Library for Processing 4 > Capture > AsciiVideo)

the example does not run, reporting a link error for libavresample (and at the end an error about libsoup which i don't understand). i did some search and followed the advice in #214 to create a symlink. but this did not help.

none of the examples for the video library work. all fail with the error message below. otherwise processing works allright.

can't load library avresample (avresample|libavresample|libavresample-0) with -Djna.library.path=/home/jh/sketchbook/libraries/video/library/linux-amd64. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'avresample':
/home/jh/sketchbook/libraries/video/library/linux-amd64/libavresample.so: file too short
/home/jh/sketchbook/libraries/video/library/linux-amd64/libavresample.so: file too short
libavutil.so.56: cannot open shared object file: No such file or directory
Native library (linux-x86-64/libavresample.so) not found in resource path (/tmp/processing/AsciiVideo11439244291195431793temp:/home/jh/processing-4.3/core/library/core.jar:/home/jh/processing-4.3/core/library/gluegen-rt.jar:/home/jh/processing-4.3/core/library/jogl-all.jar:/home/jh/sketchbook/libraries/video/library/gst1-java-core-1.4.0.jar:/home/jh/sketchbook/libraries/video/library/jna.jar:/home/jh/sketchbook/libraries/video/library/video.jar)

(process:55555): libsoup-ERROR **: 18:49:04.110: libsoup3 symbols detected. Using libsoup2 and libsoup3 in the same process is not supported.
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.
@bewegende-Architektur
Copy link

Hallo,

the same error occurs on Manjaro Linux:

6.6.10-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Jan 5 17:38:36 UTC 2024 x86_64 GNU/Linux

(process:103631): libsoup-ERROR **: 15:43:09.232: libsoup3 symbols detected. Using libsoup2 and libsoup3 in the same process is not supported.
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.

Is there an update on this issue?
Thanks in advance.

Greetings

@kflak
Copy link

kflak commented Feb 28, 2024

hi,

same thing here on Arch Linux:

(process:291408): libsoup-ERROR **: 11:43:43.260: libsoup3 symbols detected. Using libsoup2 and libsoup3 in the same process is not supported.
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.

java 21

@fukuchi
Copy link

fukuchi commented Apr 11, 2024

Hi,

I have found a workaround. The problem is caused by the library files that come with the official release of processing-video. Removing them may solve the problem, as Processing will use the equivalent libraries installed system-wide. (Tested on Ubuntu 23.10)

For example, if your sketchbook folder is ~/sketchbook/, the libraries are located in ~/sketchbook/libraries/video/library/linux-amd64. Delete or rename the folder and restart Processing.

You need to install the equivalent libraries system-wide by using your package manager. You should probably install the following:

  • libgstreamer1.0-0
  • gstreamer1.0-plugins-good

@kflak
Copy link

kflak commented Apr 11, 2024

Thanks @fukuchi! Unfortunately this doesn't work on my arch linux installation. I don't have the time now to plough through the errors, but I'm pretty sure I have the dependencies installed. Will look into it a bit more when I have time. If I remember correctly the gstreamer libraries where packaged together with processing a while ago when gstreamer broke openframeworks and processing with a new version. 1.20 if my memory serves me right...

@fukuchi
Copy link

fukuchi commented Apr 11, 2024

@kflak I forgot to write about my environment. I am using Ubuntu 23.10 and the installed gstreamer seems to be version 1.22.

@kflak
Copy link

kflak commented Apr 11, 2024

Yeah, I guess I'm probably missing some systemwide libraries... Will try to find them on Arch. It does seem like Processing is looking for them but can't find them when I delete the linux-arm libs.

@mario6097
Copy link

mario6097 commented May 20, 2024

Hi
I have the same issue on a Linux Fedora 6.8.9-200.fc39.x86_64 machine, and Processing 4.3.
Is there a fix? I do not get how you fixed it. The video library is not working.

EDIT My workaround:
Install Processing 3.5.4 and Video Library 2.0 (Video Library for Processing 3). The AsciiVideo example works fine.
Now, if you launch Processing 4.3, the AsciiVideo example works fine too.
Since the two installs share the same sketchbook folder, and the same libraries folder too, Video Library 2.0 has just overwritten Video Library 2.2 (Video Library for Processing 4). Indeed, the folder video/library/linux-amd64 is gone.

EDIT: Eventually, it is much better to avoid a common sketchbook folder. So, I created the folders sketchbook3 and resp. sketchbook4 and configured within `/home/.../.processing/ by

sketchbook.path.four=/home/.../sketchbook4 (for 4.3)

sketchbook.path.three=/home/.../sketchbook3 (for 3.5.4).

For Processing 4.3 and the Video Library 4, it seems you just need to replace the folder sketchbook4/libraries/video/library with the homonym folder from Video Library 3 (sketchbook3/libraries/video/library).

NOTE: If I install Video Library 2.2 and just try to erase the folder linux-amd64, it does not work (I get a long error msg).

NOTE TO DEVELOPERS Different versions should be shipped with versioned install.sh files as to let install multiple versions without any overwriting. Maybe the same for the .processing config file.

@kflak
Copy link

kflak commented May 20, 2024

Wow, thanks a lot for the workaround! I can confirm that reverting back to an old version of the video library I happened to have lying around did the trick. In my case I wasn't able to install processing 3.5, as it doesn't play well with my particular java environment, but video lib 2.0 does indeed seem to work.

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