简体   繁体   中英

Why the speed of the video depends on the number of FPS in OpenCV

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?

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

在此处输入图像描述

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.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM