cap_ffmpeg.o error 安装opencv 2.3.1

在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
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值