OpenCV did not find the correct ffmpeg lib when the link /usr/local/lib/libavcodec.a in lib/libopencv_videoio.so.3.0.0 .
A libavcodec.so should be provided, but opencv will only find libavcodec.a . What for? There are some possibilities:
1) Old / New ffmpeg
In /usr/local/lib and /usr/local/bin the old ffmpeg with only static libs is installed. Installed a new ffmpeg with a common sheet and a custom installation path, but the system does not know this. You must follow http://code.opencv.org/issues/1077 .
2) No general ffmpeg
You must install ffmpeg with a shared lib, as other people have said.
3) the new ffmpeg does not "install" correctly
If the new ffmpeg is built from the source code and in the setup path, the path should be an absolute path. For example:
/configure --prefix="$HOME/lib/ffmpeg_build"
If a relative path is set, the relative path will be set to the ffmpeg settings file, and opencv will not find the required libraries according to the file. You might want to look into the CMakeCache file in the opencv source directory, it will write the libs paths in the building.
Yue guan
source share