Canonical Limited is shown as a licensee of H.264. I am interested in being able to play H.264 video online when using the Chrome web-browser in Ubuntu (and in the future on Firefox when Firefox supports H.264).

Is H.264 support enabled on self-installs of Ubuntu? If not, is there some way I can buy H.264 support for my Ubuntu install? Assume a scenario where I self-installed Ubuntu on a computer that came pre-installed with Windows OS. I'd like to know any and all options available to me for getting H.264 to work on Ubuntu.

  • 3
    Have you resolved this issue?
    – pl1nk
    Jun 25, 2012 at 16:20
  • I investigated this issue as well. For Chrome h.264 is no problem as it is builtin by now, but Firefox has plans to support it via gstreamer see phoronix.com/scan.php?page=news_item&px=MTM5NzU. So with nightly build (8/Aug/2013) you should set the perference: media.gstreamer.enabled to true and install proper codecs for gstreamer. I have not tested this, as nightly build are very unstable.
    – math
    Aug 8, 2013 at 11:50

5 Answers 5


The ubuntu-restricted-extras has all the multimedia decoding packages in and working for me on the decoding end. And chromium automatically used the ffmpeg plug-in.

If there are packages in restricted-extras you are sure you don't want you could try just
chromium-codecs-ffmpeg-extra from the Software Center:

Install via the software center

Or in Terminal:

sudo apt-get update
sudo apt-get install chromium-codecs-ffmpeg-extra

Just to be sure it makes it in to chromium and you don't just get the codec.

  • 1
    Will only work for chromium (chrome has it builtin by now) and not for Firefox.
    – math
    Aug 8, 2013 at 11:50
  • Then firefox should have been built properly and if it's a built-in in chrome (and you're using it), then you should be comfortable building chrome from sources or using a binary updater. Yossile's answer is equally correct for things that link against the library itself, but you can't have ffmpeg-extra without x264. That being so, my answer sort of subsumes his by being more general and including chromium as well. Aug 8, 2013 at 22:35
  • well, I didn't want to offend you or your answer, I just wanted to point out whats about Firefox in that case.
    – math
    Aug 12, 2013 at 10:29

You can get H.264 encoder by installing the x264 package with the Software Center:

Install via the software center

Or in a terminal:

sudo apt-get update
sudo apt-get install x264
  • Definitely correct for getting h264 decoding installed, I'm just unsure whether it will get it in to chromium by itself. Mar 21, 2012 at 19:30
  • 2
    Chrome (as opposed to chromium) support H.264. So assuming x264 package installs H.264 support, this should be it. Would "buying" a commercial H.264 support package give any advantages over installing the x264 package? Mar 21, 2012 at 20:03
  • @Chad--24216 I believe differences are in licensing so that if someone needs it for purposes outside of the GNU-GPL it requires the commercial version.
    – yossile
    Mar 21, 2012 at 20:18
  • Normally one has to pay royalties for a h264 license because she wants to distribute a video commercially, and not for decoding it for playback, as far as I know. Why would you want to use another codec? Lower CPU usage? Dec 13, 2012 at 13:12
  • Just to make it clear, will not work for Firefox.
    – math
    Aug 8, 2013 at 11:51

Right now, I'm using Firefox Nightly (27.0a1 (2013-10-24)) on Ubuntu 13.10. I made the change on the flag media.gstreamer.enabled to true. You also need to install the package gstreamer0.10-ffmpeg.

You can check if you have h.264 enabled in this page: http://www.youtube.com/html5


In Ubuntu 14.04 the package gstreamer0.10-ffmpeg is not available anymore. See the bug report at launchpad.

Web Upd8 posted a workaround to install the gstreamer package using a ppa:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

I need to play MP4, then I looked up, I found to type in the terminal the following line is giving the right answer: ($ apt-get install gstreamer1.0 ffmpeg) The video can be played, now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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