27

I have been using avconv without issue, however since upgrading to 15.10 and switching to ffmpeg, I have a library configuration mismatch warning in my script output.

This is my command to rip CDs for my iPod and Fiio X5 Mk2.

#!/bin/bash

cdparanoia -Bv
for f in ./*.wav; do avconv -i "$f" -acodec alac "${f%.*}.m4a"; done
eject
ls

When I replaced avconv with ffmpeg I now see WARNING: library configuration mismatch in the middle of the output:

ffmpeg version 2.7.3-0ubuntu0.15.10.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265 --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  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
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from './track01.cdda.wav':
  Duration: 00:02:36.20, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, ipod, to './track01.cdda.m4a':
  Metadata:
    encoder         : Lavf56.36.100
    Stream #0:0: Audio: alac (alac / 0x63616C61), 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc56.41.100 alac
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> alac (native))
Press [q] to stop, [?] for help
size=   16226kB time=00:02:36.22 bitrate= 850.9kbits/s   
video:0kB audio:16219kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.046357%

Checking other sites suggests I have installed ffmpeg on an early version of Ubuntu where avconv was the default, but this wasn't the case here.

Can anyone suggest a resolution for me?

Cas
  • 8,707
markrich
  • 1,441

5 Answers5

18

To fix this remove the following package:

sudo apt remove libavcodec-ffmpeg-extra56

Apt will remove the package and replace it with libavcodec-ffmpeg56 resulting in ffmpeg no longer output a warning message.

For details on libavcodec-ffmpeg-extra56 package and why it is likely no needed, see: https://askubuntu.com/a/847566/8570

markrich
  • 1,441
12

Adding what worked for me personally (Ubuntu 20.10) because this is one of the first results when searching for this error, and it's been making me mad for the past couple days:

sudo apt install --reinstall libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libpostproc55 libswresample3 libswscale5

I didn't even need to reinstall FFmpeg.

rxyz
  • 121
11

On Ubuntu 18.04:

sudo apt remove libavcodec-extra57
Eric Carvalho
  • 55,453
4

On Ubuntu 22.04 I just had to install libavcodec58. It warned that it would remove libavcodec-extra and libavcodec-extra58.

0

This is because your libs built from ffmpeg source and libs in your system(/usr/lib/ or /usr/local/lib/) are in conflict. So

find . -name "avcodec"

If libavcodec.so.* in /usr/local/lib, /usr/lib/, /usr/lib/x86_64-linux-gnu or /usr/lib/i386-linux-gnu, please replace them with the libs built from ffmpeg source and create soft links.

cp -r /the/path/to/ffmpeg/build/lib/* /usr/local/lib/
sudo ln -s /usr/local/lib/libavcodec.so.59.18.100 /usr/local/lib/libavcodec.so.59