Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Firefox (Iceweasel) 24 in Debian Wheezy. When I go to https://www.youtube.com/html5 it shows me that my browser does not support H.264

When I go to the same URL with Chrome, it shows H.264 is supported

After googling, I found few debian bug reports about this. Seems that H.264 is disabled deliberately. Indeed when I go to about:buildconfig in Firefox, I see it has been compiled with --disable-gstreamer

I am confused why this is disabled. Is this a technical reason, or a "license/free software" issue

Is there any simple way to enable H.264 in my browser (short of recompiling my own iceweasel package) ?

Can somebody please explain the situation and why it arose ?

EDIT:

I have all necessary packages installed:

gstreamer0.10-ffmpeg
libx264-123
libavutil51
libavformat53
libavcodec53
gstreamer0.10-plugins-good
chromium-browser
share|improve this question
1  
After installing these packages did you enable gstream support in about:config "media.gstreamer.enabled"? –  alpertek Aug 18 at 8:50
1  
@alpertek - as stated in my original question, firefox has been compiled with --disable-gstreamer. Therefore, there is no option media.gstreamer.enabled in about:config and even if you create it and set to enabled, it would have no effect. –  Martin Vegter Aug 18 at 9:35
    
On Arch with FF31.0, compiled with --enable-gstreamer=1.0 and set with media.gstreamer.enabled to true, only HTMLVideoElements and WebM VP8 are supported. I can still select the html5 player but seems I'm limited to 360p at playback - but it does play. –  Amphiteóth Aug 22 at 21:12

5 Answers 5

It seems that Iceweasel had GStreamer support disabled in 24.5 (details) due to dependency issues.

You have a few options here.

  1. Install non-libre Firefox via packages. There is a good rundown on how to do that here - see the accepted answer.

  2. Install Iceweasel from source. alpertek has already covered that very comprehensively.

  3. Switch from the stable version of Debian (wheezy) to testing or unstable. The newer Iceweasel (version 29+) packages seem to be using GStreamer 1.0 now and GStreamer support has been re-enabled per the changelog. You could consider pinning the newer version of IceWeasel from the testing or unstable repository, but I think you'd very quickly enter dependency hell, so can't recommend that.

share|improve this answer

This may not be the best solution but here is how i recompiled iceweasel:

Firstly install build essentials package:

sudo apt-get install build-essential

Then get the source files of iceweasel:

apt-get source iceweasel

This will download source files. After uncompresing there will be a folder iceweasel-[version]. Enter the folder. Install build dependencies for iceweasel:

sudo apt-get build-dep iceweasel

Install devscript which we will use to recompile iceweasel package:

sudo apt-get install devscripts

Because we enabled gstream we must install gstream dependencies too:

sudo apt-get install libgstreamer0.10 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

Change --disable-gstreamer option as --enable-gstreamer in following files:

debian/xulrunner.mozconfig
debian/browser.mozconfig

After all I was getting an error as :"Could not detect environment shell!" So I added a line: os.environ['SHELL']='/bin/bash' to python/mach/mach/nixin/process.py to line 22 just before: if 'SHELL' in os.environ:

After all of these steps, run:

debuild -i -us -uc -b

After a long long compiling process if everything goes well the deb packages will be created. Remove iceweasel, xulrunner and libmojjs24d packages and install newly created deb packages. For me it was:

sudo dpkg -i iceweasel_24.7.0esr-1~deb7u1_amd.deb
sudo dpkg -i libmozjs24d_24.7.0esr-1~deb7u1_amd.deb
sudo dpkg -i xulrunner-24.0_24.7.0esr-1~deb7u1_amd.deb

Then when you open iceweasel again gstream must be enabled in about:buildconfig:

gstream enabled about:buildconfig

Now as I stated in comments enable gstream support in about:config "media.gstreamer.enabled":

enable gstream at about:config

And final result:

youtube as gstream enabled

Hope it will work!

share|improve this answer

By default Firefox does not support H.264. Instead firefox uses system's default decoders to play h.264 encoded HTML5 videos.

So you have installed the necessary packages but the ffmpeg package provided by Debian repositories doesn’t support H.264 due to patent restrictions.

Adding Non-Free sources and update:-

echo "deb http://www.deb-multimedia.org squeeze main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring
apt-get update

Remove default ffmpeg and install ffmpeg and x264

apt-get remove ffmpeg
apt-get install ffmpeg x264

More detailed steps are given here.

share|improve this answer
    
It should be obvious from my original post, that I already have all the necessary codecs (packages), and that h.624 plays fine in chrome. As long as firefox is compiled with --disable-gstreamer, no installation of additional packages is going to make any difference. –  Martin Vegter Aug 18 at 10:06

You may want to upgrade to Firefox 26, and I do mean Firefox. Mozilla has been involved in a legal battle with MPEG-LA (the copyright holders of H.264, including MPEG/2/3/4) since at least 2010. Perhaps the Iceweasel fork doesn't have Mozilla's weight when it comes to licensing agreements, perhaps patented codecs go against the Iceweasel/Debian ideology.

Whereas Chrome and MPEG-LA settled last year, sort of. Unfortunately, the adoption of WebM, the opensource alternative to the patent-laden H.264 codec has been slow. It's all a terribly confusing, patent trolling mess, and we end-users of these programs are more or less at the end of the chain, so that is the situation, and greed is pretty much why it arose.

Enough history, now for the fix (not tested personally, found answer on the 'net, use with caution), this is according to bugzilla. "Enable GStreamer in official builds" has been a known bug since at least 2012, apparently.

The following is an excerpt of interest from https://bugzilla.mozilla.org/show_bug.cgi?id=794282:

To enable H.264 in Debian Firefox 24/25 (Iceweasel) build you must install

apt-get install gstreamer0.10-plugins-good gstreamer0.10-ffmpeg

and enable gstream support in about:config "media.gstreamer.enabled" according to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682917

Using Firefox 24.1 on fully patched Slackware 14.1 = HTML5/Youtube works here. YMMV.

share|improve this answer
    
the bugzilla link "Enable GStreamer", which you mention, presupposes that the browser has gstreamer support compiled in. This is not my case, as stated in the original post (i.e., --disable-gstreamer) –  Martin Vegter Aug 18 at 11:37
    
Debian is vehemently against closed-source and non-free software and none of it will be enabled by default, as others have stated. If you dont want to recompile, your options are as follows: 1) install the "System Video" plugin addons.mozilla.org/en-US/firefox/addon/system-video/?src=search 2) install ffmpeg with H.264 support from a non-free Debian repository; or 3) install binary version of Iceweasel with H.264 pre-compiled in. –  luunix Aug 18 at 18:04
    
[I am confused why this is disabled. Is this a technical reason, or a "license/free software" issue] This is definitely a FOSS/free opensource software issue, and I believe I answered that earlier. –  luunix Aug 18 at 18:21

Try installing the x264 package:

# apt-get install x264
share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  garethTheRed Aug 17 at 19:26
    
@garethTheRed This does provide an answer to the question. Sometimes the answer is just short. I can't think of any way this answer could be elaborated. If the issue is simply a missing package, you install the package. –  Patrick Aug 17 at 20:42
    
@Patrick But doesn't the question ask why H264 is disabled in Iceweasel? –  garethTheRed Aug 17 at 20:58
    
@Patrick - this is not a solution to my problem, nor does it address my question –  Martin Vegter Aug 18 at 8:26
1  
@MartinVegter Then don't accept it :-) –  Patrick Aug 18 at 12:46

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.