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. mediaplayer automatically skips ahead by a few seconds

mediaplayer automatically skips ahead by a few seconds

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

    I'm using mediaplayer on linux to play mp4 videos and the mediaplayer uses GStreamer as backend by default. After starting the playback, it automatically skips ahead by a few seconds. This issue does not always occur, and the amount of time the video skips forward is not consistent. When using the command-line tool gst-launch-1.0 provided by GStreamer to execute the same pipeline, I do not encounter the issue of the video jumping forward. Is this problem caused by Qt?

    here is the pipeline:

    gst-launch-1.0 playbin3 uri=file:///path/to/video.mp4
    

    When using mediaplayer, the source is set to the same pipeline.
    Actually, I'm using qml Loader to dynamicly load the mediaplayer from another qml file which contains a mediaplayer component and the source of the mediaplayer is set with onLoaded function.

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 400
        Loader {
            id: playerLoader
            anchors.fill: parent
            source: "VideoPlayer.qml"
            onLoaded: {
                if (playerLoader.item) {
                    playerLoader.item.source = "gst-pipeline: playbin3 uri=file:///path/to/video.mp4"
                }
            }
        }
    }
    
    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