How to forward/backward video frame by frame in QMediaplayer?
How to forward/bakcward video frame by frame in QMediaplayer?
Store all the frames bytearray in QHash,
QHash<int, QByteArray> m_imageHash,
Take two buttons like next, previous, Initially both buttons should point 0th index. Pressing next should get the next index bytearray and display it, Pressing previous should get the previous index bytearray and display it.
how do I get each frame? I have just local path of video. In which from I will get each frame. QImage or QVideoFrame?
First you need to split the video into frames.
Use vlc to get the frames from video.
refer the following sample code
m_fileData = file.readAll();
emit loadBuffer(fileCount, m_fileData);
Then convert bytearray to QImage,
But I am using QMediaPlayer of QT. Do you have any idea about it? How to divide frames of Video?
I used KMPlayer to get the frames from video.