openCV3+Python3 reducing the FPS of input video file before processing
Hi.. I need to process some raw video files (mp4) on Raspberry Pi. I use cv2.VideoCapture and read functions to process the video frame by frame. The raw files have FPS of 30 which is too high for Raspberry Pi, and as a result when I process and display the video the result is much slower and a 30sec raw video will be now ~90 sec long. In my application I do not need high FPS, but it is very important that the length of the video remains the same. Could you please let me know how can I reduce FPS of raw video in my code before I loop over the frames? Also, is trial and error the only way to find the highest FPS at which Raspberri Pi will be able to process the video and display it in original video length? Thanks.
This sounds like a camera frame rate control question to me, rather than an opencv question - OpenCV doesn't tend to provide camera feature control APIs. Often, an executable or library is available to change the camera settings (for example, picamera).
Thanks for your message. But I do not have any control on the raw videos, as they have already been recorded by cell phone and I am using them for processing. I need to find a specific approach to process these videos without changing the raw video files manually.
Ah, perhaps skipping frames as in the answer would work better.