Code: Select all
--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins
I can't offer you any more than that.
Code: Select all
--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins
Yes, I did try that.But did you actually try...
Code: Select all
--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins
Thanks Sherington - you really save me hours getting my project started. Useful and then some. Awesome.Hi,
I finally got around to bundling up my own Java bindings that have been discussed in this forum topic.
I hope it's ok to post external links here, it's a GPL project in keeping with VLC and the original JVLC bindings.
http://code.google.com/p/vlcj/
...
...
I hope someone finds it useful.
Code: Select all
public class TestPlayer {
private static final String[] ARGS = {"--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins"};
Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Le module spécifié est introuvable.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:160)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:228)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:372)
at com.sun.jna.Native.loadLibrary(Native.java:357)
at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52)
at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:49)
at uk.co.caprica.vlcj.test.TestPlayer.main(TestPlayer.java:59)
Code: Select all
private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC"}
Code: Select all
private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins"}
Code: Select all
private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC_0.9.9"}
Code: Select all
private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC_0.9.9\\plugins"}
Code: Select all
Native.loadLibrary()
Code: Select all
NativeLibrary.addSearchPath("libvlc", "C:\\Program Files\\VideoLAN\\VLC");
Code: Select all
Playing
Fontconfig error: Cannot load default config file
Invalid memory access of location 0x20 rip=0x127f3ae64
Java Result: 139
Code: Select all
private static final String[] ARGS = {//"-vvv",
"--ignore-config",
"-I dummy",
"-V opengl",
"--plugin-path=/Applications/VLC.app/Contents/MacOS/modules/"};
Code: Select all
mediaPlayer.playMedia("C:\\Documents and Settings\\Tom\\workspace\\VODPlayer\\TMP\\PLAYBUFFER\\karaoké Bouba karaoke.mp4");
Code: Select all
[0x5ab2a7c] main input debug: Creating an input for 'karaok Bouba karaoke.mp4'
[0x5ab2a7c] main input debug: thread (input) created at priority 1 (../.././src/input/input.c:230)
[0x5ab2a7c] main input debug: thread started
[0x5ab2a7c] main input debug: using timeshift granularity of 50 MBytes
[0x5ab2a7c] main input debug: using timeshift path 'C:\DOCUME~1\Tom\LOCALS~1\Temp'
[0x5ab2a7c] main input debug: `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' gives access `' demux `' path `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'
[0x5ab2a7c] main input debug: creating demux: access='' demux='' path='C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'
[0x5abc60c] main demux debug: looking for access_demux module: 3 candidates
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdread: Could not open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 with libdvdcss.
libdvdread: Can't open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 for reading
[0x5abc60c] dvdnav demux warning: cannot open dvdnav
[0x5abc60c] main demux debug: TIMER module_need() : 49.734 ms - Total 49.734 ms / 1 intvls (Avg 49.734 ms)
[0x5ab2a7c] main input debug: creating access '' path='C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'
[0x5abcd64] main access debug: looking for access module: 4 candidates
[0x5abcd64] access_file access debug: opening file `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'
[0x5abcd64] access_file access error: cannot open file C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 (No such file or directory)
[0x5abcd64] main access error: File reading failed
[0x5abcd64] main access error: VLC could not open the file "C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4".
[0x5abcd64] cdda access debug: trying .cue file: C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.cue
[0x5abcd64] cdda access debug: could not find .cue file
[0x5abcd64] cdda access warning: could not open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4
[0x5abcd64] main access debug: TIMER module_need() : 13.490 ms - Total 13.490 ms / 1 intvls (Avg 13.490 ms)
[0x5ab2a7c] main input error: open of `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' failed: no suitable access module
[0x5ab2a7c] main input error: Your input can't be opened
[0x5ab2a7c] main input error: VLC is unable to open the MRL 'C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'. Check the log for details.
[0x5ab2a7c] main input debug: thread ended
Code: Select all
public class HelloWorld {
// This is the standard, stable way of mapping, which supports extensive
// customization and mapping of Java to native types.
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
void printf(String format, Object... args);
}
public static void main(String[] args) {
CLibrary.INSTANCE.printf("C:\\Documents and Settings\\Tom\\workspace\\VODPlayer\\TMP\\PLAYBUFFER\\karaoké Bouba karaoke.mp4");
}
}
This is a timing issue.I have tried to use "libvlc_video_get_height/width" but it always returns 0 saying "No active video output". However the RTP stream is playing and I can see it.
How can I retrieve video dimensions to make the canvas with the correct size?
Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': The specified module could not be found.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:255)
at com.sun.jna.Native.loadLibrary(Native.java:241)
at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52)
at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:52)
at uk.co.caprica.vlcj.test.TestPlayer.main(TestPlayer.java:63)
Code: Select all
import java.awt.Canvas;
import javax.swing.JFrame;
import uk.co.caprica.vlcj.MediaPlayer;
public class PlayVLCJVideoFrame extends JFrame{
/**
*
*/
private static final long serialVersionUID = 1L;
final private static String DEFAULTPLUGINFOLDER = "C:\\Program Files\\VideoLAN\\VLC";
final private static String DEFLOC = "C:\\Documents and Settings\\Jonas\\Bureaublad\\LyricsCatcher\\Videos\\Rammstein-Nebel[VID].mp4";
public static void main(String[] arguments) throws Exception {
PlayVLCJVideoFrame vlc = new PlayVLCJVideoFrame(DEFLOC,true);
}
public PlayVLCJVideoFrame(String location, boolean sound){
this(location,sound,DEFAULTPLUGINFOLDER);
}
private static final String[] ARGS = {"--plugin-path=C:\\Program Files\\VideoLAN\\VLC"};
public PlayVLCJVideoFrame(String location, boolean sound, String pluginfolder){
MediaPlayer mediaPlayer = new MediaPlayer(ARGS);//TODO: ARGS?
Canvas canvas = new Canvas();
this.add(canvas);
mediaPlayer.setVideoSurface(canvas);
mediaPlayer.playMedia(location);
}
}
So my question: is there some mnml-code example which actually works? I have looked on many places, but I can't find any working example code. (http://code.google.com/p/vlcj/source/br ... layer.java didn't seem to help neither)Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Kan opgegeven module niet vinden.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:260)
at com.sun.jna.Native.loadLibrary(Native.java:246)
at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52)
at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:49)
at mp3Player.PlayVLCJVideoFrame.<init>(PlayVLCJVideoFrame.java:23)
at mp3Player.PlayVLCJVideoFrame.<init>(PlayVLCJVideoFrame.java:18)
at mp3Player.PlayVLCJVideoFrame.main(PlayVLCJVideoFrame.java:15)
Frankly, it's quite obvious what that error means. The JNA runtime can't find the libvlc.dll file. As to why it can't find it, that is either obvious or it isn't:Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Kan opgegeven module niet vinden. at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157) at com.sun.jna.Library$Handler.<init>(Library.java:123) at com.sun.jna.Native.loadLibrary(Native.java:260) at com.sun.jna.Native.loadLibrary(Native.java:246)
If you don't know how to do that, on the command line you use to execute your java program you add -Djna.library.path=/path/to/some/directory, such as4. Make your target library available to your Java program. There are two ways to do this:
* The preferred method is to set the jna.library.path system property to the path to your target library. This property is similar to java.library.path but only applies to libraries loaded by JNA.
* Change the appropriate library access environment variable before launching the VM. This is PATH on Windows, LD_LIBRARY_PATH on Linux, and DYLD_LIBRARY_PATH on OSX.
Code: Select all
java -Djna.library.path=c:/progra~1/vlc .....
Your error seems to be a JNA setup/configuration error.So my question: is there some mnml-code example which actually works? I have looked on many places, but I can't find any working example code. (http://code.google.com/p/vlcj/source/br ... layer.java didn't seem to help neither)
Or, is there some guidance on how I need to compile the repository? Just Download->Compile doesn't seem to work. Are there project dependencies who need to be set?
A couple of hours, eh? Count yourself lucky! I wish I could get back all the time I invested in JVLC before throwing the towel in.I apologise if I sound aggressive, I'm just dissapointed I spend another couple of hours on this VLC-thing without getting any result...
That indeed seems to be the problem, but setting the jna.library.path (or any other property for that matter, classpath, library-path,...) didn't seem to help. However, when adding the proper libvlc.dll to the %PATH%-variable of my Windows XP, everything just works great...Frankly, it's quite obvious what that error means. The JNA runtime can't find the libvlc.dll file. As to why it can't find it, that is either obvious or it isn't:
Code: Select all
Map options = new HashMap() {
{
put(Library.OPTION_DLOPEN_GLOBAL, Boolean.TRUE);
}
};
Return to “Development around libVLC”
Users browsing this forum: No registered users and 5 guests