I'm trying to install OpenCV in Ubuntu 14.10 according to instruction.
I installed all mentioned dependencies, but when I'm trying to run make
I get such errors:
/home/ilia/opencv-2.4.8/modules/highgui/src/ffmpeg_codecs.hpp:114:7: error: ‘CODEC_ID_H261’ was not declared in this scope
{ CODEC_ID_H261, MKTAG('H', '2', '6', '1') }
for all codecs, as I think. And these errors:
In file included from /home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::getProperty(int)’:
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp:773:33: error: ‘AVStream’ has no member named ‘r_frame_rate’
return av_q2d(video_st->r_frame_rate);
^
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::get_fps()’:
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp:820:49: error: ‘AVStream’ has no member named ‘r_frame_rate’
double fps = r2d(ic->streams[video_stream]->r_frame_rate);
^
In file included from /home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’:
/home/ilia/opencv-2.4.8/modules/highgui/src/cap_ffmpeg_impl.hpp:1236:72: error: ‘avcodec_encode_video’ was not declared in this scope
out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
^
It looks like it can not find some header files, but I installed all necessary dev packages libswscale-dev, libavdevice-dev, libavfilter-dev, libavformat-dev, libavcodec-dev. What should I do to resolve these problems?