Search code examples
linuxffmpegcomputer-visionintelopenvino

libavcodec 56 not found even though it is installed


I keep getting this error message when I try to compile an Intel OpenVino project in Ubuntu 18.04: warning: libavcodec-ffmpeg.so.56, needed by /opt/intel/computer_vision_sdk_2018.3.343/opencv/lib/libopencv_videoio.so.3.4.3, not found

I also get similar error messages for: libavformat-ffmpeg.so.56, libavutil-ffmpeg.so.54, and libswscale-ffmpeg.so.3.

However, when I type ffmpeg in the terminal, I get:

ffmpeg version 2.7.7 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04) configuration:
    libavutil 54. 27.100 / 54. 27.100
    libavcodec 56. 41.100 / 56. 41.100
    libavformat 56. 36.100 / 56. 36.100
    libavdevice 56. 4.100 / 56. 4.100
    libavfilter 5. 16.101 / 5. 16.101
    libswscale 3. 1.101 / 3. 1.101
    libswresample 1. 2.100 / 1. 2.100 Hyper fast Audio and Video encoder

I have all the correct versions. The ffmpeg is in /usr/local/bin. Why can't OpenVino see it? Any advice will be appreciated, thanks in advance!

Here's the project I'm trying to compile: https://github.com/intel-iot-devkit/intruder-detector


Solution

  • It seems to be expecting files from the Ubuntu 16.04 ffmpeg package which Ubuntu packaged as libavcodec-ffmpeg.so.56, etc. (Current Ubuntu uses the standard names such as libavcodec.so.57.)

    You compiled ffmpeg with no configure options, but you need --enable-shared for the .so files.

    You could compile the FFmpeg 2.8 release branch with --enable-shared, and it will provide libavcodec.so.56, etc. Note the name difference: libavcodec.so.56 vs libavcodec-ffmpeg.so.56. If that causes problems you'll have to deal with that. I'd start by referring to the ./configure --help or equivalent of whatever you're compiling.