Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QMediaPlayer setPosition() weird behaviour



  • Hello,

    I am using QMediaPlayer to display a video and I have a step forward button that is supposed to move the video one frame forward.
    Here is the step forward function:

    def next_frame(self):
               self.progress_slider.setSliderPosition(self.progress_slider.value() + self.frame_increment_interval)
               self.player.setPosition(self.player.position() + self.frame_increment_interval)
               return
    

    but when I click the button it shows a previous frame first (like 100 frames in the past) before it moves to the next frame.
    Any idea why this behaviour exists?

    Thanks!


  • Lifetime Qt Champion

    Hi,

    Please do not post the same question on multiple sub-forum.

    One is enough

    Duplicate


Log in to reply