We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 3 ... 5
GSVideo - Couldn't load library (Read 26979 times)
GSVideo - Couldn't load library
Jan 30th, 2009, 10:36am
 
I need som explanation to the mechanism of loading DLLs by the GSVideo Library.

I tried to get things to work by using "a windows-only package of GSVideo that includes an entire distribution of gstreamer, so there is no need of a separate gstreamer installation." from the codeanticode-site.
That took me a full day. With no result. Alwas the same Problem: "Can't load library xxx.dll". The Location was right. I was wondering if it was because of the different separators : .../library\gstreamer\base .

The next day, I installed the GStreamer-OABuild-20081230-Vista-32bit.exe. (I'm on Vista).
And tada! It worked at last!

I'm still getting these warnings:
** (java.exe:378Cool: WARNING **: Failed to load plugin 'C:\Program Files\Common Files\GStreamer\0.10\lib\gstreamer-0.10/libgstpng.dll': The specified module could not be found.

My question now is: Where does the all-in-one-version of GSVideo, which has all the libraries within, get this location above, which is the location of the GStreamer-Libaries of an uninstalled (!) version. And why? All the DLLs are still in the GSVideo-Library.


Thanks
Re: GSVideo - Couldn't load library
Reply #1 - Jan 30th, 2009, 1:56pm
 
Hey, similar problem here.

I'm working on XP, and I get the following error:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: can't load DLL avcodec-51 (avcodec-51|libavcodec-51|libavcodec-51-0) with -Djna.library.path=F:/processing/libraries/gsvideo/library\gstreamer\base. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'libavcodec-51-0': The specified module could not be found.

Any idea on how to make this work?
Re: GSVideo - Couldn't load library
Reply #2 - Jan 30th, 2009, 3:00pm
 
Now I get another slightly different error:

Cannot load GStreamer plugins from C:/Program Files/Processing/libraries/gsvideo/library\gstreamer\plugins

What's going on there? I really need some explanation.

In addition:
When I try to use the library version, that needs the separate GStremer installation, I get the same error.

In the source file "GSVideo.java" I found:

public static void setWinPath()

{

   LibraryPath libPath = new LibraryPath();



   String path = libPath.get();

   


gstreamerBinPath = path + "\\gstreamer\\base";


gstreamerPluginsPath = path + "\\gstreamer\\plugins";
   }

That doesn't make sense, does it?
Re: GSVideo - Couldn't load library
Reply #3 - Feb 2nd, 2009, 2:39am
 
Thanks for the feedback guys. This issue with the library dependencies is difficult to track and solve for me alone since I cannot test gsvideo on many different windows configurations, at least right now.

So far, I was able to run 0.4.6-win (the latest version that doesn't require a separate gstreamer install) on the following windows configurations:

* windows XP SP3
* windows Vista SP1

The problem with my tests on the Vista PC is that this test PC is my development machine as well, so it has a lot of MS devel stuff already installed on it, which a clean Vista machine doesn't have. This could be the source of the problems, at least on Vista.

So, for gekkoJ I'd recommend to follow these steps:
1) Remove all the stand-alone gstreamer versions you have installed on your computer. Also check the system PATH variable, and make sure that no reference to gstreamer directories is left (this is probably not needed, but just in case).
2) Remove all older versions of gsvideo.
3) Install gsvideo-0.4.6-win in your processing libraries folder.
At this point, try running any gsvideo example and post the error message you get.
4) Now install the vcredist package available here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&DisplayLang=en

Try again running gsvideo and see if there is any error.

For the problem homesick_alien is reporting, I'm not sure at this point what could be the reason, since I have tested gsvideo-0.4.6-win on a clean windows XP SP3 machine, and it worked fine. What Service Pack do you have installed? Perhaps you could follow the steps I recommended to gekkoJ to see what happens.

Thanks!
Re: GSVideo - Couldn't load library
Reply #4 - Feb 2nd, 2009, 9:13am
 
First of all, thanks for the help, ac.

After point 3 in your list I get:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: can't load library avcodec-51 (avcodec-51|libavcodec-51|libavcodec-51-0) with -Djna.library.path=C:/Program Files/Processing/libraries/gsvideo/library\gstreamer\base.

The same thing with Processing 1.0.1 and 0157 beta.
Btw, I'm using JRE 1.6.0_11.

That was the first error I got, when I started working with gsvideo and I could solve it by installing the gstreamer for vista.

Same error after installing the Visual C++ 2008 redist.

I really need help, since I'm on a important project and running out of time.

Greets,
Gekko

Re: GSVideo - Couldn't load library
Reply #5 - Feb 2nd, 2009, 1:39pm
 
So, I managed to make it work.
I'm not sure what did the trick though! I uninstalled and reinstalled almost everything related to video on my system, and now the basic example is working.

Thanks a lot, I'm digging into the library now Smiley

[edit] I forgot to mention that this time, I made a "full installation" of the K-lite pack - before I had the "standard" one.
Re: GSVideo - Couldn't load library
Reply #6 - Feb 2nd, 2009, 4:25pm
 
Hi, great to know that you make it work. I don't think that installing the full K-lite codec pack is making any difference, since gstreamer includes its own codecs, but I might be mistaken. And yes, it is good idea to uninstall all previous versions of gsvideo and gstreamer, since unexpected conflicts might occur. One thing that I imagine taking place if you install gsvideo-0.4.6-win and then any of the gstreamer-oabuild binaries is that the gstreamer-oabuild installer sets the gstreamer base directory and plugins directory in the system environment variables (PATH and GST_PLUGINS_PATH, respectively). This might confuse the library loader that I implemented in gsvideo 0.4.6 to load the local copy of gstreamer bundled with the gsvideo.

For Gekko, I suggest the following: try this version of gsvideo (where I disabled the library loader)

http://users.design.ucla.edu/~acolubri/test/gstreamer/gsvideo-20090202.zip

in combination with the latest gstreamer-oabuild for Vista. Let me know how it goes.

Thanks.
Re: GSVideo - Couldn't load library
Reply #7 - Feb 2nd, 2009, 5:19pm
 
First of all: Thank you for your efforts! That's really great.

The loop example gives me following warning in the Processing IDE but works! :
** (java.exe:1408): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10/libgstmad.dll': Das Betriebssystem kann %1 nicht ausführen.

In my NetBeans project I get the same warning followed by this error:

Error while running applet.
java.lang.RuntimeException: java.lang.RuntimeException: Could not load movie file station.mov

But you fixed the problem with the linkage to the base-folder of the no-additional-gstreamer-version!

Why are there different behaviors in the IDEs?
Re: GSVideo - Couldn't load library
Reply #8 - Feb 2nd, 2009, 7:30pm
 
You can just delete the file C:\gstreamer\lib\gstreamer-0.10/libgstmad.dll, and the error will go away. That plugin is used only to encode audio files, so you probably won't need it.

I'm not sure the reason for the problem with netbeans... maybe you have to specify some path for the libraries in the configuration of netbeans.
Re: GSVideo - Couldn't load library
Reply #9 - Feb 3rd, 2009, 8:59am
 
Damn it! I uninstalled the GTK+ and no more Warnings!
That means that you don't need it?
Why do they say so there:
http://users.design.ucla.edu/~acolubri/processing/gsvideo/home/installation.html   ?

The examples work in the Processing IDE. But with Netbeans I can't get it to work. I have to give the absolute path of the movie, not to get this "could not load movie"-error. Strange, isn't it?
And more important: It doesn't work. The movieEvent function is not called.

Man! So much questions in my head.
Re: GSVideo - Couldn't load library
Reply #10 - Feb 3rd, 2009, 9:13am
 
oops, sorry about the website, it is rather outdated by now. I forgot to update it. The problem is I never have the time to sit down and doing it.

So indeed, no need of installing GTK.

Right now, I don't know the reason why it is not working from Netbeans.
Re: GSVideo - Couldn't load library
Reply #11 - Feb 5th, 2009, 5:08pm
 
I finally got it to work from NetBeans.
I'm too emberrassed to tell my stupid error ...
Re: GSVideo - Couldn't load library
Reply #12 - Feb 9th, 2009, 9:55pm
 
Great! So what version of gsvideo are you using at the end? And on what variation of Vista (home, professional, with/o SP1, etc.)? Just for reference, since I don't have many Vista machines to do testing. Thanks.
Re: GSVideo - Couldn't load library
Reply #13 - Mar 10th, 2009, 8:07pm
 
WIndows XP stress!  Can anyone help?

cam= new GSCapture(this, camWidth, camHeight, fps);


UnsatisfiedError Link: Could not load library gstreamer-0.10

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: Could not load library gstreamer-0.10
at org.gstreamer.lowlevel.GNative.loadWin32Library(GNative.java:83)
at org.gstreamer.lowlevel.GNative.loadLibrary(GNative.java:43)
at org.gstreamer.lowlevel.GstNative.load(GstNative.java:38)
at org.gstreamer.lowlevel.GstAPI.<clinit>(GstAPI.java:33)
at org.gstreamer.Gst.init(Gst.java:213)
at codeanticode.gsvideo.GSVideo.init(GSVideo.java:98)
at codeanticode.gsvideo.GSCapture.init(GSCapture.java:262)
at codeanticode.gsvideo.GSCapture.initOS(GSCapture.java:246)
at codeanticode.gsvideo.GSCapture.<init>(GSCapture.java:53)
at sketch_081225a_Snow.setup(sketch_081225a_Snow.java:88)
at processing.core.PApplet.handleDraw(PApplet.java:1400)
at processing.core.PApplet.run(PApplet.java:1328)
at java.lang.Thread.run(Unknown Source)
Re: GSVideo - Couldn't load library
Reply #14 - Mar 10th, 2009, 8:12pm
 
Hello,

I'm currently preparing a new release of gsvideo. I haven't uploaded to sourceforge yet, but you can give it a try using the following package:

http://users.design.ucla.edu/~acolubri/test/gstreamer/gsvideo-20090309.zip

I have tested it on XP, and seems that the dependencies problems are fixed. It also includes a working version of GSMovieMaker.
Pages: 1 2 3 ... 5