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
stdout:
QT_SYSROOT:
QT_INSTALL_PREFIX:C:/Qt/6.6.1/msvc2019_64
QT_INSTALL_ARCHDATA:C:/Qt/6.6.1/msvc2019_64
QT_INSTALL_DATA:C:/Qt/6.6.1/msvc2019_64
QT_INSTALL_DOCS:C:/Qt/Docs/Qt-6.6.1
QT_INSTALL_HEADERS:C:/Qt/6.6.1/msvc2019_64/include
QT_INSTALL_LIBS:C:/Qt/6.6.1/msvc2019_64/lib
QT_INSTALL_LIBEXECS:C:/Qt/6.6.1/msvc2019_64/bin
QT_INSTALL_BINS:C:/Qt/6.6.1/msvc2019_64/bin
QT_INSTALL_TESTS:C:/Qt/6.6.1/msvc2019_64/tests
QT_INSTALL_PLUGINS:C:/Qt/6.6.1/msvc2019_64/plugins
QT_INSTALL_QML:C:/Qt/6.6.1/msvc2019_64/qml
QT_INSTALL_TRANSLATIONS:C:/Qt/6.6.1/msvc2019_64/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:C:/Qt/Examples/Qt-6.6.1
QT_INSTALL_DEMOS:C:/Qt/Examples/Qt-6.6.1
QT_HOST_PREFIX:C:/Qt/6.6.1/msvc2019_64
QT_HOST_DATA:C:/Qt/6.6.1/msvc2019_64
QT_HOST_BINS:C:/Qt/6.6.1/msvc2019_64/bin
QT_HOST_LIBEXECS:C:/Qt/6.6.1/msvc2019_64/bin
QT_HOST_LIBS:C:/Qt/6.6.1/msvc2019_64/lib
QMAKE_SPEC:win32-msvc
QMAKE_XSPEC:win32-msvc
QMAKE_VERSION:3.1
QT_VERSION:6.6.1

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

…\ext\qt6\meson.build:63:6: 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.