On Ubuntu 14.04.5 I just upgraded firefox to version 50.0; now there is a message on some pages which reads:

libavcodec may be vulnerable or is not supported, and should be updated to play videos

So how can I update libavcodec?

A simple

sudo apt-get install libavcodec

gives the following output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libavcodec

So maybe I don't have libavcodec installed in the first place? So why do I get this message...?

  • 8
    superuser.com/questions/1137029/… – user589808 Nov 19 '16 at 14:25
  • After Firefox was updated to 50 in Ubuntu 14.04.5, I am also getting this message on Facebook: “libavcodec may be vulnerable or is not supported, and should be updated to play video.” When playing videos posted to the news feed, the audio was choppy and cutting out every three seconds as though interrupted by video loading processes. After reading the comments by misterjinx and karel, I installed libavcodec54 through Synaptic, which also removed Ubuntu Restricted Extras ('libavcodec-extra' and 'libavcodec-extra-54'). But after doing this I still get the same message on Facebook, although the a – Snooper Nov 19 '16 at 23:08

Just enable libavcodec in firefox:
type about:config in the address bar, enter
click "I accept the risk" search libavcodec
change media.libavcodec.allow-obsolete;false to true

enter image description here

  • 2
    Best response IMO because most users probably want to switch the flag and be done with it rather then mess with their repos. You may want to correct your typo from "flase" to "false". – soger Nov 22 '16 at 1:22
  • 9
    @soger True. But what users want might not always be what is best for them :D – Carolus Nov 22 '16 at 13:05
  • 2
    working, but not a real solution, just a quick workaround, isn't it? Thanks anyway – Hugo Nov 24 '16 at 11:59
  • 5
    This seems like really bad advice to me. You're basically telling people to explicitly open a security vulnerability on their system rather than fix it. (Or if there's some reason you believe this to be safe, you haven't said so). – mc0e Nov 28 '16 at 12:22
  • 2
    @user3317398 In case you missed it, the question being asked is "How can I update libavcodec?" and you have not even attempted to answer it. Your advice is terrible for security conscious users who came here looking for a real answer. – blendenzo Nov 30 '16 at 23:27

Update

libavcodec has been updated in Ubuntu 14.04.

An update to libav-tools, libavcodec-extra and libavcodec-extra-54 in Ubuntu 14.04 has fixed the problem. The libavcodec may be vulnerable or is not supported, and should be updated to play video notification no longer appears after updating the system with the Software Updater.


In Ubuntu 14.04, I am using the Firefox 50 from the default Ubuntu repositories, which is the latest version of Firefox at the time this is written. I do not have any libavcodec package installed in this system, because I do not need to install it. If you don't have a libavcodec package installed, you can ignore the second part of this answer.

I get a libavcodec may be vulnerable or is not supported, and should be updated to play video. notification when attempting to play videos posted to Facebook and videos from other websites like cnn.com and yahoo.com. I decided to ignore this notification and not upgrade my libavcodec because the same videos play perfectly without showing the libavcodec notification in Chromium web browser in the same video players. The only difference in the videos between Firefox and Chromium that I noticed is in Chromium I see additional options to change the video quality when clicking the Facebook video player's gear icon that I don't see in Firefox.

enter image description here
update libavcodec notification in Firefox 50 when libavcodec is not installed

The notification in the above screenshot is a little bit confusing because the video on that webpage plays OK even when libavcodec is not installed. The notification appears to be coming from Firefox because the same notification shows on Facebook and CNN. Do I need to drag in another PPA to get rid of the annoying libavcodec notification in Firefox even though the video plays OK in Firefox without it? The same video plays perfectly in Chromium without showing any libavcodec update notification.

After you upgrade Firefox to version 50 (without libavcodec54 installed) and start playing a video, you may be prompted to Allow and Remember Firefox to run the video's multimedia plugin in order for the video to start playing.


To install libav-tools (Multimedia player, encoder and transcoder) libavcodec56 (Libav codec library) and libavcodec-extra-56 (Libav codec library (additional codecs)) in Ubuntu 14.04 open the terminal and type:

sudo add-apt-repository ppa:heyarje/libav-11
sudo apt-get update
sudo apt-get install libav-tools libavcodec-extra-56
sudo apt-get upgrade
  • 1
    I have the same issue but I opted to install libav from sources (version 12), but after the installation libavcodec is not found. What could be the issue? I haven't tried yet the ppa, I want the ppa to be the final option. – misterjinx Nov 19 '16 at 14:46
  • 1
    In Ubuntu 14.04 the libavcodec package from the default Ubuntu repositories is named libavcodec54, not libavcodec. – karel Nov 19 '16 at 14:48
  • I have not installed any libavcodec* from packages, I did it directly from sources. That's what I was asking, if by installing libav from sources shouldn't libavcodec be available also, because apparently it's not, and I don't know if there's anything special that I should do to have it available also.. – misterjinx Nov 19 '16 at 14:49
  • 1
    If Ubuntu 14.04 is expecting a package named libavcodec54, it will not use libavcodec after it is installed because it is a different package. – karel Nov 19 '16 at 14:51
  • @misterjinx: Maybe the installer didn't put it to the correct place? My libavcodec.so is in /usr/lib/x86_64-linux-gnu/ (installed using the package manger; libavcodec.so is a symbolic link to libavcodec.so.54.35.0 in my case). – Kai Nov 20 '16 at 9:48

For the sake of those coming here from google, I also posted this answer on super user: https://superuser.com/questions/1137029/libavcodec-may-be-vulnerable-message-in-firefox/1148770#1148770

karel's answer works if you are okay installing another repo, and user3317398's if you are okay with the security vulnerability.

If, like me, you don't care if some videos don't play, and you just want that damn message to disappear - without disabling libavcodec (because manually disabling means I'd have to manually re-enable once a fix comes out) - then you should go to about:config, and look for:

media.decoder-doctor.notifications-allowed

In the value field, you may see a comma-separated list of values; the one you want to remove is MediaUnsupportedLibavcodec. For example, my setting was:

MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaUnsupportedLibavcodec

And I changed it to:

MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight

Viola! No more annoying notification, and the videos which require the codec won't work. However, there's no security issue and once the official repo pushes a fix, the videos will start working again without any further effort on your part.

For your information - Ubuntu 12.04 LTS is affected too. Please do not vote down.

On Launchpad we have bug 1643467 about libav and Firefox problem.

I found PPA with newer libav (version 11.2-1ppa1) for Precise:

sudo add-apt-repository ppa:itachi-san/ffmpeg
sudo apt-get update
sudo apt-get install libav-tools libavcodec56

If you do not want to install libav from PPA, you can set media.libavcodec.allow-obsolete to true in about:config as on 14.04 LTS.

  • 1
    The only thing that worked for me so far! Thanks! – balu Feb 24 '17 at 20:33

I had the same problem after update. I did that and work for me:

sudo add-apt-repository ppa:heyarje/libav-11
sudo apt-get update
  1. open Synaptic package manager.
  2. search in filter about libavcodec .
  3. check box libavcodec-extra and apply .

synaptic manager

protected by Community Nov 23 '16 at 1:22

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.