Important: Please read the Qt Code of Conduct -

Accurately timing image updates (video playback)

  • I'm using FFmpeg to read frames from a video, doing some processing, and then showing the video on a form.

    Let's say I have a 59.97 fps video. I'd need to update the image on the form every 16.68 ms to have a correct looking output.

    At the moment I'm just using QTimer, which isn't very accurate and only allows integers for the timeout. And I'm using a label with setPixmap to display the video frames :)

    1. Can I time the playback more accurately somehow?
    2. What is the best way to display fast changing image data on a form?

  • Moderators

    Hi, and welcome to the Qt Dev Net!

    What is your main goal?

    To experiment with FFmpeg? Or,

    To apply effects to your video?

    If it's 2, I recommend using high-level video manipulation functions like "QML shader effects": instead of low-level FFmpeg code. Here's a demo:

Log in to reply