FPS issue while video recording using OpenCV

Hi, I am trying to record one second 640 x 360 resolution video at 260 fps (my camera supports this as per documentation). But, when I define the time as exactly one second, then the frame rate is below 80. or, if I define the fps as exactly 260, then the actual time is longer than one second. How can I ensure the accurate time and fps?

Also, I tried to record a video for 30 seconds placing a stopwatch in front of the camera. The output video is about 13 seconds, although the stopwatch is showing almost 30 seconds time difference. And, the total frame count is 260x13.

How can I define time and fps properly as a x second of video will record exact x second and will return x*260 frames.

I am new to OpenCV and appreciate your feedback. Thanks in advance.

python opencv video