gstreamer as a standalone addon for Windows (example)

Hey, for a project I’m working on, we toyed with the idea of using gstreamer for videoplayback on Windows. I chatted with Mike Creighton as I’d seen his instructions (here https://github.com/mikecreighton/cinder-GStreamer-Integration)

My minion + I didn’t like that these instructions involved changing openframeworks core, so we made a copy of the code, which has the nice side effect that it can be swapped out with quicktime on the fly.

We also didn’t like the instructions that said we had do manually add each .dll in the gstreamer folder, so we did this in the visual studio xml project file.

The addon + example are here https://github.com/soyoungshin/ofxGstStandaloneVideo
This only works with OSSBuild 10.6 LGPL

You still have to install OSSBuild per Mike’s instructions, but all the steps listed under “Compiling in Visual Studio C++ 2010” should be taken care of in the project file in the example folder.

Hopefully this is of use to someone else struggling with video playback on windows. We had a 2x performance increase using gstreamer instead of quicktime.

Best
Soyoung

Nice work! I am getting an access violation when I try to play a video with alpha enabled using
player.setPixelFormat(OF_PIXELS_RGBA);

when I use OF_PIXELS_RGB the same movie plays fine.

For some reason in the package I have downloaded, some parameters passing in the :

GstCaps *caps = gst_caps_new_simple(mime.c_str(),

instruction in the movie loader were commented.

You need to uncomment this to make it work.

I did some work getting GStreamer to run on Windows a while back…probably old now but might still be useful:
http://forum.openframeworks.cc/t/gstreamer-playback-under-windows/3610/0

fast forward 6 months later, I didn’t realize there was any activity on this thread :slight_smile:

This blob of code is pretty old in internet terms (ofx 0.7.1 i think?). I believe when I was working on this, the ofGstVideoPlayer.cpp had those lines commented out. But in the newest release, they are only-commented-out-sometimes (dependent on an #if #else branch).

I’m not sure how much sense it makes to keep this repo up to date, but for a future someone needing advice on this, it is entirely possible to copy the code from libs/openFrameworks/video/ofGst* in to an addon folder, and rename the references to something unique. (eg. ofxStandaloneGstPlayer)

and Pierre, I used your thread tons when I was working on this! Thanks for the guidance!

A side note, we-ended-up-going-Linux-on-this-project. We were having issues with video playback over multiple screens, and I found that Gstreamer on Ubuntu(Oneiric Ocelot) was 2-3x faster than Gstreamer on Windows.

Don’t know, it’s up to you. For my personal sake, I’ve found it useful.

A side note, we-ended-up-going-Linux-on-this-project. We were having issues with video playback over multiple screens, and I found that Gstreamer on Ubuntu(Oneiric Ocelot) was 2-3x faster than Gstreamer on Windows.

OK, good to know that !