Nominate our 2022 Qt Champions!

How to catch frame in QT Multimedia application using QVideoFrame?

  • Hi,

    I developed application on Qt which can play video from local file location using QVideoWidget, QMediaPlayer, etc. Now I want to catch frame and show video on an application using QVideoFrame. Please help to sort out this problem, give some basic example for how to use QVideoFrame to catch frame and show video?


  • Lifetime Qt Champion


    Do you mean QVideoProbe ?

  • @SGaist : I have no idea about QVideoProbe but using QVideoFrame we can show frame on player... so I want to one example which one use QVideoFrame.

  • Lifetime Qt Champion

    Maybe you should check the link SGaist provided you?
    It even has an example with a QVideoFrame in it:

    QMediaPlayer *player = new QMediaPlayer();
    QVideoProbe *probe = new QVideoProbe;
    connect(probe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(processFrame(QVideoFrame)));
    probe->setSource(player); // Returns true, hopefully.
    player->play(); // Start receiving frames as they get presented to myVideoSurface

Log in to reply