I have a simple video recorder recording video from my webcam feed.
theVideoWriter.open(filename+countAsString+ext,CV_FOURCC('X','V','I','D'), 30, Size(1920,1080), true);
while(recording){
hasStarted=true;
webcamRecorder.read(matRecorder); // read a new frame from video
theVideoWriter.write(matRecorder); //writer the frame into the file
}
}
hasStarted=false;
cout << "finished recording" << endl;
theVideoWriter.release();
my problem is that when I play back my recorded video the video is always speed up and never matches the actual time it was recording. I know that the recording FPS has to match the webcams FPS. webcamRecorder.get(CV_CAP_PROP_FPS) returns 0 so I manually recorded a video file with the Logitech software and got a video file with 30fps. Thats why I set theVideoWriter too 30fps. But the recorded videos are still speed up