2013-02-12 5 views
0

Je veux installer OpenCV 2.1.0 (sur Ubuntu 11.10), mais après faire (mes pas befor faire: http://www.doc.ic.ac.uk/~strasdat/rss2010videos/INSTALL.txt) je reçois:OpenCV 2.1.0 installer + ffmpeg + erreur

[ 45%] Built target opencv_lapack 
[ 45%] Built target cxcore_pch_dephelp 
[ 45%] Built target pch_Generate_cxcore 
[ 45%] Built target flann 
[ 47%] Built target zlib 
[ 50%] Built target cxcore 
[ 50%] Built target cv_pch_dephelp 
[ 51%] Built target pch_Generate_cv 
[ 61%] Built target cv 
[ 61%] Built target highgui_pch_dephelp 
[ 61%] Built target pch_Generate_highgui 
[ 61%] Building CXX object src/highgui/CMakeFiles/highgui.dir/cvcap_ffmpeg.o 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘virtual void CvCapture_FFMPEG::close()’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:403:9: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1687) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:403:31: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1687) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘bool CvCapture_FFMPEG::reopen()’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:432:5: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1687) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:432:27: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1687) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:435:52: error: ‘av_open_input_file’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:436:5: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1511) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:436:27: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1511) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:443:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:443:28: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvCapture_FFMPEG::open(const char*)’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:468:63: error: ‘av_open_input_file’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:473:11: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1511) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:473:33: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1511) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:488:13: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:488:36: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvCapture_FFMPEG::grabFrame()’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:566:54: error: ‘avcodec_decode_video’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In function ‘const char* icvFFMPEGErrStr(int)’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:819:10: error: ‘AVERROR_NUMEXPECTED’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:823:10: error: ‘AVERROR_NOFMT’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:825:10: error: ‘AVERROR_IO’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:827:10: error: ‘AVERROR_NOMEM’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In function ‘AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, AVCodecID, int, int, int, double, int)’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:899:7: warning: ‘AVStream* av_new_stream(AVFormatContext*, int)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1711) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:899:26: warning: ‘AVStream* av_new_stream(AVFormatContext*, int)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1711) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1011:22: error: ‘PKT_FLAG_KEY’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1019:20: warning: ‘int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4388) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1019:72: warning: ‘int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4388) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1031:30: error: ‘PKT_FLAG_KEY’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘virtual void CvVideoWriter_FFMPEG::close()’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1195:20: error: ‘url_fclose’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::open(const char*, int, double, CvSize, bool)’: 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1228:41: error: ‘guess_format’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1251:31: error: ‘av_alloc_format_context’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1292:35: error: ‘av_set_parameters’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1296:35: error: ‘dump_format’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1321:15: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1321:36: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3681) [-Wdeprecated-declarations] 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1358:42: error: ‘URL_WRONLY’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1358:52: error: ‘url_fopen’ was not declared in this scope 
.../OpenCV-2.1.0/src/highgui/cvcap_ffmpeg.cpp:1364:25: error: ‘av_write_header’ was not declared in this scope 
make[2]: *** [src/highgui/CMakeFiles/highgui.dir/cvcap_ffmpeg.o] Chyba 1 
make[1]: *** [src/highgui/CMakeFiles/highgui.dir/all] Chyba 2 
make: *** [all] Chyba 2 

J'ajouté à cvcap_ffmpeg.cpp file this:

#ifndef UINT64_C 
#define UINT64_C(c) (C## ULL) 
#endif 

#if LIBAVCODEC_VERSION_MAJOR < 53 
#define CodecType AVMediaType 

#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN 
#define CODEC_TYPE_VIDEO  AVMEDIA_TYPE_VIDEO 
#define CODEC_TYPE_AUDIO  AVMEDIA_TYPE_AUDIO 
#define CODEC_TYPE_DATA  AVMEDIA_TYPE_DATA 
#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE 
#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT 
#define CODEC_TYPE_NB   AVMEDIA_TYPE_NB 
#endif 

Il a résolu quelques problèmes auparavant.

J'ai essayé d'installer ffmpeg comme ici ->https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide, mais c'est sans changement. Quelqu'un peut-il m'aider avec ces erreurs?

Remerciez

+0

Le dernier OpenCV disponible est 2.4.3. Je vous suggère de l'essayer. – karlphillip

+0

Non, je veux OpenCV pour http://openslam.org/robotvision.html. Cela ne fonctionne pas avec certaines nouvelles bibliothèques, donc j'ai essayé seulement la version 2.1.0. –

+0

Comparez ** cvcap_ffmpeg.cpp ** du 2.4.3 (ou 2.3.1) au vôtre et voyez ce qui a changé. Peut-être que cela peut vous donner des conseils sur la façon de résoudre les problèmes. – karlphillip

Répondre