I'm trying to loop a video on the background of my Pyside6 application, currently implementing it through QML.
Everything works fine so far, but I've noticed the media player clears the screen for a moment before actually repeating the video.
I've seen it was possible to workaround this issue by using a property called "flushMode" in the old Qt5 QtMultimedia, but said property seems to have disappeared in Qt6 (or maybe it's just not implemented yet, I don't know).
I was wondering if there is any other way to make a seamless smooth video loop in QtMultimedia 6.2 (using QML, since my app is running on Python).
This is what I have so far (the media player is separated from the main app because of reasons):
import QtQuick
import QtMultimedia
Rectangle {
id: playVid2
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.rightMargin: 0
anchors.leftMargin: 0
anchors.bottomMargin: 0
anchors.topMargin: 0
MediaPlayer {
id: mpVid2
audioOutput: AudioOutput{}
videoOutput: voVid2
source: "media/video/2.mp4"
loops: MediaPlayer.Infinite
}
VideoOutput {
id: voVid2
anchors.fill: parent
fillMode: VideoOutput.PreserveAspectCrop
}
Component.onCompleted: mpVid2.play()
}