ftomassetti / jlibav

Automatically exported from code.google.com/p/jlibav
2 stars 1 forks source link

Library aliasing not working on win32/64 #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From: matrockxb@...

When trying the convert-example i get following error:

Mai 30, 2013 12:44:53 PM org.bridj.BridJ log
INFO: Library not found : avutil
Mai 30, 2013 12:44:53 PM org.libav.bridge.LibraryManager getInstance
SEVERE: unable to load native libraries
java.io.FileNotFoundException: Library 'avutil' was not found in path 
'[C:\libav-win64\usr\bin ...

I have correctly set the libav-libpath with:
System.setProperty("org.libav.libpath", "C:\\libav-win64\\usr\\bin");

System: Win 7 (64bit) / Java7 (64bit) / Netbeans IDE 7.3 / libav 0.8.5 

--------------------

Confirmed a problem with library aliasing.

Original issue reported on code.google.com by perutka....@gmail.com on 30 May 2013 at 11:42

GoogleCodeExporter commented 9 years ago
This bug is caused by BridJ. We have to wait until it's fixed.

Original comment by perutka....@gmail.com on 30 May 2013 at 3:41

GoogleCodeExporter commented 9 years ago
Is there a workaround?
I just want to try jlibav

Original comment by ahaf...@gmail.com on 18 Jun 2013 at 12:51

GoogleCodeExporter commented 9 years ago
I'm sorry it's taking so long. I'm still waiting for a fixed release of BridJ.

The problem is in the file names of Libav dynamic libraries. BridJ expects 
avcodec-53.dll to be avcodec.dll and similar to the others.

According to the code of the BridJ.findNativeLibraryFile() method:
https://github.com/ochafik/nativelibs4java/blob/bridj-0.6.2/libraries/BridJ/src/
main/java/org/bridj/BridJ.java

you should be able to override this behaviour either by setting a 
BRIDJ_<LIB-NAME>_LIBRARY environment variable or by setting a 
bridj.<lib-name>.library system property. In your case it will look like this:

System.setProperty("bridj.avcodec.library", 
"C:\\libav-win64\\usr\\bin\\avcodec-53.dll");
System.setProperty("bridj.avformat.library", 
"C:\\libav-win64\\usr\\bin\\avformat-53.dll");
System.setProperty("bridj.avdevice.library", 
"C:\\libav-win64\\usr\\bin\\avdevice-53.dll");
System.setProperty("bridj.avfilter.library", 
"C:\\libav-win64\\usr\\bin\\avfilter-2.dll");
System.setProperty("bridj.avutil.library", 
"C:\\libav-win64\\usr\\bin\\avutil-51.dll");
System.setProperty("bridj.swscale.library", 
"C:\\libav-win64\\usr\\bin\\swscale-2.dll");

Other possible solution is to compile Libav with disabled version strings in 
file names.

If there is no fixed release of BridJ within the next week, I will port the 
Jlibav 0.3-SNAPSHOT to the BridJ 0.7-SNAPSHOT. Anyway, I cannot do the same 
with the Jlibav 0.2. (I cannot make a stable version dependent on a snapshot.)

Thanks for your patience and stay tuned ;-) .

Original comment by perutka....@gmail.com on 18 Jun 2013 at 1:36

GoogleCodeExporter commented 9 years ago
OK. Thank you. I'll wait until next week.
I'm looking forward to testing your wrapper

Original comment by ahaf...@gmail.com on 19 Jun 2013 at 4:15

GoogleCodeExporter commented 9 years ago
There is still no fixed stable release of BridJ, so I made an update to the 
Jlibav 0.3-SNAPSHOT to change its dependency from BridJ 0.6.2 to BridJ 
0.7-SNAPSHOT.

I hope it'll help you. I'll make a new Jlibav release from the 0.2.x branch as 
soon as the BridJ 0.6.3 is available.

Original comment by perutka....@gmail.com on 28 Jun 2013 at 1:43

GoogleCodeExporter commented 9 years ago
Great! Is there a zip to download?

Original comment by ahaf...@gmail.com on 2 Jul 2013 at 1:10

GoogleCodeExporter commented 9 years ago
I don't make downloads for snapshots. You can use Maven (dependency settings 
are at the home page) or you can download it directly from the Maven repository 
here:

https://oss.sonatype.org/content/groups/public/com/google/code/jlibav/jlibav/0.3
-SNAPSHOT/

You'll also need to download BridJ 0.7-SNAPSHOT if you choose to download 
Jlibav directly.

Original comment by perutka....@gmail.com on 2 Jul 2013 at 1:31