It all started when I tried to run a program like this:
VideoCapture cap;
cap.open("GOPR3252.mp4");
if(!cap.isOpened())
{
return -1;
}
I couldn't open the video, even though I tried to manually add the codec CV_FOURCC('A', 'V', 'C', '1'). I read that this may be due to the link with ffmpeg. So I compiled and installed ffmpeg using this guide and this one.
Later, I uninstalled OpenCV, downloaded and compiled using CMake as:
cmake -D CMAKE_SHARED_LINKER_FLAGS=-Wl,-Bsymbolic -D WITH_FFMPEG=ON -D WITH_QT=ON -D BUILD_EXAMPLES=ON CMAKE_BUILD_TYPE=Release /route_to_software/opencv/
However, all the time I get this in the resume at the video section:
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- codec: NO
-- format: NO
-- util: NO
-- swscale: NO
-- resample: NO
-- gentoo-style: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
-- gPhoto2: NO
--
I have no problem making and installing OpenCV, but I still can't open that video.
Then, I tried to convert the video from mp4 to avi and got this error when reading the video file:
Unexpected list type. Expected: hdrl. Got: movi.
I am running out of ideas. Any clue what I am doing wrong?
I am using OpenSUSE 13.2
Thanks in advance,