Qtmediaplayer and custom gstreamer pipeline
-
Hi,
I want to play a local stored video in Qtmediaplayer by using custom gstreamer pipeline.
I saw on doc.qt.io something like this:
player->setMedia(QUrl("gst-pipeline: videotestsrc ! autovideosink"));But couldn't feagure what exactly i must write inside QUrl.
It's a .MP4 file i want to play.
Please help .
Thanx -
Hi,
Since it's an .mp4 file, why not just use the standard file URL ?
-
@SGaist i am running it on arm processor which is very slow
The hardware zynqmp SoC am using has hard-coded decode ip,
Which i am able to access only by gstreamer pipeline.I only want gstreamer pipeline in QUrl.
If anyone has any example please help.
-
Can you show the exact pipeline you need to use on the command line to show your video ?
-
gst-launch-1.0 filesrc location="input-file.mp4" ! qtdemux name=demux demux.video_0 ! h264parse ! omxh264dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
This is the pipeline am using to run and display video from command prompt and it's working fine.
I want to know how i can use the same in Qtmediaplayer QUrl .
-
From what I gather in the documentation, something like:
gst-pipeline: filesrc location=input-file.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! omxh264dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
. You will likely have to fiddle a bit. Still based on the documentation, you should name your sinkqtvideosink
to make use of a QVideoWidget output. -
What version of Qt are you using ?
-
Then upgrade your Qt version. As stated clearly in the documentation I linked to, it's a feature available since Qt 5.12.2.
-
Would have to rebuild the GStreamer backend to fit your needs.
Unless you have special restrictions, you can have several Qt versions in parallel. They must be explicitly installed in different places though.
-
@SGaist thanx for replying.,
i have tried to use another version of QT and tried to cross-compile from the source available as qtopensource.. from qt site.
But i was not able to cross compile may i dont know exact way how to croos-compile Qt from source.So i am left with the default QT version provided with petalinux.
if you have any idea about cross compiling or procedure please help me, i'll try to cross compile another version.
And how this Gstreamer backend can be built to run gst custome pipeline under Qmediaplayer.
-
The procedure doesn't change between two Qt versions.
What errors did you get ?
The backend code can be found in the qtmultimedia module.
-
J JoeCFD referenced this topic on