Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Gstreamer pipeline slows when run in Qt Quick application.
Qt 6.11 is out! See what's new in the release blog

Gstreamer pipeline slows when run in Qt Quick application.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 776 Views 1 Watching
  • 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.
  • A Offline
    A Offline
    ABest2
    wrote on last edited by
    #1

    I am using a gstreamer pipeline to provide the output from a MIPI camera to a Qt Quick application for display. The processor is an i.MX8M Plus running a Yocto distribution. The Qt version is 5.15.3.
    I can launch the pipeline as follows at the command line:

    gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! waylandsink

    The video runs correctly for as long as I have run it (many minutes).

    I have tried multiple methods to display the pipeline in the application such as:

    MediaPlayer {
    id: mediaplayer
    source: "gst-pipeline: v4l2src name=videosrc device=/dev/video0 ! queue ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! qtvideosink"
    autoPlay: true
    }

    VideoOutput {
    id: videooutput
    anchors.left: parent.left
    anchors.top: parent.top
    source: mediaplayer
    }

    Or using GstAppSink to pull the frames out and display them using a QAbstractVideoSurface.

    In all cases, the pipeline slows down significantly within one minute. Any suggestions on how best to debug this issue will be appreciated.

    A 1 Reply Last reply
    0
    • A ABest2

      I am using a gstreamer pipeline to provide the output from a MIPI camera to a Qt Quick application for display. The processor is an i.MX8M Plus running a Yocto distribution. The Qt version is 5.15.3.
      I can launch the pipeline as follows at the command line:

      gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! waylandsink

      The video runs correctly for as long as I have run it (many minutes).

      I have tried multiple methods to display the pipeline in the application such as:

      MediaPlayer {
      id: mediaplayer
      source: "gst-pipeline: v4l2src name=videosrc device=/dev/video0 ! queue ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! qtvideosink"
      autoPlay: true
      }

      VideoOutput {
      id: videooutput
      anchors.left: parent.left
      anchors.top: parent.top
      source: mediaplayer
      }

      Or using GstAppSink to pull the frames out and display them using a QAbstractVideoSurface.

      In all cases, the pipeline slows down significantly within one minute. Any suggestions on how best to debug this issue will be appreciated.

      A Offline
      A Offline
      ABest2
      wrote on last edited by
      #2

      @ABest2

      I have looked at timing and the problem does not appear to be related to Gstreamer. The appsink callback continues to be called at a constant rate even after the display update rate has fallen. The signals and slots which bring the QVideoFrame to the QAbstractVideoSurface also continue to run at a constant rate. So, something is slowing downstream of presenting the frame to the QAbstractVideoSurface. Any thoughts?

      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