ffmpeg suport on Centos7

asked 2017-01-24 12:00:28 -0500

ver228 gravatar image

I am trying to compile OpenCV with ffmpeg support on Centos7. I installed ffmpeg from the EPEL repository, and installed yum install ffmpeg ffmpeg-devel. When I tried to compiled using cmake -G"Unix Makefiles" -DWITH_FFMPEG=1 . I get the following output (I am only copying the video ouput section, please let me know if i should add more).

-- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: YES (ver 2.2.2) -- FFMPEG: NO -- avcodec: YES (ver 56.26.100) -- avformat: YES (ver 56.25.101) -- avutil: YES (ver 54.20.100) -- swscale: YES (ver 3.1.101) -- avresample: YES (ver 2.1.0) -- GStreamer:
-- base: YES (ver 0.10.36) -- video: YES (ver 0.10.36) -- app: YES (ver 0.10.36) -- riff: YES (ver 0.10.36) -- pbutils: YES (ver 0.10.36)

This is confusing because it seems that cmake detects the libraries but not ffmpeg. The other clue I got is that it seems that cmake fails a test it does at the beginning since it show:

-- WARNING: Can't build ffmpeg test code

Looking a bit more I found that this test is done in ./cmake/OpenCVFindLibsVideo.cmake, where it tries to compile the example ./cmake/checks/ffmpeg_test.cpp. In my case I found that the variable FFMPEG_LIBRARY_DIRS is empty. I do not if this is useful but it is the only clue I found.

I am stuck at the moment and I will appreciate any suggestion.

edit retag flag offensive close merge delete


so.. what is your fix to build opencv+ffmpeg on centos7?

vinnitu gravatar imagevinnitu ( 2017-11-09 08:36:01 -0500 )edit

@vinnitu, please do not post answers here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2017-11-09 08:40:47 -0500 )edit

So as I see author cannot solve build trouble, I am too. Сan somebody helps us?

vinnitu gravatar imagevinnitu ( 2017-11-09 08:53:47 -0500 )edit