Hi,
I have been reviewing and reading the docs for the VLCJ but unfortunately could not come to a conclusion of configuring and running it correctly.
It is appreciated if someone placing an example, snippet or tutorial of that.
Hi,
I have been reviewing and reading the docs for the VLCJ but unfortunately could not come to a conclusion of configuring and running it correctly.
It is appreciated if someone placing an example, snippet or tutorial of that.
The error you posted usually means LibVLC loaded, but could not find its plugins folder. Two things trip people up on Windows: a 32/64-bit mismatch and an incorrect plugins path. If you are running a 32-bit JDK, make sure you installed the 32-bit build of VLC under C:\Program Files (x86)\VideoLAN\VLC (not Program Files). Java and VLC must be the same bitness; you can’t mix 32-bit with 64-bit. (stackoverflow.com)
Also, the jars you listed look mismatched: jna-4.0.0.jar with platform-3.5.2.jar. For vlcj 2.4.x you should use JNA and JNA-Platform 3.5.2 together. Mixing JNA versions can cause initialisation failures and the “No plugins found!” error you’re seeing. (stackoverflow.com)
Quick checklist:
VLC_PLUGIN_PATH to C:\Program Files (x86)\VideoLAN\VLC\plugins (or the 64-bit path if you use 64-bit). Do not rely on --plugin-path; that option was removed in newer VLC builds. (stackoverflow.com)-Dvlcj.log=DEBUG. (stackoverflow.com)If you are starting fresh today, a simpler approach is to let vlcj discover LibVLC automatically and verify the version at startup:
import uk.co.caprica.vlcj.discovery.NativeDiscovery;
import uk.co.caprica.vlcj.binding.LibVlc;
public class CheckVlc {
public static void main(String[] args) {
System.setProperty("vlcj.log","DEBUG");
boolean found = new NativeDiscovery().discover();
System.out.println("Found LibVLC? " + found + " | " + LibVlc.INSTANCE.libvlc_get_version());
}
} The current vlcj tutorials show this discovery-first pattern and are a good reference if you later embed a player component. (capricasoftware.co.uk)
’s link is a great starting point; the steps above fill in the version/bitness and plugin-path gaps that trigger your exact error.
Jump to Post— JamesCherrill 4,733Did you find this?
Did you find this?
Thanks for the reply, yeah I have both part but getting the error ...
[03b70b50] main libvlc error: No plugins found! Check your VLC installation.
Exception in thread "main" java.lang.RuntimeException: Failed to initialise libvlc.
import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent;
import uk.co.caprica.vlcj.runtime.RuntimeUtil;
import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;
public class Tutorial1A {
private EmbeddedMediaPlayerComponent mediaPlayerComponent;
public Tutorial1A() {
// Ensure we're using the 32bit jdk.
System.out.println("jdk version: "
+ System.getProperty("sun.arch.data.model") + " bits.");
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(),
"C:\\Program Files\\VideoLAN\\VLC");
Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
mediaPlayerComponent.getMediaPlayer().playMedia(
"C:\\Users\\Tanha\\Videos\\Facebook.mp4");
}
public static void main(String[] args) {
new Tutorial1A();
}
}
I am sure the problem is with verison because I am following the most latest verison as follow:
vlcj-2.4.0.jar
platform-3.5.2.jar
jna-4.0.0.jar
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.