how complicated is it to use JVLC?

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.
00se7en
New Cone
New Cone
Posts: 6
Joined: 28 Dec 2006 01:20

how complicated is it to use JVLC?

Postby 00se7en » 14 Mar 2007 19:14

i have a swing app and would like to add a video panel. jmf sucks so i found jvlc. the problem is that it seems too complex to set up. is it possible to use jvlc by just adding a jar file and a dll (this is my only experience with using external windows libraries). i might be too much of a noob to handle jvlc otherwise, but someone please tell me if this is the case. btw, i would like to import it into an eclipse project if anyone has done that...

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: how complicated is it to use JVLC?

Postby littlejohn » 16 Mar 2007 13:40

i have a swing app and would like to add a video panel. jmf sucks so i found jvlc. the problem is that it seems too complex to set up. is it possible to use jvlc by just adding a jar file and a dll (this is my only experience with using external windows libraries). i might be too much of a noob to handle jvlc otherwise, but someone please tell me if this is the case. btw, i would like to import it into an eclipse project if anyone has done that...
There's more than 1 jar and 1 dll: there's 1 jar, 2 dlls (3 libs on linux) and several plugins (more dlls). To chain everything this should be your project layout (on windows):

projectRoot/jvlc.dll
projectRoot/libvlc.dll
projectRoot/org/videolan/jvlc <- you may jar this up
projectRoot/plugins

If you download:

http://jvlc.ihack.it/releases/jvlc-0.9. ... -win32.zip

you will find all the needed libs. If you want to move things around, use -Djava.library.path to point to jvlc.dll and libvlc.dll and initialize JVLC using the --plugins-path switch to make it point to plugins.

Cheers

00se7en
New Cone
New Cone
Posts: 6
Joined: 28 Dec 2006 01:20

Postby 00se7en » 17 Mar 2007 10:28

thanks for the tips!

i seem to have the project set up fine now, but no video gets played. i dont get any errors in the console either, though. the jvlc panel shows up black for a short period of time, or it launches another directx output window for a short time. i have tried the swing example that was posted on the jvlc site and i also tried some code that i wrote myself. both had the same problem of not showing any video.

my code:

Code: Select all

import org.videolan.jvlc.*; import javax.swing.*; public class Test extends JPanel { private JVLCPanel jp; private JVLC jo; public Test() { jp = new JVLCPanel(); this.add(jp); jo = jp.getJVLCObject(); try { jo.playlist.add("file:///a.mpg", "a"); jo.playlist.play(); } catch(Exception e) {e.printStackTrace();} } public static void main(String[] args) { JFrame f = new JFrame("Video"); f.add(new Test()); f.pack(); f.setVisible(true); } }
any ideas what is going wrong?

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Postby littlejohn » 18 Mar 2007 22:39

thanks for the tips!

i seem to have the project set up fine now, but no video gets played. i dont get any errors in the console either, though. the jvlc panel shows up black for a short period of time, or it launches another directx output window for a short time. i have tried the swing example that was posted on the jvlc site and i also tried some code that i wrote myself. both had the same problem of not showing any video.
...
any ideas what is going wrong?
This is the current issue we are trying to fix. Any help will be appreciated.

Cheers

jojosucks
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2007 14:58

Postby jojosucks » 21 Mar 2007 11:07

i copy and paste the code in a new project in eclipse. I got Errors but when i execute the project i got these errors :

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jvlc in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.videolan.jvlc.JVLC.<clinit>(JVLC.java:36) at org.videolan.jvlc.JVLCCanvas.<init>(JVLCCanvas.java:47) at org.videolan.jvlc.JVLCPanel.<init>(JVLCPanel.java:42) at Test.<init>(Test.java:10) at Test.main(Test.java:21)
do you have na idea ?

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Postby littlejohn » 21 Mar 2007 12:24

i copy and paste the code in a new project in eclipse. I got Errors but when i execute the project i got these errors :

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jvlc in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.videolan.jvlc.JVLC.<clinit>(JVLC.java:36) at org.videolan.jvlc.JVLCCanvas.<init>(JVLCCanvas.java:47) at org.videolan.jvlc.JVLCPanel.<init>(JVLCPanel.java:42) at Test.<init>(Test.java:10) at Test.main(Test.java:21)
do you have na idea ?
Give the -Djava.library.path=/PATH_TO_JVLC option at the java cmd. So if you have the jvlc.dll in C:\jvlc, you will launch:

java -Djava.library.path=C:\jvlc yourJavaClass

jojosucks
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2007 14:58

Postby jojosucks » 21 Mar 2007 13:11

I did the changes. I got errors tough :

Exception in thread "main" java.lang.NoClassDefoundError


and if i put the dll files in the same directory than my .class I got :

[00000001] main libvlc error: no memcpy module matched "any"
[00000008] main interface error: no interface module matched "hotkeys,none"
[00000008] main interface error: no suitable interface module
[00000001] main libvlc error: interface "hotkeys,none" initialization failed

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Postby littlejohn » 21 Mar 2007 18:52

I did the changes. I got errors tough :

Exception in thread "main" java.lang.NoClassDefoundError


and if i put the dll files in the same directory than my .class I got :

[00000001] main libvlc error: no memcpy module matched "any"
[00000008] main interface error: no interface module matched "hotkeys,none"
[00000008] main interface error: no suitable interface module
[00000001] main libvlc error: interface "hotkeys,none" initialization failed
This issue has been addressed several times on the forum. When you initialize the JVLC object pass the arguments --plugins-path=location_of_the_plugins_folder

cheers

jojosucks
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2007 14:58

Postby jojosucks » 22 Mar 2007 08:39

When you initialize the JVLC object pass the arguments --plugins-path=location_of_the_plugins_folder
you mean in the code when I instanciate the JVLC object ?

marcuschan
Blank Cone
Blank Cone
Posts: 54
Joined: 08 Jul 2006 16:31

Postby marcuschan » 29 Mar 2007 07:55

my 2cents if u haven't solved the problem ..

try putting everything under your prject folder :

.\xxx.java <-your java src
.\xxx.class <- your class file
.\plugins\.. <- the vlc plugins folder
.\org\videolan\jvlc\*.class <- the jvlc classes
.\*.dll <- the 4 related dll for jvlc
.\run.bat

in your run.bat,
java -cp . -Djava.library.path=. xxx

hope this may help ...good luck..
:D

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Postby adanecito » 29 Mar 2007 08:51

Hi,

I have been running inside of eclipse for a couple of weeks and have a example running outside of eclipse. I still have the video playing outside of the canvas and not sure why.
I copied all the modules dll's into a plugins directory inside my eclipse project and put the jvlc.dll and the libvlc.dll at the same level as my class with my main method. Then I passed the argument --plugin-path=dir for the run configuuration where dir points to the plugins folder with the dlls.
That works for me.

Beware the nightly builds do have issues (expected for nightly I guess) and I would run under windows xp and .mov and mpg files work so far but not avi or flv. there are probably other file types that may have issues but not sure what since I have not tested beyond what I menioned above.

Good luck it was a interesting learning curve but patience helps.

-Tony

marcuschan
Blank Cone
Blank Cone
Posts: 54
Joined: 08 Jul 2006 16:31

Postby marcuschan » 30 Mar 2007 04:06

most likely u need to add the pack() in your code somewhere after the jvlc is constructed and play ...

good luck ..
marcus

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Postby adanecito » 30 Mar 2007 10:09

Thanks and I tried your suggestion but it did not work. Idea appreciated.

Regards,
-Tony

PurpleSkunk
New Cone
New Cone
Posts: 7
Joined: 16 Apr 2007 11:46

Postby PurpleSkunk » 16 Apr 2007 12:08

Hello,

I have the same issues here.

I have tried several builds of JVLC, and tried to use JVLC in both Eclipse and Netbeans projects...

I am unable to get the bindings to work.

Every time I launch my project, I get this error :

Code: Select all

# # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c06cc1, pid=4884, tid=4368 # # Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing) # Problematic frame: # C [msvcrt.dll+0x26cc1] # # An error report file with more information is saved as hs_err_pid4884.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #

Here is the content of the log file :

Code: Select all

# # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c06cc1, pid=4884, tid=4368 # # Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing) # Problematic frame: # C [msvcrt.dll+0x26cc1] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x00296000): JavaThread "main" [_thread_in_native, id=4368] siginfo: ExceptionCode=0xc0000005, reading address 0x646e6120 Registers: EAX=0x646e6120, EBX=0x646e6121, ECX=0x646e6120, EDX=0x77be4a00 ESP=0x0090f66c, EBP=0x0090f678, ESI=0x02db2c4c, EDI=0x00000002 EIP=0x77c06cc1, EFLAGS=0x00210202 Top of Stack: (sp=0x0090f66c) 0x0090f66c: 000004e4 0000006b 00000000 0090f698 0x0090f67c: 77c19f49 77be4a6c 00000069 0000006b 0x0090f68c: 00000190 00000000 00000006 0090f6d4 0x0090f69c: 77c1a52d 77c1b0c6 000b1cc8 00000000 0x0090f6ac: 02ee7c48 000b1cc8 02ee7c48 00000000 0x0090f6bc: 029671d7 0090f6e8 7c80e818 00000003 0x0090f6cc: 000003cf 000407d7 0090f710 77bee1a9 0x0090f6dc: 000007d7 00000004 00000010 0000000c Instructions: (pc=0x77c06cc1) 0x77c06cb1: 40 84 c9 75 f9 2b c2 8b f8 eb 2c 8b c1 8d 58 01 0x77c06cc1: 8a 10 40 84 d2 75 f9 2b c3 3b c7 76 17 80 3c 39 Stack: [0x008c0000,0x00910000), sp=0x0090f66c, free space=317k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [msvcrt.dll+0x26cc1] C [msvcrt.dll+0x39f49] C [msvcrt.dll+0x3a52d] C [msvcrt.dll+0xe1a9] C [msvcrt.dll+0xe24d] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.videolan.jvlc.JVLC.createInstance([Ljava/lang/String;)J+0 j org.videolan.jvlc.JVLC.<init>([Ljava/lang/String;)V+29 j dbtc.Main.main([Ljava/lang/String;)V+7 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x02a5cc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5600] 0x02a58000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4532] 0x02a56c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=4528] 0x02a56000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4524] 0x02a51800 JavaThread "Finalizer" daemon [_thread_blocked, id=4516] 0x02a4d000 JavaThread "Reference Handler" daemon [_thread_blocked, id=4512] =>0x00296000 JavaThread "main" [_thread_in_native, id=4368] Other Threads: 0x02a44000 VMThread [id=4504] 0x02a5e400 WatcherThread [id=2772] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 960K, used 212K [0x22960000, 0x22a60000, 0x22e40000) eden space 896K, 23% used [0x22960000, 0x22995050, 0x22a40000) from space 64K, 0% used [0x22a40000, 0x22a40000, 0x22a50000) to space 64K, 0% used [0x22a50000, 0x22a50000, 0x22a60000) tenured generation total 4096K, used 0K [0x22e40000, 0x23240000, 0x26960000) the space 4096K, 0% used [0x22e40000, 0x22e40000, 0x22e40200, 0x23240000) compacting perm gen total 12288K, used 28K [0x26960000, 0x27560000, 0x2a960000) the space 12288K, 0% used [0x26960000, 0x269670b8, 0x26967200, 0x27560000) ro space 8192K, 66% used [0x2a960000, 0x2aeac5d0, 0x2aeac600, 0x2b160000) rw space 12288K, 52% used [0x2b160000, 0x2b7a8c98, 0x2b7a8e00, 0x2bd60000) Dynamic libraries: 0x00400000 - 0x00423000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\java.exe 0x7c910000 - 0x7c9c7000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c904000 C:\WINDOWS\system32\kernel32.dll 0x77da0000 - 0x77e4c000 C:\WINDOWS\system32\ADVAPI32.dll 0x77e50000 - 0x77ee1000 C:\WINDOWS\system32\RPCRT4.dll 0x7c340000 - 0x7c396000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\msvcr71.dll 0x6d870000 - 0x6dab7000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\client\jvm.dll 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll 0x77ef0000 - 0x77f37000 C:\WINDOWS\system32\GDI32.dll 0x76ae0000 - 0x76b0f000 C:\WINDOWS\system32\WINMM.dll 0x76320000 - 0x7633d000 C:\WINDOWS\system32\IMM32.DLL 0x6d3c0000 - 0x6d3c8000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\hpi.dll 0x76ba0000 - 0x76bab000 C:\WINDOWS\system32\PSAPI.DLL 0x6d820000 - 0x6d82c000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\verify.dll 0x6d460000 - 0x6d47f000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\java.dll 0x6d860000 - 0x6d86f000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\zip.dll 0x70440000 - 0x70744000 C:\Documents and Settings\Administrateur\DBTC\jvlc.dll 0x62dc0000 - 0x6306b000 C:\Documents and Settings\Administrateur\DBTC\libvlc.dll 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll 0x719f0000 - 0x71a07000 C:\WINDOWS\system32\WS2_32.DLL 0x719e0000 - 0x719e8000 C:\WINDOWS\system32\WS2HELP.dll 0x6d490000 - 0x6d496000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\jawt.dll 0x6d0b0000 - 0x6d273000 C:\Program Files\Java\jdk1.6.0_01\jre\bin\awt.dll 0x72f50000 - 0x72f76000 C:\WINDOWS\system32\WINSPOOL.DRV 0x774a0000 - 0x775dd000 C:\WINDOWS\system32\ole32.dll 0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll 0x77390000 - 0x77493000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll 0x58b50000 - 0x58bea000 C:\WINDOWS\system32\comctl32.dll 0x76960000 - 0x76a15000 C:\WINDOWS\system32\USERENV.dll VM Arguments: java_command: dbtc.Main Launcher Type: SUN_STANDARD Environment Variables: CLASSPATH=.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib; PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Fichiers communs\Adobe\AGL;C:\Program Files\Support Tools\;C:\Program Files\Fichiers communs\GTK\2.0\bin;C:\Program Files\QuickTime\QTSystem\;c:\ruby\bin\;C:\Program Files\Java\jdk1.6.0_01\bin;c:\ruby\lib\GTK\bin;C:\Program Files\MKVtoolnix USERNAME=Administrateur OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel --------------- S Y S T E M --------------- OS: Windows XP Build 2600 Service Pack 2 CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2 Memory: 4k page, physical 1047920k(333216k free), swap 2519468k(1914596k free) vm_info: Java HotSpot(TM) Client VM (1.6.0_01-b06) for windows-x86, built on Mar 14 2007 00:24:02 by "java_re" with unknown MS VC++:1310

I've tried all the solutions I've found in this forum and others, but still can't use JVLC under Windows...

Any help would be greatly appreciated.

Thanks in advance.[/code]

hinschberger
New Cone
New Cone
Posts: 1
Joined: 12 May 2007 17:38

Postby hinschberger » 12 May 2007 17:43

Hello.
I'm trying to open a MP4 player in a full java application by using JVLC.
It works fine, except that I can't get JVLC to run the player inside my JPanel : it always open a new window in which the video can be seen.
Is it possible to really integrate the player in my own window hierachy??
Hinsch


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests