Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
2  
Have you resolved this issue? –  pl1nk Jun 25 '12 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 '13 at 11:50

4 Answers 4

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
share|improve this answer
    
Definitely correct for getting h264 decoding installed, I'm just unsure whether it will get it in to chromium by itself. –  hbdgaf Mar 21 '12 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? –  Chad--24216 Mar 21 '12 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 '12 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? –  franzlorenzon Dec 13 '12 at 13:12
    
Just to make it clear, will not work for Firefox. –  math Aug 8 '13 at 11:51

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.

share|improve this answer
1  
Will only work for chromium (chrome has it builtin by now) and not for Firefox. –  math Aug 8 '13 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. –  hbdgaf Aug 8 '13 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 '13 at 10:29

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

share|improve this answer

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
share|improve this answer
    
P.S. This is only a temp solution, as of Firefox 30, support for GStreamer1.0 will be available. Which is available in the default repositories 14.04. So there will be non need to add a PPA. –  Dan Apr 22 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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