Ask Your Question

OpenCV 2.4.4 build always fails at ffmpeg portion

asked 2013-04-09 21:33:41 -0600

Pran Mukherjee gravatar image

This is the start of the error messages:

[ 19%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o

In file included from home/opencv-2.4.5/modules/highgui/src/cap_ffmpeg_impl.hpp:60:0, from home/opencv-2.4.5/modules/highgui/src/cap_ffmpeg.cpp:45: home/Desktop/opencv-2.4.5/modules/highgui/src/ffmpeg_codecs.hpp:104:7: error: ‘CODEC_ID_H264’ was not declared in this scope

There are then about 100+ very similar lines saying that codecs were not declared in this scope. What's going on? I even installed all of the codec libraries recommended by the installation guide here:

Any ideas?

edit retag flag offensive close merge delete


Have you solved this? I'm having the same issue.

Apollo Juice gravatar imageApollo Juice ( 2014-10-20 15:09:37 -0600 )edit

2 answers

Sort by » oldest newest most voted

answered 2013-04-10 06:21:48 -0600

Google gave me this link, person with same problems like you. Maybe read through it and see if you can get it to work using this help?

edit flag offensive delete link more

answered 2014-06-17 09:23:43 -0600

I had similar errors reported and the cause was a conflict with the avconv (libav) package previously installed using apt-get. Once I removed the libav package I was able to succesfully build and install opencv. I used version 2.4.9

edit flag offensive delete link more


Simply said, when using openCV you should just build openCV yourself which will just select the correct libav package on your system. Then it should just work.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-06-23 07:43:33 -0600 )edit

Question Tools


Asked: 2013-04-09 21:33:41 -0600

Seen: 7,779 times

Last updated: Jun 17 '14