title: Installing OpenCV in Ubuntu 14.10
body: <p>I'm trying to install OpenCV in Ubuntu 14.10 according to <a href="http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html" rel="nofollow">instruction</a>.
  I installed all mentioned dependencies, but when I'm trying to run <code>make</code> I get such errors:</p>
  
  <pre><code>/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') }
  </code></pre>
  
  <p>for all codecs, as I think.
  And these errors:</p>
  
  <pre><code>    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-&gt;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-&gt;streams[video_stream]-&gt;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);
                                                                          ^    
  </code></pre>
  
  <p>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?</p>