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 …
[code]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 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:
- Include NativeLibrary.addSearchPath(“libvlc”, “”); at the start of your application code.
- Include System.setProperty(“jna.library.path”, “”); at the start of your application code.
- Specify -Djna.library.path= on the command-line when starting your application.
- Add 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)[/code]
[code] 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;
}
[/code]