Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. [GStreamer, QtQuick] "A lot of buffers" error and streaming problems
Forum Updated to NodeBB v4.3 + New Features

[GStreamer, QtQuick] "A lot of buffers" error and streaming problems

Scheduled Pinned Locked Moved Solved Qt 6
11 Posts 3 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    0x5FB5
    wrote on last edited by
    #1

    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 problem

    code:

    ...
        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?

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      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?

      0 1 Reply Last reply
      0
      • Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #3

        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 of gst-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

        Software Engineer
        The Qt Company, Oslo

        JoeCFDJ 1 Reply Last reply
        0
        • Axel SpoerlA Axel Spoerl

          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 of gst-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

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @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.

          0 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            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?

            0 Offline
            0 Offline
            0x5FB5
            wrote on last edited by
            #5

            @JoeCFD OS: Linux Mint

            1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @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.

              0 Offline
              0 Offline
              0x5FB5
              wrote on last edited by
              #6

              @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

              Axel SpoerlA 1 Reply Last reply
              0
              • 0 0x5FB5

                @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

                Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #7

                @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 description

                What 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.

                Software Engineer
                The Qt Company, Oslo

                0 1 Reply Last reply
                0
                • Axel SpoerlA Axel Spoerl

                  @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 description

                  What 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.

                  0 Offline
                  0 Offline
                  0x5FB5
                  wrote on last edited by
                  #8

                  @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 ...
                  
                  
                  1 Reply Last reply
                  0
                  • Axel SpoerlA Offline
                    Axel SpoerlA Offline
                    Axel Spoerl
                    Moderators
                    wrote on last edited by
                    #9

                    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.

                    Software Engineer
                    The Qt Company, Oslo

                    0 1 Reply Last reply
                    0
                    • Axel SpoerlA Axel Spoerl

                      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.

                      0 Offline
                      0 Offline
                      0x5FB5
                      wrote on last edited by
                      #10

                      @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

                      1 Reply Last reply
                      0
                      • 0 Offline
                        0 Offline
                        0x5FB5
                        wrote on last edited by 0x5FB5
                        #11

                        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

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved