QML MediaPlayer. Custom source for gst-pipeline
-
wrote on 2 Jul 2021, 23:34 last edited by
Hello!
I'm using that component to play live-stream from some specific camera. At current time i use next source:MediaPlayer { source: "gst-pipeline: udpsrc port=5000 ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink" autoPlay: true }
That works OK but in real life need to play from some c++ class which receives stream.
How can i implement that? May be, I need to make custom gst source?
Thanks))) -
Hi,
What you are asking is not clear.
Do you want to use a custom pipeline in C++ ?
-
wrote on 21 Aug 2021, 14:07 last edited by Ms.J
@SGaist
Hi,
I want to receive udp live stream in qml application (ubuntu and android). Is it possible? like in vlc (udp://@:7777)
i receive rtsp with MediaPlayer item correctly, but with udp i get error as below:
Error: " udpsrc port=7777 ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink" : "no element "udpsrc""
with this code:
MediaPlayer {
id: player
source: "gst-pipeline: udpsrc port=7777 ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink"
autoPlay: true
}
Any advice is greatly appreciated. Thank you so much! -
@SGaist
Hi,
I want to receive udp live stream in qml application (ubuntu and android). Is it possible? like in vlc (udp://@:7777)
i receive rtsp with MediaPlayer item correctly, but with udp i get error as below:
Error: " udpsrc port=7777 ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink" : "no element "udpsrc""
with this code:
MediaPlayer {
id: player
source: "gst-pipeline: udpsrc port=7777 ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink"
autoPlay: true
}
Any advice is greatly appreciated. Thank you so much!@Ms-J hi and welcome to devnet,
Do you have the required GStreamer plugin package installed ?
-
@Ms-J hi and welcome to devnet,
Do you have the required GStreamer plugin package installed ?
wrote on 22 Aug 2021, 11:37 last edited by Ms.J@SGaist hi and thanks to reply.
I checked and installed gstreamer on ubuntu. i don't know how to install gstreamer on android?
now on ubuntu i receive udp stream but screen is green and corrupted! maybe it's for bad pipelines.
sometimes i receive Warning: "Pipeline construction is invalid, please add queues."
Has any way to receive udp real time stream with high quality?
Is QtGStreamer necessary to import? or we can get good quality with MediaPlayer item?
thanks. -
On android you will have to build it yourself. There are instructions on the GStreamer site for that if memory serves well.
QtGStreamer bindings have been deprecated and unmaintained since a long time. They have replaced them with the qmlgl plugin.
As for your pipeline issue, the message is giving suggestions on how to fix it.
-
On android you will have to build it yourself. There are instructions on the GStreamer site for that if memory serves well.
QtGStreamer bindings have been deprecated and unmaintained since a long time. They have replaced them with the qmlgl plugin.
As for your pipeline issue, the message is giving suggestions on how to fix it.
-
That message:
@Ms-J said in QML MediaPlayer. Custom source for gst-pipeline:
Warning: "Pipeline construction is invalid, please add queues."
Does your pipeline work properly on the command line ?
-
That message:
@Ms-J said in QML MediaPlayer. Custom source for gst-pipeline:
Warning: "Pipeline construction is invalid, please add queues."
Does your pipeline work properly on the command line ?
wrote on 25 Aug 2021, 11:48 last edited by@SGaist I got the same corrupted video from command line :(
this is my command "gst-pipeline: udpsrc port=5000 ! h264parse ! avdec_h264 ! videoconvert ! autovideosink" for receive camera streamer. i searched and nothing helpfull found for that.
command line message:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
any suggestion to improve pipelines for better preview?
thank you in advance. -
Add debugging to your pipeline, it may give you some more information about what is going on.
-
Add debugging to your pipeline, it may give you some more information about what is going on.
-
You can check the QtAV project.
-
On android you will have to build it yourself. There are instructions on the GStreamer site for that if memory serves well.
QtGStreamer bindings have been deprecated and unmaintained since a long time. They have replaced them with the qmlgl plugin.
As for your pipeline issue, the message is giving suggestions on how to fix it.
wrote on 6 Sept 2021, 05:36 last edited by@SGaist for android i could find gstreamer binary file for that ( https://gstreamer.freedesktop.org/download/ ) but i dont know how to add that libraries (libraries path) to project (in cmakelist or ?).
thank you so much. -
Did you already check the android platform notes for GStreamer ?
-
Did you already check the android platform notes for GStreamer ?
wrote on 7 Sept 2021, 07:57 last edited by Ms.J 9 Jul 2021, 13:10@SGaist yes i checked it.
i installed gstreamer-1.0 in my ubuntu and download video/android/gstreamer example.
when i want to build it for android (on ubuntu) i get following errors: :((Project ERROR: Unknown module(s) in QT: multimediagsttools-private
[Inexact] Project ERROR: Library 'libresourceqt5' is not defined.
main.cpp:82:5: error: use of undeclared identifier 'QGstUtils'
main.cpp:54:10: error: 'private/qgstutils_p.h' file not found.same problem: https://forum.qt.io/topic/122140/unknown-module-s-in-qt-multimediagsttools-private
Any advice is greatly appreciated.
-
wrote on 7 Sept 2021, 13:17 last edited by Ms.J 9 Jul 2021, 13:17
for having gstreamer on android device, is it necessary to build Qt on ubuntu (for some config) or build gstreamer for android (how?)?
"gst-pipeline: videotestsrc ! autovideosink" worked on ubuntu.thanks for your help.
-
As the platform notes says, to use the GStreamer backend on Androïd, you have to build the module yourself.
-
As the platform notes says, to use the GStreamer backend on Androïd, you have to build the module yourself.
-
At least the Qt multimedia module. You can already find pre-built versions of GStreamer for Androïd AFAIR.
I haven't built QtMultimedia to enable GStreamer for Androïd, but the basic are usually the same, use qmake, make, make install.
I would recommend backing up your current installation if something goes wrong.
And use out of source builds so you can experiment more easily.
-
@Ms-J hi and welcome to devnet,
Do you have the required GStreamer plugin package installed ?
wrote on 27 Mar 2023, 12:57 last edited by@SGaist Hello, could you refer me to this Gstreamer plugin package?
I'm trying the following qml:
MediaPlayer{ id: playVideo source: "gst-pipeline: videotestsrc ! autovideosink" videoOutput: videoOutput } VideoOutput{ id: videoOutput anchors.fill: parent }
But as soon as the component is loaded I get this message:
qt.multimedia.player: Unable to set the pipeline to the paused state.And I cannot visualize the pipeline. I tried using a generic video as source in the MediaPlayer component instead of a pipeline and it works.