How to catch frame in QT Multimedia application using QVideoFrame?
Unsolved
General and Desktop
-
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?
Thanks
-
Hi,
Do you mean QVideoProbe ?
-
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->setVideoOutput(myVideoSurface); player->setMedia(QUrl::fromLocalFile("observation.mp4")); player->play(); // Start receiving frames as they get presented to myVideoSurface