1

I want to install opencv on the raspberry pi for image detection on a video I have followed this tutorial but the videos are not to be played or proccessd. I tried to install it again to make sure ffmpeg is enabled error appears during config.

ffmpeg/avformat.h is not found

I have searched and what I found this question the answer is to make sure that ffmpeg is installed on the pi before making the opencv so I installed the ffmpeg went through all the steps till make and sudo make install in the main directory of the pi but still when I

ccmake ../ then press c

to config same error appears I have tried to put the ffmpeg file inside the release file and put the avformat.h just in opencv/release/ffmpeg same error file not found how can I solve this problem.

  • did you install ffmpeg from a repository like apt-get install ffmpeg or build it from source? It looks like you are missing the development files try apt-cache search ffmpeg and see if there is a developer package. might jsut be ffmpeg-dev, but I can not check right now. – rob May 2 '14 at 10:51
  • no I did build it from the source file – Xys May 2 '14 at 17:10
  • Have you solved this problem, yet? I am working on the exact same problem here. I tried several methods that might be helpful for you. When I installed ffmpeg using 'apt-get', opencv is able to find the 'avformat.h' file with no problem. I searched and found that 'avformat.h' is in directory '/usr/include/libavformat/avformat.h'. Then I tried to install ffmpeg from source code compiling, and the error shows like you described. I searched and found that the file is in directory '/usr/local/include/libavformat/avformat.h' So the difference here is 'local', so I think that's the reason why opencv – Jiechao Li Jul 14 '14 at 3:04
  • Me too :) Havent't looked long, but all pages/posts are same thing. Not found... – 1'' Jul 3 '15 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.