1

I'm fighting with new version of OpenCV 2.4.7 for almost one week (prev. used 2.4.2). My motivation for the new setup is the fact that I run into problems using the Videowriter for uncompressed grayscale videos (http://answers.opencv.org/question/3603/videowriter-videocapture-and-uncompressed-avi/). In https://github.com/Itseez/opencv/pull/1516 "akarsakov" is recommending to build OpenCV without vfw support and open uncompressed video through ffmpeg. That's what I tried to do. I followed basically the instructions mentioned in this video: http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_install/windows_install.html

I had successfully build opencv with Qt 5.1.1 (http://answers.opencv.org/question/24184/how-to-compile-opencv-247-with-qt-and-ffmpeg/). But I'm not able to get the VideoWriter & VideoCapture work for me. So what I did:

  1. I downloaded the newest ffmpeg build from http://ffmpeg.zeranoe.com/builds/

  2. I generated the vs2010 project disabling VfW and enabling ffmpeg instead:

    Video I/O:
    
    Video for Windows:           NO
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      codec:                     YES (ver 55.18.102)
      format:                    YES (ver 55.12.100)
      util:                      YES (ver 52.38.100)
      swscale:                   YES (ver 2.3.100)
      gentoo-style:              YES
      OpenNI:                    NO
    OpenNI PrimeSensor Modules:  NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO
    
  3. I added the include directories and libs for ffmpeg to the highgui module.

I was not able to compile OpenCV without any errors but the behaviour what I see is not what I expect:

  1. Build OpenCV 2.4.7 without VfW -> VideoWriter.open () returns always false!
  2. Build OpenCV 2.4.7 with VfW -> VideoWriter.open () returns true for the time, calling a release() and an open() on the same object returns always a false.
  3. With or without ffmpeg -> An VideoCapture.open () gives a error message asking for libiconv-2dll!

Does some had the same problems and is able to point me to my mistake?

Thank you in advance. cheers

GregPhil
  • 475
  • 1
  • 8
  • 20
  • Not sure of your specifics, but this SO question solved my problem: http://stackoverflow.com/questions/11699298/opencv-2-4-videocapture-not-working-on-windows – Paul May 14 '15 at 18:26

1 Answers1

1

OpenCV 2.4.7 requires a more recent version of FFmpeg to work, but that doesn't seem to the issue since you have that covered.

The cause of your problem could be bug #2281: VideoCapture::read fails on uncompressed video.

As an intermediary solution, I suggest you to downgrade to OpenCV 2.4.5.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Thank you very much for you replay. I guess there is no other way out at this moment. It's quite annoying, cause due to this bug which was merged with pull request 1516 (https://github.com/Itseez/opencv/pull/1516) I did the update :-S. thank anyhow. cheers – GregPhil Nov 25 '13 at 09:30