0

I have a video stored on my computer. I am doing some processing on this video. When I query the frame rate like this:

     frameRate=cap.get(5)

it gives me 25, which is the frame rate of the original stored video, not the rate at which the frames are being read by the opencv program. How do I get that? Also, how do I decrease that frame rate, ie. the rate at which the program is getting frames from the pre-recorded video, without having to re-record the original video at the decreased frame-rate?

GradStudent
  • 166
  • 1
  • 3
  • 12
  • 1
    Frame-rate of the stored file and frame-rate of the program reading it are indepenent. Calculate the elapsed time between frame captures. Then `1 / elapsedTime` is your frame rate. – Aurelius Jun 10 '14 at 18:19
  • How do I calculate the elapsed time between frame captures? – GradStudent Jun 10 '14 at 18:27
  • 1
    The [`time`](https://docs.python.org/2/library/time.html#time.time) module is your friend. Just note that, as with all timing solutions, it may not have the precision you desire. – Aurelius Jun 10 '14 at 18:29

0 Answers0