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:
I downloaded the newest ffmpeg build from http://ffmpeg.zeranoe.com/builds/
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
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:
- Build OpenCV 2.4.7 without VfW -> VideoWriter.open () returns always false!
- 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.
- 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