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. Adjust the latency of QML MediaPlayer (Qt6)
Forum Update on Monday, May 27th 2025

Adjust the latency of QML MediaPlayer (Qt6)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 354 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.
  • R Offline
    R Offline
    rklemm
    wrote on last edited by
    #1

    I'm trying to connect to an RTSP camera stream from QML using the MediaPlayer object. Using the code below, I can connect and stream, but there is significant latency (2-3 seconds). Sometimes, the stream starts with a very low latency, and I would like to make that behavior consistent. I have a wired connection to the camera module, so physical limitations on the latency should not be a problem.

    import QtQuick
    import QtMultimedia
    
    Window {
      width: 1920
      height: 1080
    
      MediaPlayer {
        id: player
        source: "rtsp://xxxx"
        videoOutput: videoOut
      }
    
      VideoOutput {
        id: videoOut
        anchors.fill: parent
      }
    
      Component.onCompleted: player.play()
    }
    

    I haven't found any resources that show how to adjust the latency of the MediaPlayer. If I manually connect to the rtsp stream using gstreamer, I can achieve a clean low-latency stream, so I know that it is possible.

    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