Ask Your Question
0

Capture properties are all zero

asked 2013-02-05 09:17:32 -0600

Bart Vandewoestyne gravatar image

I have a small test program where I get capture properties using calls like cvGetCaptureProperty( capture, CV_CAP_PROP_FRAME_COUNT ). When I compile and link this program with the OpenCV (2.3.1) and ffmpeg library that is by default installed via the package management system on my Ubuntu 12.10 box, the properties return the correct non-zero values. However, when I try to compile and link against a manually installed OpenCV (2.4.1) library, all properties return zero. According to the OpenCV documentation of cvGetCaptureProperty, values of 0 will also be returned "When querying a property that is not supported by the backend used by the VideoCapture class".

My problem is now that I don't have a clue how to diagnose this problem any further. How can I check if the zeros are due to a bad backend??? Where should I look? Can I run certain commands or watch certain logfiles to check this???

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-06 11:48:58 -0600

It looks like you build OpenCV without ffmpeg support. You need to install libavformat-dev, libavcodec-dev, libavfilter-dev, libswscale-dev packages, add -DWITH_FFMPEG=ON option to cmake command and check OpenCV CMake output. It must determine versions of ffmpeg modules correctly.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-05 09:17:32 -0600

Seen: 174 times

Last updated: Feb 06 '13