javacpp-presets
javacpp-presets copied to clipboard
jniavcodec.dll: Can't find dependent libraries
Hi, When I deploy the project to new machine, error found as following:
C:\Users\Administrator\.javacpp\cache\ffmpeg-4.3.1-1.5.4-SNAPSHOT-windows-x86_64.jar\org\bytedeco\ffmpeg\windows-x86_
64\jniavcodec.dll: Can't find dependent libraries
Why?
Make sure multimedia support is installed.
Yes, gradle configuration as following:
```
compile group: 'org.bytedeco', name: 'javacpp', version: "$rootProject.ext.javacppVersion"
compile group: 'org.bytedeco', name: 'ffmpeg', version: "$rootProject.ext.ffmpegPlatformVersion"
compile group: 'org.bytedeco', name: 'javacpp-platform', version: "$rootProject.ext.javacppVersion"
compile group: 'org.bytedeco', name: 'ffmpeg-platform', version: "$rootProject.ext.ffmpegPlatformVersion"
I mean, on your Windows machine.
What do you mean by “multimedia support”?
The ffmpeg (and ffmpeg-plaform) and javacpp (and javacpp-plaform) have included in the release jar file.
https://docs.microsoft.com/en-us/windows/win32/multimedia/windows-multimedia-start-page
https://docs.microsoft.com/en-us/windows/win32/medfound/microsoft-media-foundation-sdk
If these things don't work on your version of Windows, FFmpeg will not work either. You need a version of Windows that supports multimedia to be able to do multimedia.
Yes, Windows no problem, It worked before for my old release jar, but now it doesn't work for my new release jar.
You said you deployed on a new machine. You'll need to have support for multimedia on that new machine, or it will not work.
You said you deployed on a new machine. You'll need to have support for multimedia on that new machine, or it will not work.
There was no problem with the new machine running jar before.
==== the new machine is the prod version (not work), the local machine is the test version (works ok).
It's possible some new feature of FFmpeg supports "new" multimedia features on Windows, so maybe you'll need to upgrade the multimedia support on that machine! If you do not want to upgrade anything on that machine, then I would also recommend to not upgrade anything else, including FFmpeg.
To get more specific information about what it's looking for exactly, please try to use the Dependencies tool: https://github.com/bytedeco/javacpp-presets/wiki/Debugging-UnsatisfiedLinkError-on-Windows
BTW, if you figure out what we need to disable to make this run on your production machine, we could have that feature disabled in the new default build, but still enabled in the -gpl
extension added with pull #950 (issue #419).
If this is on Windows Server, you might need to install Media Foundation this way: https://github.com/bytedeco/javacv/blob/master/.travis.yml#L64