video frame count seems wrong

asked 2018-09-17 08:46:14 -0600

pagi gravatar image

updated 2018-09-17 09:11:08 -0600

berak gravatar image

in opencv cpp by using cap.get(CV_CAP_PROP_FRAME_COUNT); i get the count 34 which is too small because my camera fps is 30 and i am recording video for 10 second so expected frame count is nearly equal to 300

VideoCapture video("Video.mp4");
int video_length;

video_length = video.get(CV_CAP_PROP_FRAME_COUNT); 
cout<< "FRAME COUNT = "<< video_length <<endl;
edit retag flag offensive close merge delete

Comments

if YOU recorded that video, then we need to see that code, too !

(also, your camera's fps is irrelevant here. important are the fps of the VideoWriter, and how long it took to process a frame and write it. only then can we evaluate your numbers)

berak gravatar imageberak ( 2018-09-17 09:09:19 -0600 )edit