GStreamer and Qt6

Hi everyone, I have recently started using GStreamer for playing an RTSP feed in Qt. I have the video playing fine however not in my Qml window. I am having a bit of an issue using the Qt6 Qml sink. I have the latest version of Gtreamer installed both the dev and runtime kits.

However, when I go to compile my code or even the Qt6 example using Qml I am faced with the following error:

qrc:/main.qml:6:1: module “org.freedesktop.gstreamer.Qt6GLVideoItem” is not installed

On GitHub I can download the qt plugins folder and I can see the Qt6 files but I am unable to link them to my program.

Could any one give me any tips? I think there are a few other people online facing the same issue.

Thanks in advance.

Okay, so I have figured out that the plugin doesn’t appear to be compiled with the released version. So I have tried to build gstreamer with Cerbero, I have pointed it to Qmake however I am still receiving this error:

Called: C:\\Qt\\6.6.1\\msvc2019_64\\bin\\qmake6.exe -query → 0

Run-time dependency qt6 (modules: Core, Gui, Qml, Quick) found: YES 6.6.1 (qmake)
Program qsb-qt6 qsb found: NO

…\ext\qt6\ ERROR: Program ‘qsb-qt6 qsb’ not found or not executable

Any help would be appreciated, Thanks.

Well I have managed to compile it, the path to the Qt bin folder had to be listed as a user variable and not a system variable. Now to try and make the plugin work.

Okay so I have ran the installer, set the GST_PLUGIN_PATH to the /lib/gstreamer-1.0 folder and I have also ran gst-inspect-1.0 which is showing the Qt6 QML plugin as installed. However when I run my program in Qt I am faced with:

QQmlApplicationEngine failed to load component
qrc:/main.qml:6:1: module “org.freedesktop.gstreamer.Qt6GLVideoItem” is not installed
ASSERT: “!isEmpty()” in file C:\Qt\6.6.1\msvc2019_64\include\QtCore/qlist.h, line 628

Again any ideas would be much appreciated. Thanks

Make sure that you are loading the qml6glsink element before the QQmlApplicationEngine. See the example subprojects/gst-plugins-good/tests/examples/qt6/qmlsink · main · GStreamer / gstreamer · GitLab for more information.

first to check if qml6 gl sink is compiled. show the output of
gst-inspect-1.0 | grep qml

Hi, thanks for the replies. I have tried loading the example itself and I am still getting the same error. Running gst-inspect-1.0 I get:

and running gst-inspect-1.0 grep qml6 I get:

running gst-inspect-1.0 grep qml returns no such element or plugin.

Thanks again

qml6glsink is available. I guess your problem is a Qt issue and not gstreamer problem. I will try a small case for you.

I managed to successfully run the test case ystreet00 posted with Qt 6.6.2 + Qt Creator 12.
What I did is on Ubuntu 22.04 and use pkg config settings of gstreamer and qt in the build.
And Qt6 lib path has to be added to LIB_LIBRARY_PATH in order to let qml6glsink be loaded properly because it depends on qt libs.

Hi, I am still having this same issue, when I run pkg-config itself I can see:

gstqt6d3d11 and gstqml6 which I have included in PKGCONFIG in the build however the Qt6GLVideoItem is still not found.

What I have done so far is build GStreamer using Cerbero with the qt option selected. This is showing with gst-inspect, I have set the LIB_LIBRARY_PATH to the Qt6 lib folder. When it builds with cerbero it finds qmake and qsb etc.

Any help is appreciated. Thanks

On Linux, you need to set plugin path.
export GST_PLUGIN_PATH=path/gstreamer/lib/gstreamer-1.0
I guess you need it as well on Windows.

I have the GST_PLUGIN_PATH set on windows as well and I am still having this issue.


I just in the process of trying it with ubuntu as this is what my application will eventually run on.

From the Cerbero build guide I see this:

NOTE: The package outputted will not contain a copy of the Qt5 libraries in it. You must link to them while building your app yourself.

I have done everything until this step, Qt sees gstreamer as I can use everything but the plugin and gst-inspect-1.0 sees the qml6 plugin. I just can’t seem to get it to load it.

you need to add gstreamer lib path to LIB_LIBRARY_PATH as well.

If still not working, show all steps you did.

I have LIB_LIBRARY_PATH set to:


The steps I took were,

Install QT 6.6.3 from offline installer

Downloaded the Cerbero version of gstreamer to build

Set the path variable so that it could find qmake

Built gstreamer with qt6 option using cerbero

Installed both the development and release versions of Gstreamer

C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 <= plugin path

show your qt code and build file

I am simply running the QT6 qml sink example.

I really appreciate all of your help so far. Gstreamer is working great for me, it’s just this last part to show it on a QML window.

my .pro file looks like this


QT += qml quick widgets

QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig debug
    gstreamer-1.0 \
    gstreamer-video-1.0 \
    gstqml6 \



SOURCES += main.cpp

RESOURCES += qmlsink.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0\

And I built gstreamer with this command:

./cerbero-uninstalled -v qt6 -c config/win64.cbc package gstreamer-1.0

I did it on Linux and have not tried on Windows. Will try it later.

    gstreamer-1.0 \
    gstreamer-video-1.0 \
    gstqml6 \  <=== a plugin, not a pkg package in gstreamer and therefore not needed.

you are messing gstreamer lib up with plugin lib. All plugin libs(in path/gstreamer/lib/gstreamer-1.0) are looked for in the app with GST_PLUGIN_PATH. However, plugin libs loading needs libs in path/gstreamer/lib and Qt libs. LIB_LIBRARY_PATH is used for path/gstreamer/lib and Qt libs.

Another thing: prefix path in all pkg files of gstreamer may not be right. Better to replace all of them if so(open any pc file to check it). In my build, I set flag --pkgconfig.relocatable (relative prefix, not sure if this works on Windows) in order to be able to copy the build to anywhere needed. Same issue with prefix path in all default qt pkg files.

If you try it on Linux, run your test code with
strace yourapp
and you will be able to see where it fails.