frame rate using CAP_PROP_FPS is failed (C++).

asked 2019-08-14 13:29:32 -0500

I am opening an .avi video file and trying to set the fps to 40.0, but it is not changing.

video.set(CAP_PROP_FPS, 42.0)

edit retag flag offensive close merge delete


I thought it worked only when grabbing from a camera (provided the camera supports it). When grabbing from a file, it is your responsibility to wait some time before retrieving (and displaying) the next frame. If you don't add any wait instructions your program will read and display the video as fast as the storage can provide it.

Witek gravatar imageWitek ( 2019-08-15 11:37:05 -0500 )edit