Important: Please read the Qt Code of Conduct -

How to set the frame rate of camera preview in QT

  • I am using QAbstractVideoSurface for rendering the preview using QCamera class. I want to set the camera streaming frame rate as 30pfs. How I can set the frame rate?

    Any one give idea its very helpful.

  • I have the same problem. I want to access and manipulate the frames of a webcam by using QAbstractVideoSurface. I am currently only achieving a frame rate of 15-16 fps from the camera stream. I desire ~30 fps.

    Any suggestions? Is there a restriction in QT?

  • WORKAROUND: I did not manage to increase the frame rate by using the QCamera and QAbstractVideoSurface from QT. But I did manage to increase it by using the OpenCV library:

    Use VideoCapture to capture frames from a camera or a video. You will receive the frames in the OpenCV format Mat. To convert Mat to QImage also see:

    This solution works fine for me. I now achieve a framerate ~30Hz.

  • It turns out that there is a bug in Qt that makes actually setting the frame rate difficult. My colleague is submitting a patch that will fix this.

Log in to reply