OpenCV not finding libavcodec installed in centos

Issues related to applications and software problems
Post Reply
ras123
Posts: 15
Joined: 2016/03/01 05:32:36

OpenCV not finding libavcodec installed in centos

Post by ras123 » 2016/07/20 12:08:54

ffmpeg is installed in /usr/local as shared libraries in Cent OS 6.8, but while compiling opencv 2.4.10, it couldn't find these libraries, configuration output is

Code: Select all

-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   package 'libavcodec' not found
-- checking for module 'libavformat'
--   package 'libavformat' not found
-- checking for module 'libavutil'
--   package 'libavutil' not found
-- checking for module 'libswscale'
--   package 'libswscale' not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
To run ffmpeg, I added /usr/local/lib to /etc/ld.so.conf file, should I need to add each library separately into directory /etc/ld.so.conf.d/ instead?

ras123
Posts: 15
Joined: 2016/03/01 05:32:36

Re: OpenCV not finding libavcodec installed in centos

Post by ras123 » 2016/07/22 04:57:13

I found a solution,

Code: Select all

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

cyford33
Posts: 2
Joined: 2017/04/19 01:50:27

Re: OpenCV not finding libavcodec installed in centos

Post by cyford33 » 2017/08/30 20:08:45

Yes that worked for me as well.. now my rtsp works
but my usb cams do not ... i just cant win lol

Post Reply