[Interest] Faster way of rendering QOpenGLFramebufferObject to image

Nuno Santos nuno.santos at imaginando.pt
Tue Jul 13 11:21:41 CEST 2021


Hi,

I’m trying to capture the content of an FBO to a video file. This video file should contain the animations generated by a qml scene.

To do this, I’m recurring to QOpenGLFramebufferObject class toImage() method.

My scene is being drawn at 1920x1080. Each call to toImage takes 30 ms! :(

If I want to render to file at 60 fps, ideally, this call would need to take less than 16 ms to give me room to do other operations, such as video encoding and the actual render.

As anyone been here before? What other strategies are available to copy the FBO data to an image? 

I’m using libav to encode the video file, therefor I need to fill an AVFrame. Right now I’m filling the AVFrame from the QImage generated by the FBO toImage method. 

Does any one knows a method of filling an AVFrame directly from texture data?

Thanks

Best regards,

Nuno


More information about the Interest mailing list