Javacv: Failed to load in the latest version of windows server2012 R2

Created on 18 Dec 2020  ·  6Comments  ·  Source: bytedeco/javacv



org.bytedeco
javacv-platform
1.5.4

i use the maven Repository latest,It is normal in win10 win7 Linux Windows Server 2016 / 2019
but in the windwos server 2012R2
error:NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avcodec
when i use try catch :
run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniavcodec in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:410)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.avcodec.(avcodec.java:12)
at org.bytedeco.javacv.FFmpegFrameGrabber.(FFmpegFrameGrabber.java:103)
at com.nackloose.util.robot.JavaCVDemo.main(JavaCVDemo.java:37)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Nackloose\AppData\Local\Temp\javacpp29106638795626\jniavcodec.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
... 5 more

I've looked at all the similar questions for issue
For example:
Load at project startup(Loader.load(swresample.class)
Loader.load(avcodec.class))
or
try {
Loader.load(.class);
} catch (UnsatisfiedLinkError e) {
String path = Loader.cacheResource(.class, "windows-x86_64/jni.dll").getPath();
new ProcessBuilder("c:/path/to/DependenciesGui.exe", path).start().waitFor();
}
All methods have been tried
when i Loader.load(avcodec.class)
error:
UnsatisfiedLinkError: no jniavutil in java.library.path
last
i use the old version

org.bytedeco
javacv-platform
1.5.4

duplicate question

All 6 comments

<dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.5.1</version> </dependency>
The normal version of this program is replaced at last

Please make sure that Media Foundation is installed like this:
https://github.com/bytedeco/javacv/blob/master/.travis.yml#L64

Duplicate of bytedeco/javacpp-presets#940

thanks

If it still doesn't work after installing Media Foundation though, please let me know!

If it still doesn't work after installing Media Foundation though, please let me know!

Recently, I tested video service across platforms, and I will give feedback in time if there is any problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

The-Crocop picture The-Crocop  ·  5Comments

RaGreen picture RaGreen  ·  4Comments

SenudaJayalath picture SenudaJayalath  ·  3Comments

y4nnick picture y4nnick  ·  3Comments

kongqw picture kongqw  ·  4Comments