Possible error in OpenCV2.4 for capturing frames from video

Could there be an error in OpenCV2.4 highgui for capturing frames from video in Windows?

I installed both pre-compiled libraries and those compiled by me, I can completely compile everything, and I can run my programs if

they are based on images. The problem is only in the video . OpenCV always fires in this function:

 virtual IplImage* retrieveFrame(int)
    {
        unsigned char* data = 0;
        int step=0, width=0, height=0, cn=0;

        if(!ffmpegCapture ||
           !icvRetrieveFrame_FFMPEG_p(ffmpegCapture,&data,&step,&width,&height,&cn)) <-------CRASHES HERE
           return 0;
        cvInitImageHeader(&frame, cvSize(width, height), 8, cn);
        cvSetData(&frame, data, step);
        return &frame;
    }

This is inside the cap_ffmpeg.cpp class and called by VideoCapture .

I tried versions 2.4.2 and 2.4.9. My programs worked with opencv2


Additional Information

  • Windows 7

  • Create projects using cmake (important because smake does not create / cannot find the right codecs)

  • VisualStudio 9 2008

  • OpenCV 2.4.2

, , , avi ?

+5
3

, OpenCV ffmpeg. VirtualDub microsoft video 1, msvidc32.dll.

, , OpenCV .

enter image description here

+5

. VirtualDub, AVI- - FMP4. , , , , ffdshow, . . : http://www.moviecodec.com/video-codecs/fmp4-codec-with-virtualdub-45814/

VirtualDub, !

+1

if you are using x64. Use opencv_ffmpeg245_64.dll, this solves the problem. Or rename opencv_ffmpeg245_64.dll to opencv_ffmpeg245.dll can solve the problem.

+1
source

All Articles