Getting video frame in provided time Qt
问题 What I want to do is to get video frame at some time (for example at 20 sec). I know I could do something like this - rewind video and pause it: QMediaPlayer* player = new QMediaPlayer; ... player->play(); player->setPosition(20000); player->pause(); But is there some more elegant solution (this seems like a hack to me since I don't need whole video but only a frame at some time)? 回答1: Below steps may help you to capture a frame from a video file. Project level QT += multimedia Code level