frame rate using CAP_PROP_FPS is failed (C++).
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)
Asked: 2019-08-14 13:29:32 -0600
Seen: 124 times
Last updated: Aug 14 '19
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.
you simply cannot set the FPS from a video file. You can grab all the frames and make a new video with a new FPS, but your initial idea is just broken...