OpenCV uses an older version of FFMPEG despite the latest being installed in bin
CMAKE
sudo cmake -D WITH_NVCUVID=ON -D BUILD_DOCS=ON -D WITH_XINE=ON -D WITH_CUDA=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D WITH_OPENNI=OFF -D BUILD_EXAMPLES=ON -D WITH_OPENCL=ON -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_EXTRA_MODULES_PATH=../modules/opencv_contrib-master/modules/ -D ENABLE_FAST_MATH=1 -D WITH_QT=ON -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D CMAKE_INSTALL_PREFIX=/usr/local/ ..
Output
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.1)
-- FFMPEG: YES
-- codec: YES (ver 54.35.0)
-- format: YES (ver 54.20.4)
-- util: YES (ver 52.3.0)
-- swscale: YES (ver 2.1.1)
-- resample: NO
-- gentoo-style: YES
ffmpeg -version
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Notice :
codec is 54.35.0 instead of 56.1.100
format is 54.20.4 instead of 56.4.101
util is 52.3.0 instead of 54.7.100
Is there a way to force opencv to use the latest version ? I tried uninstalling ffmpeg, reinstalling and rebuilding CV but it keeps finding the older version
Two things you should do
cmake-gui
in the build folder and see if you can explicitly link to the correct folders using the options provided.1) Building it on ubuntu server so using command line. Would rather not use gui. 2) The folder 3rdpart/ffmpeg does not exist in the version of CV3.0 I got from web.
Hmm that is sketchy. I always use a download from the official github repo if I build OpenCV myself. I suggest you to do the same, because else problems can be occuring due to much different reasons. You could run a gui locally to see which parameters need to be set explicitly, then add them to your
CMAKE make
command in the terminal.