How to update libavcodec on ubuntu 14.04?

121,757

Solution 1

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

Solution 2

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

Solution 3

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.

Solution 4

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.

Solution 5

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

Share:
121,757

Related videos on Youtube

Alex
Author by

Alex

Updated on September 18, 2022

Comments

  • Alex
    Alex almost 2 years

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

    • Admin
      Admin over 7 years
    • Snooper
      Snooper over 7 years
      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
  • misterjinx
    misterjinx over 7 years
    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.
  • karel
    karel over 7 years
    In Ubuntu 14.04 the libavcodec package from the default Ubuntu repositories is named libavcodec54, not libavcodec.
  • misterjinx
    misterjinx over 7 years
    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..
  • karel
    karel over 7 years
    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.
  • Kai
    Kai over 7 years
    @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).
  • soger
    soger over 7 years
    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".
  • Carolus
    Carolus over 7 years
    @soger True. But what users want might not always be what is best for them :D
  • Hugo
    Hugo over 7 years
    working, but not a real solution, just a quick workaround, isn't it? Thanks anyway
  • Murmel
    Murmel over 7 years
    Your answer reads like "click on the never show again button". Provide some more details, why this solves the problem and why libavcodec is not "vulnerable" in your opinion. Setting something to "true" will not really make anything more secure - or?
  • mc0e
    mc0e over 7 years
    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).
  • fuenfundachtzig
    fuenfundachtzig over 7 years
    You'll need to restart firefox to make the change effective.
  • blendenzo
    blendenzo over 7 years
    @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.
  • lithorus
    lithorus over 7 years
    libavcodec56 and libavcodec-extra-56 actually conflict each other...
  • balu
    balu over 7 years
    The only thing that worked for me so far! Thanks!