QML MediaPlayer and Gstreamer pipeline with rtspsrc
-
I use qt 5.15.2. The documentation states that since Qt 5.12.2, the url scheme gst-pipeline provides custom pipelines for the GStreamer backend. I am trying to apply this pipeline:
"gst-pipeline: rtspsrc location=rtsp://ip_address:port/something latency=100 protocols=tcp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink"
But it gives me error:
Error: "Resource not found."
"gst-pipeline: videotestsrc ! qtvideosink" works fine. What could be wrong? Or QT does not support rtspsrc?
And by the way, if I use this pipeline with gst-launch-1.0 all works fine. -
Hi and welcome to devnet,
Does that pipeline work properly on the command line ?
-
Yes. On the command line it works properly. I use this command:
gst-launch-1.0 rtspsrc location=rtsp://ip_address:port/something latency=100 protocols=tcp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink
And this works as expected.
By the way, my system is ubuntu 20.04 LTS. Could this be due to the fact that I installed QT using the online installer, and the Gstreamer was installed using the apt package manager? Maybe I need to install something else? -
To the best of my knowledge, it should be no problem.
Can you try to build and run your application with your distribution provided Qt ?
-
Just tried to build app with distribution provided Qt, have same error.
-
And if you run the pipeline with the autosink in place of qtvideosink ?
-
I already understand what the problem is. It was a stupid mistake on my part. It's all about quotes. The URL of my resource contains equal signs and therefore gave an error on the command line without quotes. So, along with quotes, I moved the pipeline to my application. But for some reason it refused to work with quotes. Without quotes, everything works as it should. Thank you for your attention.
-
Glad you found out and thanks for sharing !
Please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so that other forum members may know a solution has been found :-)