cap_ffmpeg.o error 安装opencv 2.3.1

来源:互联网 发布:代购记录软件 编辑:程序博客网 时间:2024/04/29 10:26

在make时会出现cap_ffmpeg.o error

具体如下

In file included from /smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1029:10: error: use of enum ‘CodecID’ without previous declaration
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1029:52: error: invalid type in declaration before ‘;’ token
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1081:46: error: ‘CodecID’ has not been declared
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, int, int, int, int, double, int)’:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1114:23: error: invalid conversion from ‘int’ to ‘AVCodecID’ [-fpermissive]
In file included from /smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvVideoWriter_FFMPEG::open(const char*, int, double, int, int, bool)’:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1480:5: error: ‘CodecID’ was not declared in this scope
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1480:13: error: expected ‘;’ before ‘codec_id’
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1525:10: error: ‘codec_id’ was not declared in this scope
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1545:13: error: ‘codec_id’ was not declared in this scope
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1574:48: error: ‘codec_id’ was not declared in this scope
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp: At global scope:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1791:58: error: ‘CodecID’ has not been declared
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1838:73: error: ‘CodecID’ has not been declared
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp: In static member function ‘static AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, int, int, int, int, double, AVPixelFormat)’:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1854:19: error: invalid conversion from ‘int’ to ‘AVCodecID’ [-fpermissive]
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool OutputMediaStream_FFMPEG::open(const char*, int, int, double)’:
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1958:5: error: ‘CodecID’ was not declared in this scope
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1958:13: error: expected ‘;’ before ‘codec_id’
/smartbuild/work/opencv.git/modules/highgui/src/cap_ffmpeg_impl.hpp:1980:37: error: ‘codec_id’ was not declared in this scope
make2* [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make2: Leaving directory `/smartbuild/work/opencv.git/release'
make1
[modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2

显然是由ffmpeg没有安装好或者版本不对。 我们用ffmpeg0.1(OpenCV2.3.1之前的版本需要使用ffmpeg 0.7.x.)ffmpeg-0.10

0 0
原创粉丝点击