mediaplayer automatically skips ahead by a few seconds
Unsolved
QML and Qt Quick
-
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" } } } }