0

I have a code which capture screen and make a video from the screenshots using OpenCV. So if I change fps to 60 in my videoWriter object(video lasts 10 seconds or more) will play for 1 second. As I understood, higher FPS makes video faster and lower FPS makes it's slower. Could you explain for me why it works that way?

3
  • 1
    FPS = Frames per second. That says everything. Commented Apr 9, 2021 at 14:14
  • I know that, but the main problem is that when I set FPS to 60 it's much faster than the same video with FPS = 30. I don't understand why it gets faster? Could you explain please? Commented Apr 9, 2021 at 14:44
  • 1
    Because the number of frames that are contained in the video is fixed. If you change the FPS you will change the number of frames that are shown in a single second. Therefore, you will speed up the video. Commented Apr 9, 2021 at 14:50

1 Answer 1

3

Imagine you record a video for 4 seconds with 2 FPS. You'll record 8 frames in total:

enter image description here

Now suppose you double the frame rate to 4 FPS. This tells your video player to show 4 frames every second, so those 8 frames are now shown to the viewer in 2 seconds - a speed up of the video.

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for the answer! I understand what you mean, but problem is that when I record 10 seconds in 30 FPS, after that when I play it there is no 30FPS because it's too fast. So my 10 seconds video recorded with 30 FPS is played for 5 seconds but if I record around 14 FPS it's similar to 30 FPS by the speed. Or maybe I don't understand something, thanks in advance!
It could be helpful if you edit your question and share a sample video file, maybe one recorded in 14 FPS and one with 30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.