GStreamer playback under Windows

I recently got arturo’s GStreamer player which normally runs under Linux to work on Windows XP in codeblocks in OF version 0.061. This plays back a large number of audio and video file types and is capable of streaming as well.

I’ve collected the relevant files here:…

This is actually separated into 3 parts.

  1. unzip the main file.

  2. unzip into the libs folder at the top level of the OF directory.

  3. unzip into your app folder.

  4. unzip the into the “bin” directory of the gstPlayerExample

  5. Install the GStreamer libs from here:…-0.10.5.exe

  6. Set the GST_PLUGINS_PATH environment variable (either in codeblocks or system-wide) to the GStreamer plugins directory.
    This should be /lib/gstreamer-0.10
    i.e. C:/gstreamer/lib/gstreamer-0.10

  7. Cross fingers, and then compile and run the app :slight_smile:

Some info about the GStreamer environment variables:…-nning.html

this is great! thank you

thank you. thank you. thank you.

greate job and very useful.

it’s help me. :smiley:

Hi Grimus,

Firstly thanks very much for putting this up! Much appreciated but I’m having a bit of trouble getting the example to run. I followed your steps above, but when I run it a system error box comes up saying that libgthread-2.0-0.dll and** libgmodule-2.0-0.dll** are missing. I tried to find these from google (placed in bin) but I get another error:

‘The procedure entry point g_module_open_ut8 could not be located in the dynamic link library libgmodule-2.0-0.dll’

Very confused!? Any ideas (prob using completely the wrong dlls - should these be in the library already)?
cheers, w

I’ve got it running , Thanks pierre. I’ve got cross my fingers … the third was the good one :wink:

One doub, this allow to read video streamed from a URL i guess. There is a way to send streaming video by OF?

take care

update: for those running windows 7, works if running the exe in xp compatibility mode!


Sorry to open this post after two months.

I need to load this sample in C++ of the visual studio 2008.

Can anyone help me?

Thanks in advance

Unfortunately you’re on your own there…I’m using the Winbuilds Gstreamer version that requires mingw, for Visual Studio there are some alternatives such as
Haven’t tried them though.

So I’ve been playing around with this guy for the last couple of hours. Hopefully in the future i’ll be leveraging the superior streaming capabilities of gstreamer/VLC for a project i’m working on, but for now i’ve just been testing its speed/compatibility for regular + HD video files. It looks exciting, but results have been mixed:

1st, the good: trying to play a 1080p/5d mk2 video files without Gstreamer - about 8fps.
with Gstreamer about 500-800fps :smiley: . (measured with fraps). That’s an obvious major performance increase, and means I can run some projects in 1080p in OF now.
also was able to play OGG, MKV, etc. fileformats.

the less than perfect things: in some applications, like while grabbing every frame, and manipulating a pixel array, it ended up being slower than the regular videoplayer. Also, i ran into some glitches while switching video files. If I don’t call closemovie() before loading a new movie file, It will play both movies simultaneously in one box. Also videoObject.height has a value of NAN, although videoObject.getHeight() works correctly. I expect there are enough little differences from the standard ofVideoPlayer to make it a bit of a headache to convert old projects with. And I’m getting some crashes still, that I haven’t identified the cause of yet.

thanks, and keep up the good work!


The problem with width and height is solved in github. The version there should be cpmpatible with winxows without any modification.

I think o solved some problems too, with movies not being closed properly but please post if you continue having problems with that version.

Regarding performance of Gstreamer vs ofVideoPlayer, I found that in general it depended very much on the codec in question. Apple codecs tend to work better with quicktime, but other more obscure codecs tend to work better with GStreamer…it’s a little bit trial and error.

tried to get streaming working from within gstreamer today, but no luck.

" GstPlayerExample.exe:4588 - gstvideo failed to get caps of pad appsInk0:sink
Gstreamer cannot query width and height, cannot query time duration"

I was able to view this stream in VLC, but not in qucktime on my machine.

thank you very much
I am playing with gstreamer
I hv got cross my finger too!
but i got very odd message from code block console

(gstPlayerExample.exe 508): GLib-GObject-CRITICAL **: g-object_set: assertion `G_IS_OBJECT (object)` failed  
(gstPlayerExample.exe 508): GLib-GObject-CRITICAL **: g-object_set: assertion `G_IS_OBJECT (object)` failed  
(gstPlayerExample.exe 508): GLib-GObject-CRITICAL **: g-object_set: assertion `G_IS_OBJECT (object)` failed  
** (gstPlayerExample.exe 508): CRITICAL **: file ..\Source\gstramer\get\gstelement.c: line 2400: assertion `GST_IS_ELEMENT (element)` failed  
OF_ERROR: Gstreamer: unable to set pipeline to paused  
OF_ERROR: ofVideoPlayerGst couldn't load movie  

It only appeare with i run the source in code block
however it is normal when i run the .exe directly

Fishkingsin, I think you need to set the GST_PLUGINS_PATH environment variable in codeblocks for it to run within CB. On some version of windows you don’t need to do that for some reason…but try it and should solve your problem. Set this variable to the path of your Gstreamer plugins. There should be a system wide variable already set to this if you can run it outside of CB, so just copy that one if you like.

@ drosen … I haven’t tried streaming yet with GStreamer, either under Linux or Windows. I think arturo has though…so if you post your example with instructions maybe I can have a try at getting it working

thanks very much
I am not really familiar with CB enviroment
just try
this is in Settings->Global variables

![]( 18h53_06.png)

![]( 18h56_18.png)

No, Global Variables in CB is another feature.

Go to Settings->Envronment->Environment Variables

Then click Add

and Value = “D:\gstreamer\lib\gstreamer-0.10”

Thanks grimus

@grimus my ‘example’ was just the worlds most basic. load 1 file, call update() and draw() on it. However, issues could have come from the fact that I was streaming from my Mac to my windows box. I was mistakenly thinking that VLC is based on GStreamer.
It was the only program I could get to properly load that particular stream.

Hi all,

thanks grimus for your tutorial of how to use gstreamer from openframeworks in Windows. I have no problem compiling and running your example, but:

. I have an Axis 221 ip camera and I want to use gstreamer to collect frames to do image processing. I follow this thread also :, and I tried to set the pipeline, but I didn’t get it to work … In linux and using some wrapping functionalities of gstreamer in Qt I use this pipeline correctly: “gnomevfssrc location= ! decodebin ! ffmpegcolorspace ! video/x-raw-rgb ! appsink name=sink”.

Anyone can help me? How can I get frames from this ip camera using gstreamer in openframeworks?

Thanks in advance for your help.