How to setup Gstreamer for NetBeans IDE on Windows 10

313 views
Skip to first unread message

Filip Kaduch

unread,
Jan 30, 2018, 10:08:59 AM1/30/18
to gstreamer-java

I have a problem with setting up gstreamer library for my NetBeans IDE. Everytime I try to compile a Gstreamer example code I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library: gstreamer

In this line of code: Gst.init();

I have gstreamer installed on my PC and I have all libraries needed included in my project(jna-4.5.1, gstreamer-java-1.4 and gst1-java-core-0.9.2) Do you have any idea what might be missing?

Neil C Smith

unread,
Jan 30, 2018, 10:36:27 AM1/30/18
to gstream...@googlegroups.com
Hi Filip,

Firstly, no need to post twice - first posts are moderated - you should be fine now.

You don't need gstreamer-java *and* gst1-java-core.  The former is a binding to the deprecated GStreamer 0.10, the latter to GStreamer 1.x.  Just use gst1-java-core unless you need to work with GStreamer 0.10?

You don't mention what version of GStreamer you have installed, if at all?  To get started you want to install GStreamer itself - there are ways of packaging it with your application if you want that later.

You then need to add the GStreamer bin folder to the system path.  Simplest is to add this (possibly C:\gstreamer\1.0\x86_64\bin\ ) to the top of the system path - https://betanews.com/2015/11/23/windows-10-finally-adds-a-new-path-editor/

Depending on what build system you're using you might be able to set this just for running from the IDE, or you can also set the path inside your application using JNA Platform - eg. https://github.com/praxis-live/praxis/blob/master/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/GStreamerLibrary.java#L50

Good to see you're using the best Java IDE there! ;-)

Best wishes,

Neil

--
Neil C Smith
Artist & Technologist

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Filip Kaduch

unread,
Jan 30, 2018, 7:00:43 PM1/30/18
to gstreamer-java
Hi Neil, thank you very much for your answer!

I am sorry for posting twice, but at first I didn't notice that this group is moderated.

Back to the question, I don't need to work specifically with GStreamer 0.10 so thanks for your GStreamer 1.x. recommendation.
This is my JVM version:
1.81.8.0_151 



x86_64






So I installed GStreamer from the first link you have provided. And I have also set my system path like this:

and then tried to compile the example but the outcome was still the same exception as the first time.
I am sorry if I am missing something obvious here but I don't have any idea what have I done wrong.
Anyways I am really thankful for your quick answer it explained me a lot!

With regards,
Filip



Dňa utorok, 30. januára 2018 16:08:59 UTC+1 Filip Kaduch napísal(-a):
Auto Generated Inline Image 1

Neil C Smith

unread,
Jan 31, 2018, 4:37:00 AM1/31/18
to gstream...@googlegroups.com
Hi,

On Wed, 31 Jan 2018 at 00:00 Filip Kaduch <filip....@gmail.com> wrote: 
I am sorry for posting twice, but at first I didn't notice that this group is moderated.

No problem!  You are not the first. :-)


and then tried to compile the example but the outcome was still the same exception as the first time.
I am sorry if I am missing something obvious here but I don't have any idea what have I done wrong.

 I said "path" not "gstreamer path".  You need to add it to the system path, which has its own editor I think (see link earlier).  This should not be empty - just add the GStreamer paths at the top / beginning - don't delete anything that's already there.  I couldn't get this to work adding the path at the end of the list, but never tracked down why.

Or include JNA Platform and try the Praxis LIVE approach I linked to, which sets the path environment variable just for your code - again note the handling of existing paths though!

Best wishes,

Neil

Filip Kaduch

unread,
Jan 31, 2018, 1:57:48 PM1/31/18
to gstreamer-java
Hello again,

Huge thanks for your help I've finally made it work!
I am really thankful for your patient approach with me.

Dňa utorok, 30. januára 2018 16:08:59 UTC+1 Filip Kaduch napísal(-a):

Neil C Smith

unread,
Jan 31, 2018, 2:10:00 PM1/31/18
to gstream...@googlegroups.com
On Wed, 31 Jan 2018 at 18:57 Filip Kaduch <filip....@gmail.com> wrote:
Huge thanks for your help I've finally made it work!
I am really thankful for your patient approach with me.

Great!  Thanks for letting me know it worked.

Have fun!

Best wishes,

Neil
Reply all
Reply to author
Forward
0 new messages