How to update libavcodec on ubuntu 14.04?

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...?


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


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

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.


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