main access error: no access module matched "any"

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.
Jossnaz
Blank Cone
Blank Cone
Posts: 73
Joined: 04 Jun 2008 17:59

main access error: no access module matched "any"

Postby Jossnaz » 03 Jul 2008 02:52

Hello

[edit3] start with link collection here for setting up jvlc under windows:
viewtopic.php?f=14&t=50774
[/edit3]

[edit2]
the binary IS working.

VlcClient is in your actual folder.

java run command
java -cp .;jvlc-core-0.9.0-SNAPSHOT-20080727.jar VlcClient
(i'm using VlcClient from the source, not from jar... i think you can get this source and examples from
http://nightlies.videolan.org/build/source/
but i'm not sure... look in the jar for bindings/java folder)

edit vlcrc file (which is a hidden file, make it visible first in windows explorer - tools - folder options - view - show hidden files)
somewhere located similar to
C:\Documents and Settings\Lukas Meier\Application Data\vlc\vlcrc

edit 2 lines

# boolean (Plugin-Cache benutzen)
plugins-cache=0

# string (Modulsuchpfad)
plugin-path=C:\Program Files\VideoLAN\VLC\plugins

e.g. your plugin folder of vlc with all necessary dlls. Remember to remove # of the line beginning!

[ / edit2]

[edit ]

Working description to get JVLC running in eclipse:
e.g. build vlc and jvlc urself...

i got it working in eclipse... no idea how to start it outside from there tbh. So if someone can help me out and tell me how to export a running jar for different system from eclipse, please enlighten me. [edit1b] the java command from eclipse is
"C:\Program Files\Java\jdk1.6.0_06\bin\javaw.exe" -Dfile.encoding=Cp1252 -classpath "E:\programs\eclipse\workspace\jvlc-samples-client\target\classes;C:\Documents and Settings\Lukas Meier\.m2\repository\com\jna\jna\3.0.2\jna-3.0.2.jar;E:\programs\eclipse\workspace\jvlc-core\target\test-classes;E:\programs\eclipse\workspace\jvlc-core\target\classes;C:\Documents and Settings\Lukas Meier\.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar;C:\Documents and Settings\Lukas Meier\.m2\repository\junit\junit\4.4\junit-4.4.jar;C:\Documents and Settings\Lukas Meier\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar;C:\Documents and Settings\Lukas Meier\.m2\repository\org\slf4j\slf4j-api\1.5.2\slf4j-api-1.5.2.jar;C:\Documents and Settings\Lukas Meier\.m2\repository\org\slf4j\slf4j-log4j12\1.5.2\slf4j-log4j12-1.5.2.jar;C:\Documents and Settings\Lukas Meier\.m2\repository" VlcClient
[ /edit1b]

Second good thing would be a complete! package (e.g. zip file) with all necessary files etc to import into eclipse with short docu, so not everybody has to compile jvlc himself.

so the complete guide would look like this:




What i've done so far is:
Today it's the 27. August 2008

get a 0.9* build and install (i dont recall which version i have)
http://nightlies.videolan.org/build/win32/
Use the exe installer.

Get maven for windows
http://maven.apache.org/download.html
or directly http://www.apache.org/dyn/closer.cgi/ma ... .9-bin.zip

Follow the installation procedure which was:

Windows 2000/XP

1. Unzip the distribution archive, i.e. apache-maven-2.0.9-bin.zip to the directory you wish to install Maven 2.0.9. These instructions assume you chose "C:\Program Files\Apache Software Foundation\" . The subdirectory apache-maven-2.0.9 will be created from the archive.
2. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value "C:\Program Files\Apache Software Foundation\apache-maven-2.0.9" . Note : for Maven < 2.0.9, be sure that the M2_HOME doesn't have a '\' as last character.
3. In the same dialog, add the M2 environment variable in the user variables with the value "%M2_HOME%\bin" .
5. In the same dialog, update/create the Path environment variable in the user variables with the value "%M2%;%Path%" to add maven available in the command line.
6. In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. "C:\Program Files\Java\jdk1.5.0_02" and that "%JAVA_HOME%\bin" is in your Path environment variable.
7. Open a new command prompt (Winkey + R then type "cmd" ) and run "mvn --version" to verify that it is correctly installed.




Get git for windows
the only for me working way to do this was to get cygwin
http://www.cygwin.com/setup.exe

in the installation procedure you'll be prompted to select packages (that was at the point where I actually did not know what they wanted from me)
Go to the devel packages and select git

now start cygwin, you'll be in the console mode
now enter
git clone git://git.videolan.org/vlc.git


exit the command line

now go using the command prompt to your vlcgit clone which is somewhere in your cygwin installation dir (default is c:/cygwin *yeah right everybody installs into c:/*... so mine was: D:\programs\cygwin\home\Lukas Meier\vlc)
To start your command prompt press
Windowskey+R (or press start - run)
then type
cmd
press enter

Now you should be in your command prompt in your cygwin dir. Find your git clone of vlc and go into the bindings/java folder which was at my computer at D:\programs\cygwin\home\Lukas Meier\vlc\bindings\java
Write:
mvn -Dmaven.test.skip=true install

You'll get some errors when u do it with tests... so we skip em. I know of a linux programmer that those are not of importance as he used JVLC for himself.


Now it downloads and makes the jvlc files

go to the bindings folder
do
mvn eclipse:eclipse

now you can import the hole stuff into eclipse
in eclipse do
File
import
existing project, then choose the folder where the bindings are

you should get jvlc core and jvlc sample client
now u cant compile cause of some missing variables...

now from our friend called GodLike Smads

"You will need to ad the M2_REPO path into the jvlc-core project. This is under properties->Java Build Path->Libraries(tab)->Add Variable(button)
M2_REPO = (something like)C:/Documents and Settings/username/.m2/repository

There is example code in the jvlc-core project. If you import projects from the bindings/java directory it will find jvlc-core and jvlc-samples-client.

You will still need to make sure the args are correct for the jvlc = new JVLC(args) call."

e.g. in VlcClient.java

String[] args = new String[] { "-vvv", "--plugin-path=c:\\Program Files\\VideoLAN\\VLC\\plugins" };
jvlc = new JVLC(args); //replacing --> jvlc = new JVLC();

and wow

HA! You can use JVLC.

Bug me if it's not working for ya.

[ /edit]

from here is the old post


--------------------
I almost successfully tried to get the up to date version of JVLC running

still... it does not work! so dont try to do what i did to end at the same error message when trying to run the example.

The error i get is:

Code: Select all

C:\Program Files\VideoLAN VLC>java -cp jna-3.0.2.jar;jvlc-core-0.9.0-SNAPSHOT.ja r;. -Djna.library.path="c:/program files/VideoLan VLC/plugins";. VLCExample == Starting VLCExample == Creating a JVLC instance without args[00000001] main libvlc debug: VLC media pla yer - version 0.9.0-test2-20080702-1913 Grishenko - (c) 1996-2008 the VideoLAN t eam [00000001] main libvlc debug: libvlc was configured with ./configure '--enable- debug' '--host=i586-mingw32msvc' '--build=i386-linux' '--enable-shared-libvlc' ' --enable-sdl' '--with-sdl-config-path=/usr/win32/bin' '--disable-gtk' '--disable -dca' '--disable-hal' '--disable-libcdio' '--enable-nls' '--enable-skins2' '--en able-ffmpeg' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-zlib' ' --with-ffmpeg-config-path=/usr/win32/bin' '--enable-faad' '--enable-flac' '--ena ble-theora' '--enable-twolame' '--enable-dvdread' '--disable-vcdx' '--disable-cd dax' '--en [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 \Lukas Meier\Application Data\vlc\ml.xspf' failed: could not create access: no a ccess module 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. Media instance paused. MRL: D:\TempD\Seven.Sunny.Days.cd1.avi [00000013] main access error: no access module matched "any" [00000011] main input error: open of `D:\TempD\Seven.Sunny.Days.cd1.avi' failed: could not create access: no access module matched "any"
This is it in short terms. Detailed guide what i did is below.
------------------------------------------------------------------------------------------------------------------------------------------------------



























































What i've done so far is:
Today it's the 3. july 2008

get latest build and install
http://nightlies.videolan.org/build/win32/latest/
Use the exe installer.

Get maven for windows
http://maven.apache.org/download.html
or directly http://www.apache.org/dyn/closer.cgi/ma ... .9-bin.zip

Follow the installation procedure which was:

Windows 2000/XP

1. Unzip the distribution archive, i.e. apache-maven-2.0.9-bin.zip to the directory you wish to install Maven 2.0.9. These instructions assume you chose "C:\Program Files\Apache Software Foundation\" . The subdirectory apache-maven-2.0.9 will be created from the archive.
2. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value "C:\Program Files\Apache Software Foundation\apache-maven-2.0.9" . Note : for Maven < 2.0.9, be sure that the M2_HOME doesn't have a '\' as last character.
3. In the same dialog, add the M2 environment variable in the user variables with the value "%M2_HOME%\bin" .
5. In the same dialog, update/create the Path environment variable in the user variables with the value "%M2%;%Path%" to add maven available in the command line.
6. In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. "C:\Program Files\Java\jdk1.5.0_02" and that "%JAVA_HOME%\bin" is in your Path environment variable.
7. Open a new command prompt (Winkey + R then type "cmd" ) and run "mvn --version" to verify that it is correctly installed.




Get git for windows
the only for me working way to do this was to get cygwin
http://www.cygwin.com/setup.exe

in the installation procedure you'll be prompted to select packages (that was at the point where I actually did not know what they wanted from me)
Go to the devel packages and select git

now start cygwin, you'll be in the console mode
now enter
git clone git://git.videolan.org/vlc.git


exit the command line

now go using the command prompt to your vlcgit clone which is somewhere in your cygwin installation dir (default is c:/cygwin *yeah right everybody installs into c:/*... so mine was: D:\programs\cygwin\home\Lukas Meier\vlc)
To start your command prompt press
Windowskey+R (or press start - run)
then type
cmd
press enter

Now you should be in your command prompt in your cygwin dir. Find your git clone of vlc and go into the bindings/java folder which was at my computer at D:\programs\cygwin\home\Lukas Meier\vlc\bindings\java
Write:
mvn -Dmaven.test.skip=true install

You'll get some errors when u do it with tests... so we skip em. I know of a linux programmer that those are not of importance as he used JVLC for himself.


Now it downloads and makes the jvlc files
What i did was to copy the bindings folder to my real vlc installation dir (not the source dir, but the dir with all the exe files etc). At my computer this was
C:\Program Files\VideoLAN VLC
So i put there the folder bindings
Next i did was copy the VLCExample.java from the C:\Program Files\VideoLAN VLC\bindings\java\core\src\main\java\org\videolan\jvlc\example folder to the C:\Program Files\VideoLAN VLC\ folder and removed the package line. Then I changed the file access of vlcexample which was unix based to a windowslike line (e.g. c:\a.mov)

I download the right jna version 3.0.2 (the up to date version will NOT work)
this was found here
https://jna.dev.java.net/source/browse/ ... r?rev=HEAD
I renamed the jar to the version so i know what i'm having
jna.jar to jna-3.0.2.jar
Next I copied the jvlc-core-0.9.0-SNAPSHOT.jar from C:\Program Files\VideoLAN VLC\bindings\java\core\target\jvlc-core-0.9.0-SNAPSHOT.jar to my C:\Program Files\VideoLAN VLC\ folder
I had to create a copy of libvlc.dll in the C:\Program Files\VideoLAN VLC\ and named this copy vlc.dll because I got an error otherwise

Compilation is achieved with
C:\Program Files\VideoLAN VLC>javac -cp .;jna-3.0.2.jar;jvlc-core-0.9.0-SNAPSHOT.jar VLCExample.java

I run the example with
C:\Program Files\VideoLAN VLC>java -cp jna-3.0.2.jar;jvlc-core-0.9.0-SNAPSHOT.jar;. -Djna.library.path="c:/program files/VideoLan VLC/plugins";. VLCExample


Then i get those errors:
C:\Program Files\VideoLAN VLC>java -cp jna-3.0.2.jar;jvlc-core-0.9.0-SNAPSHOT.ja
r;. -Djna.library.path="c:/program files/VideoLan VLC/plugins";. VLCExample
== Starting VLCExample ==
Creating a JVLC instance without args[00000001] main libvlc debug: VLC media pla
yer - version 0.9.0-test2-20080702-1913 Grishenko - (c) 1996-2008 the VideoLAN t
eam
[00000001] main libvlc debug: libvlc was configured with ./configure '--enable-
debug' '--host=i586-mingw32msvc' '--build=i386-linux' '--enable-shared-libvlc' '
--enable-sdl' '--with-sdl-config-path=/usr/win32/bin' '--disable-gtk' '--disable
-dca' '--disable-hal' '--disable-libcdio' '--enable-nls' '--enable-skins2' '--en
able-ffmpeg' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-zlib' '
--with-ffmpeg-config-path=/usr/win32/bin' '--enable-faad' '--enable-flac' '--ena
ble-theora' '--enable-twolame' '--enable-dvdread' '--disable-vcdx' '--disable-cd
dax' '--en
[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
\Lukas Meier\Application Data\vlc\ml.xspf' failed: could not create access: no a
ccess module 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.
Media instance paused. MRL: D:\TempD\Seven.Sunny.Days.cd1.avi
[00000013] main access error: no access module matched "any"
[00000011] main input error: open of `D:\TempD\Seven.Sunny.Days.cd1.avi' failed:
could not create access: no access module matched "any"


I tried other things to access the media like
c:\\TempD\\Seven.Sunny.Days.cd1.avi
or
file:///c://bla.mov
and other things
all leading to smth similar like
[00000013] main access error: no access module matched "any"
[00000011] main input error: open of `D:\TempD\Seven.Sunny.Days.cd1.avi' failed:
could not create access: no access module matched "any"
Last edited by Jossnaz on 02 Oct 2008 21:00, edited 7 times in total.

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

Re: main access error: no access module matched "any"

Postby Jossnaz » 08 Jul 2008 20:50

in any case it is not a missing entry in the PATH variable as filippo suggested to me


has someone else maybe an idea?

Keithel
New Cone
New Cone
Posts: 2
Joined: 11 Jul 2008 19:22

Re: main access error: no access module matched "any"

Postby Keithel » 11 Jul 2008 19:38

I'm running into pretty much the same issue as you have.

I've both tried cross-compiling VLC (which compiles ok, but seems not to run properly), and using built nightlies with the addition of the built jvlc jar files I built with maven using latest vlc source acquired from git.

Here's some of what I've done:

Working in an Ubuntu Hardy Heron Virtual Machine:
* Basing my work off of http://trac.videolan.org/jvlc/wiki/developers instructions (right on that page there, not the linked guides, as they are not up-to-date and use 0.86 as their basis -- a lot has changed since then)
* Grab vlc source from GIT -- I will refer to this directory as $VLC_GIT
* cd $VLC_GIT (if not already there)
* ./bootstrap
* cd extras/contrib
* ./bootstrap i586-mingw32msvc

(Caution, the next step will probably take several hours, as the prerequisite libraries are cross-compiled)
* make (this step differs from the above guide! -- we don't make target 'src' -- as there is none -- just run make with no params)

* cd ../.. ; ./configure --host=i586-mingw32msvc --build=i386-linux --enable-sdl --with-sdl-config-path=/usr/win32/bin --disable-gtk --disable-dca --disable-hal --disable-libcdio --enable-nls --disable-skins2 --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora --enable-twolame --enable-dvdread --disable-vcdx --disable-cddax --disable-mozilla --enable-live555 --enable-caca --enable-goom --enable-quicktime --enable-real --enable-realrtsp --enable-mkv --disable-portaudio --enable-shout --disable-qt4 --disable-wxwidgets --disable-activex
(DIFFERS -- --disable-dcs is no longer an option -- use --disable-dca, --enable-java-bindings no longer valid, build using maven after build done) -- this works fine with these changes.

* make
* make package-win32-base (produces directory $VLC_GIT/vlc-0.9.0-test2 with built sources for win32, ready for install).
* did maven build: cd $VLC_GIT/bindings/java && mvn -Dmaven.test.skip=true install
* cp ~/.m2/repository/org/videolan/jvlc-core/0.9.0-SNAPSHOT/jvlc-core-0.9.0-SNAPSHOT.jar ~/.m2/repository/com/jna/jna/3.0.2/jna-3.0.2.jar --target-directory=$VLC_GIT/vlc-0.9.0-test2
* zip it all up: cd $VLC_GIT && zip -r vlc-0.9.0-test2-git-jvlc.zip vlc-0.9.0-test2
* Move it over to a windows machine with a 1.5.0+ JRE installed.



*** Now instructions are for the windows machine, under cmd.com
* Unpack it somewhere -- we'll call the resulting directory $JVLC_INSTALL (including the zipped directory vlc-0.9.0-test2)
* Make sure java.exe is in your path.
* cd $JVLC_INSTALL
* copy libvlc.dll vlc.dll
* java -classpath .\jna-3.0.2.jar;.\jvlc-core-0.9.0-SNAPSHOT.jar -Djna.library.path=. org.videolan.jvlc.example.VLCExample
(I tried with my own example, which brings up a dialog to choose video, and still had failures):
C:\Documents and Settings\kkyzivat\My Documents\builds\vlc-0.9.0-test2>java -classpath src;.\jna-3.0.2.jar;.\jvlc-core-0.9.0-SNAPSHOT.jar -Djna.library.path=. com.backchannel.jvlc.example.VLCExampleKTK
Starting VLCExampleKTK
Creating a JVLC instance without args[00000001] main libvlc debug: VLC media player - version 0.9.0-test2 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--host=i586-mingw32msvc' '--build=i386-linux' '--enable-sdl' '--with-sdl-config-path=/usr/win32/bin' '--disable-gtk' '--disable-dca' '--disable-hal' '--disable-libcdio' '--enable-nls' '--disable-skins2' '--enable-ffmpeg' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-zlib' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '--enable-dvdread' '--disable-vcdx' '--disable-cddax' '--disable-mozilla' '--enable-live555' '--enable-caca' '--enable-goom' '--enable-quicktim
[00000001] main libvlc debug: translation test: code is "C"
[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
... done.
Media instance paused. MRL: C:\Documents and Settings\kkyzivat\Desktop\GoneNutty.avi
[00000011] main access error: no access module matched "any"
[00000009] main input error: open of `C:\Documents and Settings\kkyzivat\Desktop\GoneNutty.avi' failed: could not create access: no access module matched "any"

* Seems like jna is having problems loading the proper native libraries. It definitely was having problems loading libvlc.dll -- which was resolved by the copy/rename of libvlc.dll to vlc.dll.
* In order to resolve this, I tried making hard link names (under NTFS partition) that omit the 'lib' prefix (i.e. created hard link foo.dll to libfoo.dll file - thus they both point to same library data) for all dlls in the built VLC binary package. You can use the following bash script (using any bash built for windows - i'm using cygwin) to do this (run in $JVLC_INSTALL/plugins directory and $JVLC_INSTALL directory):
#!/bin/bash
libfiles=`ls --indicator-style=none -1 lib*.dll | xargs echo`
regex="^lib(.*\.dll)$"
for libfile in $libfiles; do
if [[ $libfile =~ $regex ]]; then
echo "doing: fsutil hardlink create ${BASH_REMATCH[1]} $libfile";
fsutil hardlink create ${BASH_REMATCH[1]} $libfile;
else
echo "$libfile doesn't match! This shouldn't happen!";
fi
done;
* Then try again (in cmd.exe shell): java -classpath .\jna-3.0.2.jar;.\jvlc-core-0.9.0-SNAPSHOT.jar -Djna.library.path=. org.videolan.jvlc.example.VLCExample
But alas, this results in the same errors as previously was shown. :(


If I grab a nightly build from http://nightlies.videolan.org/ , copy over the jar files to that, and repeat from that directory (starting with the "Now instructions are for the windows machine, under cmd.com" step), I get the same issues.

So, still down to the same problem.
I do see that jna seems not to be identifying libraries with the 'lib' prefix, though I believe that is by design -- windows libraries don't generally start with 'lib' and don't treat that prefix special -- thus, when referencing and loading a library "x" -- on *nix/bsd, libx.so would be tried, but on windows, just x.dll would be tried -- though, the vlc cross-compile (including what's provided in the nightlies) produces libraries of the form "libx.dll"... Making the hard link from libvlc.dll to vlc.dll seemed to correct the initial problem, but fixing the other libraries didn't seem to have any effect.

coldfire
Blank Cone
Blank Cone
Posts: 47
Joined: 07 Jul 2008 11:02

Re: main access error: no access module matched "any"

Postby coldfire » 15 Jul 2008 08:58

same problem but on UBUNTU 8.04 here ...any solution ?
Good one What is H264?

Keithel
New Cone
New Cone
Posts: 2
Joined: 11 Jul 2008 19:22

Re: main access error: no access module matched "any"

Postby Keithel » 15 Jul 2008 18:32

same problem but on UBUNTU 8.04 here ...any solution ?
Not really the same problem, but it does seem to be related slightly. I believe the jvlc issue stated here is a problem with finding or loading libraries, which it is quite possible is what you're encountering too.

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

Re: main access error: no access module matched "any"

Postby littlejohn » 17 Jul 2008 00:13

Hi people,
tonite I tried jvlc on windows and I got it to work. Here the steps:
1. get a working vlc 0.9.* (from nightlies perhaps)
2. edit the vlcrc file (find it under your windows user folder) in the following way:

# boolean
plugins-cache=0

# string
plugin-path=c:\vlc\plugins (this is my plugins folder)

3. copy libvlc.dll to vlc.dll and be sure the vlc folder is in the path

and your environment is now ready to run jvlc based applications.

So, to recap: step 1 is a precondition, step 2 can be probably be avoided if you specify the plugins path on the command line (and give it to libvlc_new) and step 3 will be addressed in either jvlc or jna code.

Happy hacking,
lj

smads
New Cone
New Cone
Posts: 1
Joined: 27 Jun 2008 21:36

Re: main access error: no access module matched "any"

Postby smads » 18 Jul 2008 20:22

LittleJohn,

Thanks that worked!

Alternatively you can add the following lines to the jvlc client.

In VlcClient.java in the function initComponents() add

// The -vvv is optional,
// The path should point to the plugins directory on the target machine
String[] args = new String[] { "-vvv", "--plugin-path=c:\\Program Files\\VideoLAN\\VLC\\plugins" };
jvlc = new JVLC(args); //replacing --> jvlc = new JVLC();

This will tell the vlc library where to go looking for the plugins.

Additionally, it is important to have the win32 vlc directory in your path as the renamed vlc.dll is dependent on libvlccore.dll. Windows will not load vlc.dll unless it can find libvlccore.dll.

I tried adding

String jnalibpath = System.setProperty("jna.library.path","c:\\Program Files\\VideoLAN\\VLC");

to the application entry point, but that only gets jna to the vlc.dll. The windows load will still fail because of the dependent dll (libvclcore.dll).

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

Re: main access error: no access module matched "any"

Postby Jossnaz » 22 Jul 2008 17:47

great you got it working! thanks a lot for the effort!


I think it would be great to copy paste this into a little guide which is so badly necessary. Please include dates and versions you used, because in half a year, this is probably no longer working and everybody is gonna wonder which version you used.


thanks so much!

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

Re: main access error: no access module matched "any"

Postby littlejohn » 27 Jul 2008 22:35

Hi people,
3. copy libvlc.dll to vlc.dll and be sure the vlc folder is in the path
Hi,
since changeset aa6fd556ea5c42b8791c8fc4b82f5aaafa6f3f55 (ie, since 27/07/08) libvlc.dll will be correctly loaded on windows too, so there will be no need to copy libvlc.dll to vlc.dll.

Cheers,
lj

saurabh
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Aug 2008 08:19
Operating System: Linux
Location: Pune, India

Re: main access error: no access module matched "any"

Postby saurabh » 07 Aug 2008 15:44

Hey...
Nice u guys got tht example working...
I am getting this error :

Exception in thread main : UnsatisfiedLinkError: fontmanager.dll : Specified Procedure could not be found.


Please help me so i can get tht application running...
Thanks...

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

Re: main access error: no access module matched "any"

Postby littlejohn » 07 Aug 2008 18:16

Hey...
Exception in thread main : UnsatisfiedLinkError: fontmanager.dll : Specified Procedure could not be found.
This error is not related to the java bindings. Is VLC working fine with the same file to play and the same "enviroment" conditions?

saurabh
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Aug 2008 08:19
Operating System: Linux
Location: Pune, India

Re: main access error: no access module matched "any"

Postby saurabh » 08 Aug 2008 11:05

1)Hi...
I am through th previous issue...
I am getting this error...
No other exception just this one...

th application stops responding after "set item" button pressed...
Please can u help me quickly... I hv to finish with this player as soon as possible...

D:\Saurabh\workspace\Player\vlcjava\java>java -Djava.library.path=D:\Saurabh\workspace\jvlc_new VLCPlayerFrame
[00000001] main libvlc error: no memcpy module matched "any"
[00000299] main interface error: no interface module matched "hotkeys,none"
[00000299] main interface error: no suitable interface module
[00000001] main libvlc error: interface "hotkeys,none" initialization failed
[00000302] main access error: no access2 module matched "file"
[00000300] main input error: open of `file:///D://Video//a.avi' failed: could not create access: no access2 module matched "file"

2)Plus while putting th path of video file in code.....

" jvlc.playlist.add("file:///D:\\Video\\a.avi", "a.avi"); "

Is this th right way for windows xp or how... ?

Please tell me....
I am confused...
Thanks in advance.....

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

Re: main access error: no access module matched "any"

Postby littlejohn » 08 Aug 2008 11:30

Hi,
read through this forum posts, the solution to your problem has already been discussed here:

viewtopic.php?f=14&t=47912&sid=464565a4 ... 7b#p153923

saurabh
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Aug 2008 08:19
Operating System: Linux
Location: Pune, India

Re: main access error: no access module matched "any"

Postby saurabh » 09 Aug 2008 06:21

Hi...
Thanks for th help..
I got everthing fine...
Now I want to do some enhancement..
How could I get th info of th video that is supposed to be added into my playlist BRFORE playing or even adding into playlist...
Since ther are no docs available for jvlc... I am not able to find it...
Could u help me into that... ?

plus I am also getting this kind of error while playing...

D:\Saurabh\workspace\jvlc-player>java VLCPlayerFrame
libdvdnav: Using dvdnav version 0.2.0cvs from http://dvd.sf.net
libdvdread: Using libdvdcss version 1.2.9 for DVD access
libdvdread: Can't stat VLCPlayerFrame
No such file or directory
libdvdnav: vm: failed to open/read the DVD
[00000294] main input error: no suitable access module for `VLCPlayerFrame'
[00000346] a52 decoder: A/52 channels:2 samplerate:48000 bitrate:192000
No accelerated IMDCT transform found

could u tell hw to resolve this... ?

Thanks in advance...

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

Re: main access error: no access module matched "any"

Postby Jossnaz » 27 Aug 2008 00:49

i got it working in eclipse (no idea how to start it outside from there tbh)

so the complete guide would look like this:




What i've done so far is:
Today it's the 27. August 2008

get latest build and install
http://nightlies.videolan.org/build/win32/latest/
Use the exe installer.

Get maven for windows
http://maven.apache.org/download.html
or directly http://www.apache.org/dyn/closer.cgi/ma ... .9-bin.zip

Follow the installation procedure which was:

Windows 2000/XP

1. Unzip the distribution archive, i.e. apache-maven-2.0.9-bin.zip to the directory you wish to install Maven 2.0.9. These instructions assume you chose "C:\Program Files\Apache Software Foundation\" . The subdirectory apache-maven-2.0.9 will be created from the archive.
2. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value "C:\Program Files\Apache Software Foundation\apache-maven-2.0.9" . Note : for Maven < 2.0.9, be sure that the M2_HOME doesn't have a '\' as last character.
3. In the same dialog, add the M2 environment variable in the user variables with the value "%M2_HOME%\bin" .
5. In the same dialog, update/create the Path environment variable in the user variables with the value "%M2%;%Path%" to add maven available in the command line.
6. In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. "C:\Program Files\Java\jdk1.5.0_02" and that "%JAVA_HOME%\bin" is in your Path environment variable.
7. Open a new command prompt (Winkey + R then type "cmd" ) and run "mvn --version" to verify that it is correctly installed.




Get git for windows
the only for me working way to do this was to get cygwin
http://www.cygwin.com/setup.exe

in the installation procedure you'll be prompted to select packages (that was at the point where I actually did not know what they wanted from me)
Go to the devel packages and select git

now start cygwin, you'll be in the console mode
now enter
git clone git://git.videolan.org/vlc.git


exit the command line

now go using the command prompt to your vlcgit clone which is somewhere in your cygwin installation dir (default is c:/cygwin *yeah right everybody installs into c:/*... so mine was: D:\programs\cygwin\home\Lukas Meier\vlc)
To start your command prompt press
Windowskey+R (or press start - run)
then type
cmd
press enter

Now you should be in your command prompt in your cygwin dir. Find your git clone of vlc and go into the bindings/java folder which was at my computer at D:\programs\cygwin\home\Lukas Meier\vlc\bindings\java
Write:
mvn -Dmaven.test.skip=true install

You'll get some errors when u do it with tests... so we skip em. I know of a linux programmer that those are not of importance as he used JVLC for himself.


Now it downloads and makes the jvlc files

go to the bindings folder
do
mvn eclipse:eclipse

now you can import the hole crap into eclipse
in eclipse do
File
import
existing project, then choose the folder where the bindings are

you should get jvlc core and jvlc sample client
now u cant compile cause of some missing variables...

now from our friend called GodLike Smads

"You will need to ad the M2_REPO path into the jvlc-core project. This is under properties->Java Build Path->Libraries(tab)->Add Variable(button)
M2_REPO = (something like)C:/Documents and Settings/username/.m2/repository

There is example code in the jvlc-core project. If you import projects from the bindings/java directory it will find jvlc-core and jvlc-samples-client.

You will still need to make sure the args are correct for the jvlc = new JVLC(args) call."

e.g. in VlcClient.java

String[] args = new String[] { "-vvv", "--plugin-path=c:\\Program Files\\VideoLAN\\VLC\\plugins" };
jvlc = new JVLC(args); //replacing --> jvlc = new JVLC();

and wow

HA! You can use JVLC.

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

Re: main access error: no access module matched "any"

Postby Jossnaz » 10 Oct 2008 19:49

here a chatlog with a different jvlc user Keithel


2008-10-10
<Keithel> (except in java bindings, not all of the events are bound back to java -- yet)
<xtophe> Deathbob: done
<j-b> we cannot activate trac for dead people...
<Jossnaz> i spent so much time getting jvlc to run only to find out it's 60% crap
<Keithel> Jossnaz: I've had reasonable luck with it.
<Jossnaz> well not crap... just not usefull yet
<Jossnaz> what have you done with it?
<xtophe> scarabeus: and when you have done a bit send me personally the file or put it online and send the link to one of the mailinglist
<Keithel> Jossnaz: I'm using it for playback to a java widget (JPanel).
<Keithel> A co-worker had to go in and make some small changes, and we had to add some more binding code to pass events up -- for MediaDescriptor
<Deathbob> Thank You
<Keithel> It does indeed work ok for playback.
<scarabeus> xtophe: actualy you have updated one on your mail already i added 10 additional % so far but it is mostly in what user see first so it would be smart to include it into your versioning system already
<Keithel> and I've got it converting stuff, however, having multiple JVLC object instances is proving to be troublesome
<Keithel> That's my current problem.
<xtophe> scarabeus: ok
<Keithel> one instance of jvlc for doing conversion, after the main instance we have set up to playback,
<Jossnaz> you can do conversion with vlm and playback
<Jossnaz> then u only need 1 instance, no?
<Jossnaz> i mean i used jvlc for playback too
<Jossnaz> but why the hell would you use jvlc for playback, when you can playback with vlc anyways?
<Keithel> Custom code -- overlays n such :)
<Keithel> the rest of our codebase is in Java
<scarabeus> xtophe: by that mail i mean first mail i sent you 2008-09-15
<Keithel> and Noone else here wants to play with configure, and cross-platform C/C++ code.
<Keithel> Anyway - the playback jvlc instance seems to somehow acquire the args that were used to set up the conversion jvlc instance... (--sout:...)
<scarabeus> well i still dont get why didnt you pass over to cmake as rest of kde
<Keithel> it's maddening
* scarabeus (gentoo-kde member)
<xtophe> scarabeus: we only use qt4 and not kde
<Jossnaz> you work in linux?
<Keithel> Both Linux + Windows.
<Keithel> deployment is currently on windows.
<xtophe> scarabeus: and there is the start of a cmake buildsystem somewhere in extras/
<Jossnaz> you get up to date jvlc via cygwin?
<Jossnaz> or how do you do it?
<Keithel> I just pull vlc git repo on my linux box (and vm),
<Keithel> I've been building the jvlc stuff through maven in cygwin on my windows box however.
<Keithel> but it doesn't really matter -- it could be done in either environment..
<Keithel> Doing the VLC build with cygwin is a pain in the ass.
<Jossnaz> i think compiling jvlc under linux for windows is a pain in the ass too, no?
<scarabeus> xtophe: i know that managing multiplatform apps is less pain in the ass with cmake (althrought cmake sucks^2 because of its somethimes wierd behavior)
<Keithel> mvn -Dmaven.test.skip=true install
<Keithel> pretty easy
<Jossnaz> you have to somehow copy the windows java files to your linux system, no?
<Jossnaz> that's what i tried...
<Keithel> I did the opposite :)
<Jossnaz> i mean mvn -Dmaven.test.skip=true install works under cygwin
<Jossnaz> i dont understand?
<Keithel> yep
<Keithel> You can do it either way:
<Keithel> Linux or windows (cygwin) -- go to git repo (or copy over the bindings/java portion of the repo to whichever box you're building on)
<Keithel> then, in either shell (linux, or cygwin bash), change to the bindings/java directory
<Keithel> and run: mvn -Dmaven.test.skip=true install
<Keithel> in Linux, the resultant .jar files will be installed to ~/.m2/org/....
<Keithel> in Windows, they'll be installed to %USERPROFILE%/.m2/org/....
<Keithel> just copy the one .jar created -- jvlc-core-0.9.0-SNAPSHOT.jar - to wherever your project is..
<Jossnaz> wait... i dont understand this: <Keithel> Linux or windows (cygwin) -- go to git repo (or copy over the bindings/java portion of the repo to whichever box you're building on)
<Keithel> And it's dependencies - that maven fetched.
<Keithel> you know how to check out vlc?
<Jossnaz> yes
<Jossnaz> ah with git repo you mean check out vlc
<Keithel> k, in the working directory you check out, there's a "bindings/java" directory.
<Keithel> yep
<Keithel> :)
<Jossnaz> and you have no problems with codecs?
<Keithel> Haven't sofar -- works with all codecs that vlc supports --
<Jossnaz> i mean jvlc 0.9.0 is not compatible with 0.9.4 codecs of vlc, is it?
<Jossnaz> you need vlc installed on your machine, dont you?!
<Keithel> Yes
<Keithel> and whatever shell you launch your java project from, it needs vlc directory in PATH
<Keithel> and when you initialize jvlc object, you need to pass --plugin-path=<path/to/vlc/plugins/dir?
<Keithel> >
<Keithel> I'll go off and create a paste space with some useful stuff.
<Jossnaz> paste space?
<Jossnaz> thanks a lot for the input... really cool
<Jossnaz> i'll post it to my jvlc thread
<vlcsvnbot> keithel pasted 'initializing jvlc' (http://paste.videolan.org/4986)
<Keithel> That should help some
<Keithel> I'm currently using netbeans for my project, so I use that "CustomPathRunner.py" script I cooked up to launch netbeans to point to the current vlc dir I'm working with.
<Keithel> it's a bit kludgey, but I don't like modifying my system path -- as on windows, that requires a reboot >_<
<Keithel> and on Linux, that a log-out, log-in if using gui shortcuts.
<Keithel> Reason you're having problems with codec loading is no doubt because your code can't find the plugins dir :)
<Keithel> I had that problem when I was starting with JVLC too.
<Keithel> I suppose, now that I have more know-how with JVLC, I should spruce up the JVLC pages in the wiki.
<Keithel> But I would agree with you, JVLC does need some work -- event bindings aren't fully fleshed out yet, but it's pretty useful sofar.
<Keithel> I like using Java for GUIs because you can pull them together *sooo* fast.
<Keithel> it's pretty amazing how fast you can whip together a gui with swing.

wollnyst
New Cone
New Cone
Posts: 8
Joined: 10 Oct 2008 16:40

Re: main access error: no access module matched "any"

Postby wollnyst » 11 Oct 2008 18:17

hi, i followd the "guide", but no i get an UnsatisfiedLinkError exception.

whats wrong?

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Das angegebene Modul wurde nicht gefunden. 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 VLCPlayerFrame.initComponents(VlcClient.java:66) at VLCPlayerFrame.<init>(VlcClient.java:47) at VlcClient.main(VlcClient.java:218)
Chers,
Stefan

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

Re: main access error: no access module matched "any"

Postby Jossnaz » 13 Oct 2008 11:54

which guide?

what versions?

binary?


generally unsatisfied link error means that it cannot find something it is looking for

did you add in the java file the pluginspath? did you install vlc into standard directory? did you edit vlc.rc file?

you saw:
viewtopic.php?f=14&t=50774

?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 34 guests