title: make error in OpenCV installation on ubuntu (ffmpeg CODEC_ID_XXXX was not declared in scope)
body: <p>I am trying to install OpenCV following <a href="https://www.youtube.com/watch?v=ubOa_tJDM_U" rel="nofollow">this</a> tutorial. I am through cmake.(The configuration is given at the end.) However make shows error :<code>make[2]: ***[modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1</code>
  One <a href="http://answers.opencv.org/question/12597/build-problems-for-opencv-241-with-ubuntu-1204-lts/" rel="nofollow">link</a> pointed out reason as different version of opencv and ffmpeg, but I found a piece of code in cap_ffmpeg_impl.hpp that appears to be handling it.</p>
  
  <pre><code>#if LIBAVCODEC_BUILD &gt;= CALC_FFMPEG_VERSION(54,25,0)
  #  define CV_CODEC_ID AVCodecID
  #  define CV_CODEC(name) AV_##name
  #else
  #  define CV_CODEC_ID CodecID
  #  define CV_CODEC(name) name
  #endif
  </code></pre>
  
  <p>Not sure if it is ok for this to be commented.</p>
  
  <p>Also, I could try installing ffmpeg seperately, but I am not sure how dependencies are handled in this installation around libav.</p>
  
  <p>Would be thankful for any help in solving this problem, as well as tips/links for OpenCV installation in general.</p>
  
  <p>make configuration:</p>
  
  <pre><code>-- General configuration for OpenCV 2.4.11 ====================================
  Version control:               unknown
  -- 
  --   Platform:
  --     Host:                        Linux 3.16.0-32-generic i686
  --     CMake:                       2.8.12.2
  --     CMake generator:             Unix Makefiles
  --     CMake build tool:            /usr/bin/make
  --     Configuration:               RELEASE
  -- 
  --   C/C++:
  --     Built as dynamic libs?:      YES
  --     C++ Compiler:                /usr/bin/c++  (ver 4.9.1)
  --     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG  -DNDEBUG
  --     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=sse -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG
  --     C Compiler:                  /usr/bin/cc
  --     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG  -DNDEBUG
  --     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=sse -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG
  --     Linker flags (Release):      
  --     Linker flags (Debug):        
  --     Precompiled headers:         YES
  -- 
  --   OpenCV modules:
  --     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab
  --     Disabled:                    world
  --     Disabled by dependency:      -
  --     Unavailable:                 androidcamera dynamicuda viz
  -- 
  --   GUI: 
  --     QT 5.x:                      YES (ver 5.3.0)
  --     QT OpenGL support:           YES (Qt5::OpenGL 5.3.0)
  --     OpenGL support:              YES (/usr/lib/i386-linux-gnu/libGLU.so /usr/lib/i386-linux-gnu/libGL.so /usr/lib/i386-linux-gnu/libSM.so /usr/lib/i386-linux-gnu/libICE.so /usr/lib/i386-linux-gnu/libX11.so /usr/lib/i386-linux-gnu/libXext.so)
  --     VTK support:                 NO
  -- 
  --   Media I/O: 
  --     ZLib:                        /usr/lib/i386-linux-gnu/libz.so (ver 1.2.8)
  --     JPEG:                        /usr/lib/i386-linux-gnu/libjpeg.so (ver )
  --     PNG:                         /usr/lib/i386-linux-gnu/libpng.so (ver 1.2.51)
  --     TIFF:                        /usr/lib/i386-linux-gnu/libtiff.so (ver 42 - 4.0.3)
  --     JPEG 2000:                   /usr/lib/i386-linux-gnu/libjasper.so (ver 1.900.1)
  --     OpenEXR:                     /usr/lib/i386-linux-gnu/libImath.so /usr/lib/i386-linux-gnu/libIlmImf.so /usr/lib/i386-linux-gnu/libIex.so /usr/lib/i386-linux-gnu/libHalf.so /usr/lib/i386-linux-gnu/libIlmThread.so (ver 1.6.1)
  -- 
  --   Video I/O:
  --     DC1394 1.x:                  NO
  --     DC1394 2.x:                  YES (ver 2.2.1)
  --     FFMPEG:                      YES
  --       codec:                     YES (ver 56.1.0)
  --       format:                    YES (ver 56.1.0)
  --       util:                      YES (ver 54.3.0)
  --       swscale:                   YES (ver 3.0.0)
  --       gentoo-style:              YES
  --     GStreamer:                   NO
  --     OpenNI:                      NO
  --     OpenNI PrimeSensor Modules:  NO
  --     PvAPI:                       NO
  --     GigEVisionSDK:               NO
  --     UniCap:                      NO
  --     UniCap ucil:                 NO
  --     V4L/V4L2:                    Using libv4l1 (ver 1.2.1) / libv4l2 (ver 1.2.1)
  --     XIMEA:                       NO
  --     Xine:                        NO
  -- 
  --   Other third-party libraries:
  --     Use IPP:                     NO
  --     Use Eigen:                   YES (ver 3.2.1)
  --     Use TBB:                     YES (ver 4.2 interface 7000)
  --     Use OpenMP:                  NO
  --     Use GCD                      NO
  --     Use Concurrency              NO
  --     Use C=:                      NO
  --     Use Cuda:                    NO
  --     Use OpenCL:                  YES
  -- 
  --   OpenCL:
  --     Version:                     dynamic
  --     Include path:                /home/keeda/Downloads/data_analysis/opencv-2.4.11/3rdparty/include/opencl/1.2
  --     Use AMD FFT:                 NO
  --     Use AMD BLAS:                NO
  -- 
  --   Python:
  --     Interpreter:                 /usr/bin/python2 (ver 2.7.8)
  --     Libraries:                   /usr/lib/i386-linux-gnu/libpython2.7.so (ver 2.7.8)
  --     numpy:                       /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.9.1)
  --     packages path:               lib/python2.7/dist-packages
  -- 
  --   Java:
  --     ant:                         /usr/bin/ant (ver 1.9.4)
  --     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include
  --     Java tests:                  YES
  -- 
  --   Documentation:
  --     Build Documentation:         YES
  --     Sphinx:                      /usr/bin/sphinx-build (ver 1.2.2)
  --     PdfLaTeX compiler:           /usr/bin/pdflatex
  --     Doxygen:                     NO
  -- 
  --   Tests and samples:
  --     Tests:                       YES
  --     Performance tests:           YES
  --     C/C++ Examples:              YES
  -- 
  --   Install path:                  /usr/local
  -- 
  --   cvconfig.h is in:              /home/keeda/Downloads/data_analysis/opencv-2.4.11/build
  -- -----------------------------------------------------------------
  </code></pre>