Errors while installing OpenCV2.3.1 and FFMPEG Ubuntu

n file included from /OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg.cpp:45:
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void CvCapture_FFMPEG::close()':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:451: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1533)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:451: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1533)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool CvCapture_FFMPEG::reopen()':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:483: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1533)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:483: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1533)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:486: error: 'av_open_input_file' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:487: warning: 'int av_find_stream_info(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1357)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:487: warning: 'int av_find_stream_info(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1357)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:494: error: 'avcodec_thread_init' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:497: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:497: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool CvCapture_FFMPEG::open(const char*)':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:524: error: 'av_open_input_file' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:529: warning: 'int av_find_stream_info(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1357)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:529: warning: 'int av_find_stream_info(AVFormatContext*)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1357)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:541: error: 'avcodec_thread_init' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:550: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:550: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, CodecID, int, int, int, double, int)':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:999: warning: 'AVStream* av_new_stream(AVFormatContext*, int)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1557)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:999: warning: 'AVStream* av_new_stream(AVFormatContext*, int)' is deprecated (declared at /usr/local/include/libavformat/avformat.h:1557)
In file included from /OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg.cpp:45:
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1121: warning: 'int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4077)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1121: warning: 'int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4077)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void CvVideoWriter_FFMPEG::close()':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1298: error: 'url_fclose' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool CvVideoWriter_FFMPEG::open(const char*, int, double, int, int, bool)':
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1411: error: 'av_set_parameters' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1415: error: 'dump_format' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1442: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1442: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3380)
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1479: error: 'URL_WRONLY' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1479: error: 'url_fopen' was not declared in this scope
/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1485: error: 'av_write_header' was not declared in this scope
20:09:04: make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o] Error 1
20:09:04: make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2


下载ffmpeg-0.8,解压文件夹,进去里面运行,./configure,然后make all, 然后make install,如果权限不够的话,sudo make install





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值