Video rendering on qtwidget using gstreamer

Hi Team,

I want to achieve video rendering on qtwidget using gstreamer. To achieve this I am using qt5videosink gstreamer plugin.

Below is my pipeline.

gst-launch-1.0 videotestsrc ! qt5videosink

But when I am running this pipeline on my linux machine. Pipeline is running but there is not output widget opening where I can see the video.

Logs:

User-2:~$  gst-launch-1.0 -v videotestsrc ! qt5videosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQtVideoSink_qt5:qtvideosink_qt5-0.GstPad:sink: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:05.508780834
Setting pipeline to NULL ...
Freeing pipeline ...

Can someone help me here, How we can achieve this?

Thanks

Where do you get qt5videosink from?

Generally, you need to create the UI yourself and then via the API of the element you can embed its video output into a Qt UI.

Hi @slomo,

I have install using ubuntu package manager.

User-2:~$ gst-inspect-1.0 qt5videosink
Factory Details:
Rank none (0)
Long-name Qt video sink
Klass Sink/Video
Description A video sink that can draw on any Qt surface
Author George Kiagiadakis george.kiagiadakis@collabora.com

Plugin Details:
Name qt5videosink
Description A video sink that can draw on any Qt surface
Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstqt5videosink.so
Version 1.2.0
License LGPL
Source module qt-gstreamer
Binary package QtGStreamer (Debian)
Origin URL Debian Package Tracking System - qt-gstreamer

Hi @slomo,

Is there any way we can create a simple gstreamer pipeline to achieve video rendering over qtwidget,

qt-gstreamer is unmaintained and completely outdated at this point. There’s unfortunately no generic Qt video sink, but there’s a QML 5/6 video sink in gst-plugins-good if QML is an option for you.