Ask Your Question

Revision history [back]

I think you need to better explain what you want. You set the frame rate of the video you record. Try something like the following to record a video at fps:

fourcc = cv2.VideoWriter_fourcc(*'MJPG')                                    
video_out = cv2.VideoWriter('output.avi', fourcc, fps, img_size)

If you need to display at a frame rate that terminates when the original video would have (but at reduced fps), then keep track of the time and given the original frame rate, just drop frames as necessary.