JVLC how to make it works?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Gonzalez

JVLC how to make it works?

Postby Gonzalez » 20 Sep 2008 08:43

Hi ,

I download jvlc-core-0.9.0-SNAPSHOT-20080727.jar from http://trac.videolan.org/jvlc/wiki/download

I have installed VLC 0.9.2 , i try to do a test but i can't get it work

Code: Select all

java -classpath jvlc-core-0.9.0-SNAPSHOT-20080727.jar -Djna.library.path="C:/Program Files/VideoLAN /VLC/plugins" org.videolan.jvlc.example.VLCExample == Starting VLCExample == Creating a JVLC instance without argsException in thread "main" java.lang.Unsati sfiedLinkError: Unable to load library 'libvlc': No se puede encontrar el m¾dulo especificado. 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 org.videolan.jvlc.internal.LibVlc.<clinit>(LibVlc.java:41) at org.videolan.jvlc.JVLC.<init>(JVLC.java:45) at org.videolan.jvlc.example.VLCExample.main(VLCExample.java:29)

XYBeR
Blank Cone
Blank Cone
Posts: 24
Joined: 20 Sep 2008 13:00

Re: JVLC how to make it works?

Postby XYBeR » 20 Sep 2008 13:15

you have a path problem. run it from "C:/Program Files/VideoLAN/VLC/"

Gonzalez

Re: JVLC how to make it works?

Postby Gonzalez » 20 Sep 2008 17:31

I copy jvlc-core-0.9.0-SNAPSHOT-20080727.jar in same directory as VLC and i get this :

Code: Select all

== Starting VLCExample == Creating a JVLC instance without args[00000001] main libvlc debug: VLC media pla yer - version 0.9.2 Grishenko - (c) 1996-2008 the VideoLAN team [00000001] main libvlc debug: libvlc was configured with ./configure '--host=i5 86-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--withou t-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--en able-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' ' --enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--wit h-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bin ' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.c om' '--ena [00000001] main libvlc debug: translation test: code is "C" [00000001] main libvlc error: no memcpy module matched "any" [00000007] main access error: no access module matched "file" [00000006] main input error: open of `file/xspf-open://C:\Documents and Settings \user\Datos de programa\vlc\ml.xspf' failed: could not create access: no access mo dule matched "file" [00000010] main interface error: no interface module matched "hotkeys,none" [00000010] main interface error: no suitable interface module [00000001] main libvlc error: interface "hotkeys,none" initialization failed ... done. [00000013] main access error: no access module matched "any" [00000011] main input error: open of `/home/carone/apps/a.avi' failed: could not create access: no access module matched "any" log4j:WARN No appenders could be found for logger (org.videolan.jvlc.event.Media PlayerCallback). log4j:WARN Please initialize the log4j system properly. An error has occurred.
How to use jvlc-core-0.9.0-SNAPSHOT-20080727.jar in other path ? And as library in Eclipse or Netbeans?

Thanks.

XYBeR
Blank Cone
Blank Cone
Posts: 24
Joined: 20 Sep 2008 13:00

Re: JVLC how to make it works?

Postby XYBeR » 20 Sep 2008 22:40

if you use netbeans, set:
project properties/run/working directory to "C:\Program Files\VideoLAN\VLC\"
and vm options to -Djna.library.path="C:/Program Files/VideoLAN/VLC/plugins"

(in eclipse is really the same)

othon2000
Blank Cone
Blank Cone
Posts: 15
Joined: 01 Sep 2008 00:26

Re: JVLC how to make it works?

Postby othon2000 » 22 Sep 2008 16:26

Gonzalez,

You can also run the command:
NativeLibrary.addSearchPath("libvlc", PATH_WHERE_THE_JVLC_DLLS_ARE);
NativeLibrary.addSearchPath("jvlc", PATH_WHERE_THE_JVLC_DLLS_ARE);

But you'll proably get the same problem as me.
The "original" vlc binaries doesn't seem compatible with JVLC, which requires the jvlc.dll and a libvlc.dll that appears to be VERY different from the one that comes with VLC, as the libvlc that comes with VLC has ~ 100KB and the libvlc.dll that comes with the JVLC version I have has ~ 1,6 MB.

Right now I gave up finding a pair of jvlc_jar / jvlc_dlls (or .so) and I'm trying to build a previous version of vlc under Linux on my own, but still no success...
viewtopic.php?f=2&t=50351

XYBeR
Blank Cone
Blank Cone
Posts: 24
Joined: 20 Sep 2008 13:00

Re: JVLC how to make it works?

Postby XYBeR » 22 Sep 2008 21:44

othon200,

i downloaded a fresh install of vlc for windows (http://www.videolan.org/mirror-geo.php? ... -win32.exe) and it works with those jvlc.jar which i compiled from git source. without any dll. theres is no jvlc.dll (what is it?)

maybe you are need a complete, buildable, working example of jvlc? if i have a little time, i can give to you

fstani
New Cone
New Cone
Posts: 2
Joined: 24 Sep 2008 00:45

Re: JVLC how to make it works?

Postby fstani » 24 Sep 2008 11:45

Hello,

I'm having similar problems making this thing run at all.

All the files I've downloaded I can't seem to make them run with java... (I'm using JDK 1.5.0_16, for project compatibility reasons).

The only zip that somewhat worked is the jvlc-binary-windows-x86-20070310.zip, which came with a vlc.exe file that brought up a command line interface.

I would really appreciate some help in this matter, there are a handful of people that seem to have gotten jVLC up and running.

I know it's a lot to ask, but maybe if we trade the information we can create a step by step guide for future reference.

What I noticed in the zips and tars I've downloaded is that most of the documentation is outdated (some win32 versions have a README that says that jVLC doesn't work under windows).

My main goal is to get it up and running under Linux, so if it won't work that's ok.

My specs: Ubuntu 8.04.1 Hardy, JDK 1.5.0_16, VLC 0.9.2, jVLC (0.0.8 and 0.0.9, both binary and source files).

Any help is greatly appreaciated.

Best Regards,
Fabio

Gonzalez

Re: JVLC how to make it works?

Postby Gonzalez » 24 Sep 2008 21:48

Any solutions to make JVLC works?

BexX
Blank Cone
Blank Cone
Posts: 18
Joined: 16 Jul 2008 00:26

Re: JVLC how to make it works?

Postby BexX » 26 Sep 2008 23:45

It does work on windows, but as xyber mentioned you have to adjust your path to enable jvlc/jna to find the libvlc libaries and you need to specify the path to the plugins' dir, to enable libvlc to find the plugins. Setting -Djna.library.path does not work for me.

To run the example from a console:

Code: Select all

set PATH=%PATH%;path\to\vlc java -cp jvlc-snapshot[...].jar org.videolan.example.VLCExample --plugins-path="path\to\vlc\plugins"
In Eclipse you can add the path to run configuration in the enviroment tab and again you need to pass --plugins-path to the JVLC Consturctor.

XYBeR
Blank Cone
Blank Cone
Posts: 24
Joined: 20 Sep 2008 13:00

Re: JVLC how to make it works?

Postby XYBeR » 29 Sep 2008 20:38

as i promised here is a working example: http://xyber.abt.googlepages.com/workingjvlcexample enjoy ;-)

Gonzalez

Re: JVLC how to make it works?

Postby Gonzalez » 29 Sep 2008 21:03

as i promised here is a working example: http://xyber.abt.googlepages.com/workingjvlcexample enjoy ;-)
It works. I will take look at source code to learn how to make it works.

Thanks.

Gonzalez

Re: JVLC how to make it works?

Postby Gonzalez » 29 Sep 2008 23:18

You can also run the command:
NativeLibrary.addSearchPath("libvlc", PATH_WHERE_THE_JVLC_DLLS_ARE);
NativeLibrary.addSearchPath("jvlc", PATH_WHERE_THE_JVLC_DLLS_ARE);
I put this code inside the VLC example and doesn't work and also try System.setProperty("jna.library.path",PATH_WHERE_THE_JVLC_DLLS_ARE) and i get

Code: Select all

java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc'
It only works if i set working directory in Netbeans project , Is there any way to set jna library search path dinamically?

Jossnaz
Blank Cone
Blank Cone
Posts: 73
Joined: 04 Jun 2008 17:59

Re: JVLC how to make it works?

Postby Jossnaz » 30 Sep 2008 01:10

i posted a jvlc how to some time ago already... viewtopic.php?f=14&t=47912

still: great work, everybody back up that example rar.




unsatisfied link means path is wrong or some other environment problem.

Jossnaz
Blank Cone
Blank Cone
Posts: 73
Joined: 04 Jun 2008 17:59

Re: JVLC how to make it works?

Postby Jossnaz » 30 Sep 2008 04:25

[moved to own post]

Gonzalez

Re: JVLC how to make it works?

Postby Gonzalez » 30 Sep 2008 15:49

as i promised here is a working example: http://xyber.abt.googlepages.com/workingjvlcexample enjoy ;-)
I see that if you open a video file , then stops and open other video file , the VLC example always play the same video file (the first you choose).

Any way to play the other file?

XYBeR
Blank Cone
Blank Cone
Posts: 24
Joined: 20 Sep 2008 13:00

Re: JVLC how to make it works?

Postby XYBeR » 30 Sep 2008 16:28

You could construct a playlist. This is not exists in my example. I don't have time now for to do this because i'm working for money ;-)

viewport
Blank Cone
Blank Cone
Posts: 21
Joined: 23 Feb 2009 02:37

Re: JVLC how to make it works?

Postby viewport » 23 Feb 2009 06:44

you have a path problem. run it from "C:/Program Files/VideoLAN/VLC/"
I've tried "--plugin-path=D:\" and "--plugin-path=D:/". The libvlc.dll is in the D:\ folder. And I still get the UnsatisfiedLinkError, unable to get the library 'libvlc' loaded.

Running WinXP, Eclipse 3.4.1. Help? Thanks.

317070
Blank Cone
Blank Cone
Posts: 10
Joined: 21 Feb 2009 23:50

Re: JVLC how to make it works?

Postby 317070 » 23 Feb 2009 16:43

I have exactly your stats. The solution? add the path to the VLC folder (in program files) to the system-variable %PATH%. Go to run configuration in eclipse, environment, select variable path and add
;c:/program files/Videolan/VLC
or something to it at the end. This is a quick scratch of how to do it...


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 59 guests