Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get RGB frames from a video file in QAbstractVideoSurface
P.Petitprez last edited by
I work on a video loader using QMediaPlayer and a QAbstractVideoSurface thart allows me to get access to the video frames.
But there's something I don't understand. I absolutely need the buffers to be in RGB24 format, so I set in the "supportedPixelFormats" method only QVideoFrame::Format_RGB24 but the frames always come in QVideoFrame::Format_YUV420P.
Another problem is, I have not found any possibility to convert YUV frames to RGB using Qt functions, I guess I am forced to write the conversion myself.
Is there any proper way to directly get the frames in RGB, or are there any functions in Qt 5 that could make the conversion ?