The following are the steps that I follow to record a video file in openCV:
CvVideoWriter *writer =cvCreateVideoWriter(fileName, Codec ID, frameRate, frameSize); // Create Video Writer cvWriteFrame(writer, frame); // Write frame cvReleaseVideoWriter(&writer); // Release video writer
The above code snippet is recorded at a fixed frame rate. I need to record a video with a variable frame rate. The approach I used earlier with libx264 included writing separate timestamps to each frame.
So the question is how to write timestamps for a frame in openCV - what is a specific API? More generally, how do I create a video with a variable frame rate?
source share