ofxGStreamer on Windows



i finally got GStreamer working under Windows but i still have one problem.

When doing:
player.setPlayer(ofPtr(new ofGstVideoPlayer));

Video renders fine, i only have around 50 fps though.

If i add player.setPixelFormat(OF_PIXELS_NATIVE); i get a lot more FPS but the video is black & white.

Any suggestions?


What resolution are you playing back? it’s weird that only one video would slow down so much in a desktop computer. In any case, using opengl 3+, will allow you to use native pixels format and see it in color.

in main:

int main(){
	  ofGLWindowSettings settings;
	  ofRunApp(new ofApp);


Thanks! When settings opengl to 3.3, it works fine.
Just out of curiousity, why doesnt it work with opengl 4?


it should work with opengl 4 just fine. OF defaults to opengl 2.1, if that’s what you mean we use shaders to do the color converstion from native format, usually some form of yuv, to rgb, so the cpu is freed of that work but the shaders only work when using opengl 3 or newer


I see, thanks. I was under the impression oF defaults to opengl 4, but i guess i was wrong.
Anyway, everythings working fine, thanks for your help!

On another note: Im not sure if youre aware, but the the oF 0.10.1 project generator doesnt correctly include all the files from the addon_config.mk from ofxGStreamer in the vs project - this has to be done manually.


no, dind’t knew, can you open an issue in the project generator gihub? https://github.com/openframeworks/prokectGenerator


sorry, nevermind, it works correctly.
All i had to do was in ofxGstreamer/scripts/ci/vs/install.bat to replace

set GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64
dir %GSTREAMER_1_0_ROOT_X86_64%


setx GSTREAMER_1_0_ROOT_X86_64 C:\gstreamer\1.0\x86_64
dir %GSTREAMER_1_0_ROOT_X86_64%

set didnt do anything and vs included the wrong directories. with setx, it seems to work