Gstreamer play video in GTK4 Window

Is there a good example of how to use gtk4paintablesink in Python? I am working on a app that uses GTK4 to display a video pipeline from Gstreamer. I can play the Gstreamer video from the CLI with no problem but can’t embed it in the window properly.


There is a minimal example in the repository. Does that help? If not, what problems are you running into?

1 Like

Thanks for the link to the repository. I can’t believe I didn’t find that earlier!

I copied the example verbatim to see if it would work and am getting another error that I’m guessing is related to a missing package. I saw a few recommended in google and installed those but no dice. I’ll figure it out eventually, thank you for the help!

paintable = gtksink.props.paintable

AttributeError: ‘NoneType’ object has no attribute ‘props’

That means that you don’t have the gtk4 GStreamer plugin available on your system. You need to build and install that into one of the plugin paths first.

1 Like

You are exactly right, I was missing gst-plugins-rs.

1 Like