I am reading a .mp4
video file using opencv-python (3.4.3.18) and python (3.6.6)
vid = cv2.VideoCapture(video_path)
The original video has around 59 FPS and I want to reduce it to 10 FPS. So, I set the cv2.CAP_PROP_FPS
property using the following,
flag = vid.set(cv2.CAP_PROP_FPS, 10)
(Ref: https://docs.opencv.org/3.4.3/d8/dfe/classcv_1_1VideoCapture.html#a8c6d8c2d37505b5ca61ffd4bb54e9a7c)
However, when I print the flag
value it gives False
. Which means the property is not supported by backend used by the VideoCapture
instance. Hence, when I'm reading the frame using,
return_value, frame = vid.read()
it returns all the 59 frames making the post processing steps more time consuming. How to solve this issue?