I am writing a RightScript to install OpenCV-2.3.1 on a linux server. I am using FFMPEG package: ffmpeg-0.7-rc1
I am doing exactly whatever I did while installing i
I don't need ffmpeg since I do only identify images, so use this option to skip combile Video module:
make -DWITH_FFMPEG=OFF xxxxxx
Using FFMPEG package ffmpeg-0.8 solves the issue. It works fine with OpenCV-2.3.1 There has been a number of recent fixes to FFMPEG that is giving rise to some clashes. ffmpeg-0.8 is stable and works fine.
You need to install the ffmpeg-dev package too, if your distro has one. If not, you might need to install libavcodec-dev, libavformat-dev and libswscale-dev too.
If you have them installed but OpenCV's build still can't find them, it is probably because pkg-config
cannot locate ffmpeg headers. This info is usually at /usr/lib/pkgconfig
, which means that you might have to add the proper path manually if your's are in a different path. For instance, if ffmpeg files for pkg-config
are located at /usr/local/lib/pkgconfig
, before running CMake again you should execute:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig