How to use different gstreamer than system on linux?

Hi,

tldr: How can I use gstreamer 1.18 in my oF apps, but stay up-to-date with the rest of my system on Arch Linux?

After upgrading to gstreamer 1.20 all video playback stopped working. It compiles fine, but I am getting these errors when running the app:

notice ] ofGstUtils: Got context from element 'vaapipostproc0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";

[notice ] ofGstUtils: Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0", gst.vaapi.Display.GObject=(GstObject)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0";


(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.923: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.924: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.924: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.924: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.924: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.925: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink

(lm-video:218083): GStreamer-Base-CRITICAL **: 12:46:20.925: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
[ error ] ofGstUtils: startPipeline(): unable to pause pipeline after 5s
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module qtdemux0  reported: Internal data stream error.

I was getting similar issues with processing4. In both oF and processing the solution was to downgrade to gstreamer 1.18, but in order to do so I needed to roll back and freeze the system at a specific date. Not ideal for a computer I use for all kinds of other things as well… Adding to the weirdness: the AUR packager for processing4 was not able to replicate the bug, and video works fine with 1.20 on his system.

So, long story short, I don’t know exactly what the problem can be. Maybe it is my system that is at fault (although it’s weird that it happens on two different computers, one with an AMD/NVIDIA hybrid GPU, one with an internal Intel GPU). I have tried on Wayland (sway), xfce4, and bspwm, all with the same result. I opened an issue on Github, but so far no response.

So, I have now built a package of gstreamer 1.18 that sits in my ~/build directory, but I have no idea how to make oF use this one instead of the systemwide installation. Any help much appreciated!

1 Like