Olá....
Sou iniciante na parte de java Multimidia ....
E estou tendo dificuldades em utilizar o jvlc ....
Eu preciso criar um programinha que verifica o tempo de um audio em varios formatos ....
Só que está me gerando esse erro de biblioteca....
Alguem já passou por isso ?? se passou pode me dá uma ajudinhaa ....
java.lang.RuntimeException: Failed to load the native library.
The error was "Unable to load library 'libvlc': Não foi possível encontrar o módulo especificado.
".
The required native libraries are named "libvlc.dll" and "libvlccore.dll".
In the text below <libvlc-path> represents the name of the directory containing "libvlc.dll" and "libvlccore.dll".
There are a number of different ways to specify where to find the native libraries:
1. Include NativeLibrary.addSearchPath("libvlc", "<libvlc-path>"); at the start of your application code.
2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code.
3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application.
4. Add <libvlc-path> to the system search path (and reboot).
More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application.
at uk.co.caprica.vlcj.binding.LibVlcFactory.create(LibVlcFactory.java:113)
at uk.co.caprica.vlcj.player.MediaPlayerFactory.<init>(MediaPlayerFactory.java:156)
at uk.co.caprica.vlcj.player.MediaPlayerFactory.<init>(MediaPlayerFactory.java:143)
at WMA.wma.getSegundosWMA(wma.java:142)
at teste.Teste.main(Teste.java:25)
public static double getSegundosWMA(String path){
NativeLibrary.addSearchPath("libvlc","C:\\Program Files\\VideoLAN\\VLC\\");
NativeLibrary.addSearchPath("libvlccore","C:\\Program Files\\VideoLAN\\VLC\\");
MediaPlayerFactory factory = new MediaPlayerFactory();
MediaPlayer mediaPlayer = factory.newHeadlessMediaPlayer();
mediaPlayer.addVideoOutputEventListener(new VideoOutputEventListener() {
@Override
public void videoOutputAvailable(MediaPlayer mediaPlayer, boolean videoOutput) {
System.out.println(" Track Information: " + mediaPlayer.getTrackInfo());
System.out.println(" Title Descriptions: " + mediaPlayer.getTitleDescriptions());
System.out.println(" Video Descriptions: " + mediaPlayer.getVideoDescriptions());
System.out.println(" Audio Descriptions: " + mediaPlayer.getAudioDescriptions());
for(int i = 0; i < mediaPlayer.getTitleDescriptions().size(); i++) {
System.out.println("Chapter Descriptions " + i + ": " + mediaPlayer.getChapterDescriptions(i));
}
}
}
);
mediaPlayer.prepareMedia(path);
mediaPlayer.parseMedia();
mediaPlayer.start();
double time = mediaPlayer.getTime();
System.out.println("Tempo : " + time );
mediaPlayer.stop();
mediaPlayer.release();
factory.release();
return time;
}