0

I'm working with OpenCV in C. I intend to run a video on a window (and image process the frames a little before displaying them with an algorithm I made). However the following line:

    CvCapture* capture = cvCreateFileCapture("eve.avi");        

Gives me the error:

OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported
array type) in cvGetMat, file /build/buildd/opencv-2.3.1/modules/core/src/array.cpp, 
line 2482 terminate called after throwing an instance of 'cv::Exception'
what():  /build/buildd/opencv-2.3.1/modules/core/src/array.cpp:2482: error: (-206) 
Unrecognized or unsupported array type in function cvGetMat

I have tried various .avi files i found lying around and all produce this. Using Ubuntu 12.10.

1 Answers1

0

Try installing the ffmpeg libraries:

sudo apt-get install libavformat-dev libswscale-dev

And if its still broken, try using a sample video that is known to work, (I'll try to find one in the meantime and edit this post when I do).

EDIT: try this one.

http://www.technical-recipes.com/2011/displaying-avi-video-using-opencv/

crazylpfan
  • 1,038
  • 7
  • 9
  • Done it all. Getting the ffmpeg has been done before so i get: `codelibavformat-dev is already the newest version. libswscale-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 297 not upgraded.` I also used the sample.avi and as i suspected nothing changed. – Victor Kessler Mar 09 '13 at 10:41