This is a code snippet from O'Reilly Learning Opencv,
cvNamedWindow("Example3", CV_WINDOW_AUTOSIZE);
g_capture = cvCreateFileCapture(argv[1]);
int frames = (int) cvGetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_COUNT);
if (frames != 0) {
cvCreateTrackbar("Position", "Example3", &g_slider_postion, frames, onTrackbarSlide);
}
But unfortunately, cvGetCaptureProperty always return 0. I have searched opencv group in Yahoo, found the same problem.