Ask Your Question

CvGetCaptureProperty returning -1 all the time

asked 2013-06-03 01:11:28 -0600

sachin_rt gravatar image

updated 2013-06-03 02:53:27 -0600

When I am trying to get the frame number and Milli sec time using CvGetCaptureProperty() I am getting -1 all the time ?? I have searched a lot on the net but haven't found any solutions . Please help if anybdy has got it solved Brief Code looks like this :

CvCapture* capture = cvCaptureFromCAM(0);

while(1) { IplImage* frame = cvQueryFrame(capture);

cout << (int) cvGetCaptureProperty(capture,CV_CAP_PROP_POS_MSEC);


if ( (cvWaitKey(10) & 255) == 27 ) break;


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-06-03 09:11:59 -0600

czerhtan gravatar image

It might be the normal behavior that a camera feed does not provide timestamps for each frame; seeing how you're the one querying the frames at your own rate/will, you are probably supposed to generate those on your own.

edit flag offensive delete link more

Question Tools


Asked: 2013-06-03 01:11:28 -0600

Seen: 745 times

Last updated: Jun 03 '13