It's dependant on the CPU load so it's not linear and can't be corrected manually like this. Sometimes the problem is not there, e.g. if the image size is small, the machine powerful and the capture frame rate low.
The issue is that the rate at which images are grabbed is estimated and used as frame rate for the final video.
However, when the recording starts, the CPU is more heavily used and images come less frequently to the program.
What is needed is to completely decouple the recording from the frame grabbing.
