ffmpeg library configuration mismatch

Bug #730159 reported by VanillaMozilla on 2011-03-06
84
This bug affects 16 people
Affects Status Importance Assigned to Milestone
ffmpeg-extra (Ubuntu)
Low
Unassigned

Bug Description

When running ffmpeg I get a message
"WARNING: library configuration mismatch".

Verified with a second computer (which had not previously had video software added). I installed ffmpeg from Synaptic on an older computer. Same problem.

VanillaMozilla (vanillamozilla) wrote :

The error is shown a few lines from the top.

and what exactly is the problem with that?

yes, I'm totally aware of the warning message, but I didn't bother yet
to patch it out.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

VanillaMozilla (vanillamozilla) wrote :

Huh? I have no idea if there's any harm, but it sounds very much like a broken program.

It may not seem important, but video editing software is riddled with problems, and this adds to the already considerable noise. Among other problems, ffmpeg failed to convert files from Ogg Theora, but the failure was accompanied by a warning message. So it would be nice if you can fix it when you can. In the mean time, can you confirm that the message is spurious? Thanks.

Reinhard Tartler (siretart) wrote :

the message does not do any harm in ubuntu

affects: ffmpeg (Ubuntu) → ffmpeg-extra (Ubuntu)
Changed in ffmpeg-extra (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Tom (teeks99) wrote :

I believe this is not just a problem with ffmpeg-extra, but also with the libraries that don't have the "-extra" stuff as well. I put output in bug https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/760134, this bug was marked as a duplicate (correctly), but I think the effectivity of this needs to be changed.

The problem is that ffmpeg is spewing nearly a page-full of spurious error messages to the screen every time it is run, and/or that ffmpeg is mis-configured at build-time, and the library mismatch may be causing very difficult to find glitches or artefacts, bugs, or even outright crashes and protection faults.

If maintainers are confident that the configuration mismatch has no effect, there should be a patch to cmdutils.c to suppress the output in the PRINT_LIB_INFO macro. IMO arguments about whether upstream are being overly cautious, insufficiently clever about their library detection, or whatever, aren't at issue here (I have no opinion on it).

Having to scroll through nearly a page of spurious warnings is tedious.

Bump

dino99 (9d9) wrote :

outdated report

Changed in ffmpeg-extra (Ubuntu):
status: Confirmed → Invalid
Felipe Castillo (fcastillo.ec) wrote :

This problem is found on the new Ubuntu 16.04 right out of the box. Tons of messages and warnings. It's annoying! This should at least be changed back to confirmed

Changed in ffmpeg-extra (Ubuntu):
status: Invalid → Confirmed
Travisgevans (travisgevans) wrote :

I get this, too. It *seems* to work fine anyway, but it sure looks scary. And ffmpeg is already a ridiculously verbose program as it is *without* spewing a full-page of incomprehensible gobbledegook on every single invocation. ;-)

Cas (calumlind) wrote :

The solution is to remove libavcodec-ffmpeg-extra56 package, which will replace it with libavcodec-ffmpeg which stops the ffmpeg warning output.

    sudo apt remove libavcodec-ffmpeg-extra56

AskUbuntu References:

 - How to fix "library configuration mismatch": http://askubuntu.com/a/714991/8570
 - What is libavcodec-ffmpeg-extra56 package: http://askubuntu.com/a/847566/8570

dino99 (9d9) wrote :

That it, people needs to clean their system, purge package instead of simple removal (to avoid old settings left behind) and glance at wiki/howto/... to understand the difference between bugs.launchpad and forum.

Closing again that useless report.

Changed in ffmpeg-extra (Ubuntu):
status: Confirmed → Invalid
Veron Rado (junket) wrote :
Download full text (3.4 KiB)

No, that's not it.

I'm on 16.10 clean install and I get the warning too.
I installed:
ffmpeg (version 7:3.0.5-0ubuntu0.16.10.1)
and
ubuntu-restricted-extras (version 65)

I don't have libavcodec-ffmpeg-extra56 I have libavcodec-extra57

Example of the warning I get:

$ ffmpeg
ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --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-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
  WARNING: library configuration mismatch
  avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --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-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264 --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_amrwbenc
  libavutil 55. 17.103 / 55. 17.103
  libavcodec 57. 24.102 / 57. 24.102
  libavformat 57. 25.100 / 57. 25.100
  libavdevice 57. 0.101 / 57. 0.101
  libavfilter 6. 31.100 / 6. 31.100
  libavresample ...

Read more...

Veron Rado (junket) on 2017-04-22
Changed in ffmpeg-extra (Ubuntu):
status: Invalid → Confirmed

I love it. #2 above: "... I didn't bother yet to patch it out."

Written over 6 years ago. Brings a whole new meaning to the word "yet"! ;)

And #12: "That it, people needs to..."

As if the average user understands such advice, much less ever visits launchpad. Please try to make Ubuntu fit for such users, not just smart developers. It's wonderful what's been achieved, but let's take pride in fixing these little aggravations. Thomas Sheraton would not have left a few splinters sticking out of his chairs and said "Report invalid, tell users not to run their hands over the wood, just sit on them!".

Reinhard Tartler (siretart) wrote :

Well, the warning is printed whenever you use a copy of the 'ffmpeg' binary with a copy of libavcodec (or any other library provided by the ffmpeg source package) that has been built with a different configuration. Which is the whole point of the 'libavcodec-extra*' packages: Enable additional functionality.

To avoid the warning, the following patch should do it:

diff --git a/cmdutils.c b/cmdutils.c
index 469c2d5..6fde13b 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1053,8 +1053,6 @@ void print_error(const char *filename, int err)
     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
 }

-static int warned_cfg = 0;
-
 #define INDENT 1
 #define SHOW_VERSION 2
 #define SHOW_CONFIG 4
@@ -1074,19 +1072,6 @@ static int warned_cfg = 0;
                    AV_VERSION_MAJOR(version), AV_VERSION_MINOR(version),\
                    AV_VERSION_MICRO(version)); \
         } \
- if (flags & SHOW_CONFIG) { \
- const char *cfg = libname##_configuration(); \
- if (strcmp(FFMPEG_CONFIGURATION, cfg)) { \
- if (!warned_cfg) { \
- av_log(NULL, level, \
- "%sWARNING: library configuration mismatch\n", \
- indent); \
- warned_cfg = 1; \
- } \
- av_log(NULL, level, "%s%-11s configuration: %s\n", \
- indent, #libname, cfg); \
- } \
- } \
     } \

 static void print_all_libs_info(int flags, int level)

I'm not really comfortable with uploading this patch to ubuntu, because the check was put in for preventing surprises and assisting with bug triage.

> As if the average user understands such advice, much less ever visits launchpad.

I do not think that the 'ffmpeg' command-line tool is useful to the "average [ubuntu] user". Frontend applications are going to ignore it anyways. So with this in mind, I'm inclined to mark this bug as "wontfix".

Please, I hope you DO fix it. I understand the reluctance to remove a needed message, but I would hope the spuriousness could be removed.

Programs like ffmpeg and avconv are used simply because they are darned useful. They often accomplish in seconds what front end apps can't do at all. Contrary to what you might think, I don't know if I'm average, but like many people, I find it hard enough--extremely hard, in fact--to deal with real messages, never mind the spurious ones. It's awfully nice if this stuff just works.

Veron Rado (junket) wrote :

Apparently there is a built-in workaround for this in ffmpeg since 2013!
Simply use the '-hide_banner' option.

I came across it here https://superuser.com/a/1045060.

You are all very welcome :)

@Veron: thank you. But, as with all workarounds, the users need to know the workaround exists.

I find it very sad to see insights such as VanillaMozilla gives rejected. Shoot the messenger.

@Reinhart: we have to disagree on what an "average user" is. Certainly the kind of beginner I sometimes help, just interested in a safer replacement for Windows, with which to do web browsing and mail, no, those users will never use the command line, let alone ffmpeg specifically. But on my local user group mailing list it's not unusual for ffmpeg to be mentioned (it's highly thought of, by the way). That's a list that's mainly read by Linux users who are not developers, and few are really comfortable with the command line, but they are willing to try advice that others have vetted. And when they see warnings that actually they don't need, since they don't understand them they get jittery.

That superuser discussion is excellent. I especially like the comment "however the option -show-banner would be nicer than to hide it". How very true. To a developer low on empathy that provokes "Huh, show or hide, no difference, same functionality". But for a user that's a very big difference.

Veron Rado (junket) wrote :

I hope you don't think I'm rejecting VanillaMozilla's insights.
I'm just a user suffering from this issue too... see #13 above.

I agree '-show-banner' would be preferable.
Why don't you file a bug at the ffmpeg bug tracker requesting it?
https://trac.ffmpeg.org/
(Leave a note here if you do.)

For anyone who isn't aware of 'bash aliases', they are a way of making the workaround permanent.
It is *really* easy to create one.
I'm following this example.[1]

Using a text editor append this to the bottom of the hidden file '~/.bashrc' and save it:

alias ffmpeg='ffmpeg -hide_banner'

Then enter this in the terminal and hit return:

. ~/.bashrc

(Note the space between the '.' and '~/.bashrc'.)

Now every time you run 'ffmpeg' it will automatically run 'ffmpeg -hide_banner' for you.
No more ffmpeg spam in your terminal and you don't have to remember to use the -hide_banner option.

See these for more on bash aliases:
[1] https://askubuntu.com/a/17538
[2] https://en.wikipedia.org/wiki/Alias_(command)

Veron Rado (junket) wrote :

Sorry, I should've checked before posting.
'-show_banner' has been rejected by ffmpeg
https://trac.ffmpeg.org/ticket/7211

@Veron, yes, I'm sorry if it seemed I was critical of your help, my "Shoot the messenger" was aimed at @Reinhart who didn't bother yet (?) in 2011 to patch it.

Your link to https://trac.ffmpeg.org/ticket/7211 is interesting. They make a good point, hide by default will make their job harder. But for every one developer there are how many users? 1,000s? 100,000? So the user experience is paramount.

I make that comment as a developer myself, though unfortunately not (yet) for Linux. So if I sound preachy, I'm sorry, but I'm only trying to put across an attitude that I feel obliged to observe myself. My users are much more important than me.

Veron Rado (junket) wrote :

@John. No problem.
The ffmpeg devloper's argument doesn't seem too robust.
I'd guess the proposal rejection might not be set in stone.
If enough people reasoned with them they might change their minds.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.