[GStreamer, QtQuick] "A lot of buffers" error and streaming problems
-
In Qt6 on receiving video via MediaPlayer I have dramatically large framerate drops with a warnings in a console like:
qt.multimedia.player: Warning: A lot of buffers are being dropped
when I send video test and video from camera locally on my PC and other stuff.
GStreamer was updated to 1.16 on my PC and other devices.
In Qt5 I didn't saw this problemcode:
... MediaPlayer { id: player source: "udp://192.168.0.152:10001" videoOutput: video } VideoOutput { id: video anchors.fill: parent fillMode: VideoOutput.PreserveAspectCrop } Component.onCompleted: { player.play() }
How it can be solved?
-
Hi,
this Warning is coming directly from GStreamer, the Qt multimedia player just brings it to surface.
Have you tried launching your output directly with GStreamer along the lines ofgst-launch udpsrc uri=udp://192.168.0.152:10001
?
Maybe that sheds more light on what is the problem with the source and/or your local GST configuration.
It's fishing in the mud, but typically buffer drops are a latency issue: The sink's processing speed is slower than the incoming stream. When the buffered frame's age exceeds the maximum latency, it's being dropped.
Here is an old post dealing with this warning on the GStreamer mailing list.
Brgds
Axel -
Hi,
this Warning is coming directly from GStreamer, the Qt multimedia player just brings it to surface.
Have you tried launching your output directly with GStreamer along the lines ofgst-launch udpsrc uri=udp://192.168.0.152:10001
?
Maybe that sheds more light on what is the problem with the source and/or your local GST configuration.
It's fishing in the mud, but typically buffer drops are a latency issue: The sink's processing speed is slower than the incoming stream. When the buffered frame's age exceeds the maximum latency, it's being dropped.
Here is an old post dealing with this warning on the GStreamer mailing list.
Brgds
Axel@Axel-Spoerl He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue. -
From what I was told by a gstreamer guy, it is better to use gstreamer above 1.20. Also Multimedia module is rewritten in Qt6 and can have a lot of issues. Just curious: are you trying it on Linux or Windows?
-
@Axel-Spoerl He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue.@JoeCFD said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue.Previously, I've change the code to get stream after answer to my last question. Now I only wrote url instead of full
gst-pipeline
description -
@JoeCFD said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue.Previously, I've change the code to get stream after answer to my last question. Now I only wrote url instead of full
gst-pipeline
description@0x5FB5 said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
@JoeCFD said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue.Previously, I've change the code to get stream after answer to my last question. Now I only wrote url instead of full
gst-pipeline
descriptionWhat happens when you play the source directly with GStreamer from the command line, without Qt?
That's what will tell where the problem is: The source itself, local GStreamer environment, Qt. -
@0x5FB5 said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
@JoeCFD said in [GStreamer, QtQuick] "A lot of buffers" error and streaming problems:
He wrote: In Qt5 I didn't saw this problem.
I believe he is running the same code. Therefore, it could be a Qt6 issue.Previously, I've change the code to get stream after answer to my last question. Now I only wrote url instead of full
gst-pipeline
descriptionWhat happens when you play the source directly with GStreamer from the command line, without Qt?
That's what will tell where the problem is: The source itself, local GStreamer environment, Qt.@Axel-Spoerl
I'm not sure that commands are correct, but...
For test I send video like:
gst-launch-1.0 videotestsrc ! "video/x-raw,width=640,height=480" ! x264enc ! mpegtsmux name=mux ! udpsink host=192.168.0.152 port=10001
Get video by:gst-launch-1.0 udpsrc uri=udp://192.168.0.152:10001 caps='application/x-rtp, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! avdec_h264 ! autovideosink
Log is:
Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not get/set settings from/on resource. Additional debug info: gstudpsrc.c(1584): gst_udpsrc_open (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: bind failed: Error binding to address: Cannot assign requested address Setting pipeline to NULL ... Freeing pipeline ...
-
Well, I am afraid that is a GStreamer rather than a Qt issue.
If you can't make it work on the command line, Qt will just fail as well. -
Well, I am afraid that is a GStreamer rather than a Qt issue.
If you can't make it work on the command line, Qt will just fail as well.@Axel-Spoerl I found a problem. Streaming works without rtp.
I've edit pipeline based on testvideosrc's pipeline:
videorate ! video/x-raw,framerate=30/1 ! videoconvert ! x264enc ! mpegtsmux name=mux ! udpsink host=192.168.0.152 port=10001
instead of:
videorate ! video/x-raw,framerate=30/1 ! \nvideoconvert ! x264enc speed-preset=ultrafast tune=zerolatency byte-stream=true threads=1 key-int-max=15 intra-refresh=true ! video/x-h264, profile=baseline ! rtph264pay ! udpsink host=192.168.0.152 port=10001
But I have a very long video delay and the video crumbles into pixels -
It works normally works with this pipeline without RTP:
videorate ! video/x-raw,framerate=30/1 ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency byte-stream=true threads=1 key-int-max=15 intra-refresh=true ! udpsink host=192.168.0.152 port=10001