How do I get HTML5 h.264 Video working on Firefox?H264 firefox standalone on Ubuntu 14.10How do I install the ubuntu-restricted-extras package?Firefox html5 video supportIn youtube, There are just 360p and 720p options .(no 240p,480p and 1080p)ubuntu 14.04 wont play amazon prime videos in fierfox anymoreFirefox h264 (mp4) HTML not working after upgradeFireofx 57.0a1 64-bit - YouTube HTML5 Video PlayerHTML5 for Firefox 46.0.1 Ubuntu 12.04.5 LtsHow to play MPEG-4 videos on Firefox on Ubuntu 18.10?Can I revert to a normal Google broswer instead of the streamlined 'Ubuntu Start Page'Firefox html5 video supportI have trouble playing youtube videos on Firefox using GnashYouTube annotations not working on Firefox 33.0 (Kubuntu 14.10)Firefox Becomes Unstable Playing Youtube VideosHTML5 as default for video in Firefox (and banishing flash!)Firefox does not play YouTube HTML5 videosfirefox / html5 video /wifiI cannot watch streaming video with firefox 47.0 on 14.04Fireofx 57.0a1 64-bit - YouTube HTML5 Video Player
What fields between the rationals and the reals allow a good notion of 2D distance?
Is my low blitz game drawing rate at www.chess.com an indicator that I am weak in chess?
The Digit Triangles
Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?
Can you use Vicious Mockery to win an argument or gain favours?
Find the next value of this number series
Will number of steps recorded on FitBit/any fitness tracker add up distance in PokemonGo?
Change the color of a single dot in `ddot` symbol
What is the difference between lands and mana?
Giving feedback to someone without sounding prejudiced
Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?
Does "he squandered his car on drink" sound natural?
Is it allowed to activate the ability of multiple planeswalkers in a single turn?
How can I write humor as character trait?
Which was the first story featuring espers?
What (the heck) is a Super Worm Equinox Moon?
Creating two special characters
A variation to the phrase "hanging over my shoulders"
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
PTIJ: Why is Haman obsessed with Bose?
How could a planet have erratic days?
Review your own paper in Mathematics
Does the Linux kernel need a file system to run?
Multiplicative persistence
How do I get HTML5 h.264 Video working on Firefox?
H264 firefox standalone on Ubuntu 14.10How do I install the ubuntu-restricted-extras package?Firefox html5 video supportIn youtube, There are just 360p and 720p options .(no 240p,480p and 1080p)ubuntu 14.04 wont play amazon prime videos in fierfox anymoreFirefox h264 (mp4) HTML not working after upgradeFireofx 57.0a1 64-bit - YouTube HTML5 Video PlayerHTML5 for Firefox 46.0.1 Ubuntu 12.04.5 LtsHow to play MPEG-4 videos on Firefox on Ubuntu 18.10?Can I revert to a normal Google broswer instead of the streamlined 'Ubuntu Start Page'Firefox html5 video supportI have trouble playing youtube videos on Firefox using GnashYouTube annotations not working on Firefox 33.0 (Kubuntu 14.10)Firefox Becomes Unstable Playing Youtube VideosHTML5 as default for video in Firefox (and banishing flash!)Firefox does not play YouTube HTML5 videosfirefox / html5 video /wifiI cannot watch streaming video with firefox 47.0 on 14.04Fireofx 57.0a1 64-bit - YouTube HTML5 Video Player
According the the release notes for Firefox 26, h.264 video should now be working in Linux. It does also say the appropriate gstreamer plug-ins need to be installed. Does anyone know what these are?
I used this test site and the YouTube HTML5 page to verify that h.264 support works in Google Chrome on my Ubuntu 12.04 64-bit, but does not work on Firefox 26.
firefox gstreamer
|
show 1 more comment
According the the release notes for Firefox 26, h.264 video should now be working in Linux. It does also say the appropriate gstreamer plug-ins need to be installed. Does anyone know what these are?
I used this test site and the YouTube HTML5 page to verify that h.264 support works in Google Chrome on my Ubuntu 12.04 64-bit, but does not work on Firefox 26.
firefox gstreamer
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to setmedia.gstreamer.enabled
to true inabout:config
.
– falconer
Dec 11 '13 at 21:04
I don't have that inabout:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(
– Wilf
Dec 11 '13 at 21:56
1
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23
|
show 1 more comment
According the the release notes for Firefox 26, h.264 video should now be working in Linux. It does also say the appropriate gstreamer plug-ins need to be installed. Does anyone know what these are?
I used this test site and the YouTube HTML5 page to verify that h.264 support works in Google Chrome on my Ubuntu 12.04 64-bit, but does not work on Firefox 26.
firefox gstreamer
According the the release notes for Firefox 26, h.264 video should now be working in Linux. It does also say the appropriate gstreamer plug-ins need to be installed. Does anyone know what these are?
I used this test site and the YouTube HTML5 page to verify that h.264 support works in Google Chrome on my Ubuntu 12.04 64-bit, but does not work on Firefox 26.
firefox gstreamer
firefox gstreamer
edited Dec 22 '14 at 14:51
Braiam
52.4k20138223
52.4k20138223
asked Dec 11 '13 at 20:48
HarlemSquirrelHarlemSquirrel
1,83262537
1,83262537
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to setmedia.gstreamer.enabled
to true inabout:config
.
– falconer
Dec 11 '13 at 21:04
I don't have that inabout:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(
– Wilf
Dec 11 '13 at 21:56
1
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23
|
show 1 more comment
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to setmedia.gstreamer.enabled
to true inabout:config
.
– falconer
Dec 11 '13 at 21:04
I don't have that inabout:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(
– Wilf
Dec 11 '13 at 21:56
1
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to set
media.gstreamer.enabled
to true in about:config
.– falconer
Dec 11 '13 at 21:04
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to set
media.gstreamer.enabled
to true in about:config
.– falconer
Dec 11 '13 at 21:04
I don't have that in
about:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(– Wilf
Dec 11 '13 at 21:56
I don't have that in
about:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(– Wilf
Dec 11 '13 at 21:56
1
1
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23
|
show 1 more comment
5 Answers
5
active
oldest
votes
For 12.04 / 14.04 / 18.10
Just visited the HTML5 Youtube test and I have H.264 checked; you probably will need to install Ubuntu restricted extras to get the gstreamer codecs.
sudo apt-get install ubuntu-restricted-extras
You may need to restart.
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packagesflashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
|
show 1 more comment
For 14.04
The solutions above are not working anymore with Trusty Tahr 14.04.
The reason for this is the package gstreamer0.10-ffmpeg has been replaced by gstreamer1.0-libav but Firefox is planning to support gstreamer 1.0 only with version 30.
So in the meantime you can install the gstreamer0.10-ffmpeg from saucy for your appropriate architecture here :
- https://launchpad.net/~mc3man/+archive/trusty-media
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
Firefox 30 is now in uptopic -proposed & supports .h264 thrugstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0
– doug
Jun 1 '14 at 18:05
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
|
show 1 more comment
Firefox 33 and beyond
Mozilla added support for OpenH264 as a plugin in Firefox 33. To enable this plugin Firefox will now automatically download a binary from the OpenH264 website the first time you start the program.
That sounds great, doesn't it? Wait… that was a pun.
While this is indeed a very convenient solution it should also raise privacy and security concerns when software automatically downloads binaries from sites affiliated with Cisco Systems or other companies, no matter how transparent the process and license agreement is.
Not directly related but if you prefer to automatically delete cookies when Firefox gets closed and can't find the right cookie to keep for persistent HTML5 playback then I suggest to install YouTube ALL HTML5.
Tests with 14.04.2 and 15.04 VMs
My guess was that only installing an H.264 decoder binary wouldn't be enough, so I set up 2 new virtual machines:
- Ubuntu 14.04.2 with restricted addons installed during installation
- Ubuntu 15.04 without restricted addons installed during installation
After the installation of both VMs was completed I booted the systems, updated them again, installed VM guest additions, started Firefox for the first time and rebooted for the actual testing.
Since YouTube also offers their open sourced WebM formats and I wanted to avoid going into to much detail about test methods I needed to use another HTML5 capable site to test proprietary H.264 playback support. I chose Vimeo, because they say they default to HTML5 and they don't seem to support WebM, which I consider not to be a good thing.
Whenever I made some changes in the test, like installing a package or enabling/disabling something in Firefox I closed and launched Firefox again.
14.04.2 with restricted addons
As you can see in this screenshot only the OpenH264 plugin is enabled in Firefox, all the necessary GStreamer packages in different versions are preinstalled and the video plays as expected.
15.04 without restricted addons
As you can see in this screenshot the OpenH264 plugin is enabled, there is no Flash plugin, a few GStreamer packages in different versions are preinstalled but the video does not play! Instead the site immediately tells us that the video can't be played. Why is that?
- AAC is missing! – To put an explanation simple, there is a file on the server that is fed into our browser. If you look for it using the inspector from the context menu in Firefox, you will find an MP4 with AAC-encoded audio. The error message could be more clear but it makes sense since we don't have a decoder for AAC currently installed.
Update: Looking again into this issue with Firefox 41, I found that OpenH264 seems to be disabled in about:config through:
media.fragmented-mp4.exposed;false
media.fragmented-mp4.gmp.enabled;falseSetting these to
true
had no effect. Further settings I tried:media.audio_data.enabled;true
no effect.media.mediasource.enabled;true
Vimeo didn't use MSE before, enabling these and related settings had no effect.media.fragmented-mp4.use-blank-decoder;true
result: a solid green canvas and a constant sine wave audio signal.
15.04 with restricted addons
A smart approach would have been to install gstreamer1.0-plugins-bad-faad
, but this doesn't make the particular error message on Vimeo go way, so let's install all the restricted addons.
As expected, everything works if you install the restricted addons package afterwards, but you may want to set the Flash plugin to something else than enabled
in Firefox to be sure to use HTML5 video.
Analysis or just make it break
Apparently gstreamer1.0-libav
is the only package you need to remove to get the error message back. So it was using libav's AAC decoder? I didn't dig deeper to find proof for that nor did I look for which decoder will be preferred (e.g. if OpenH264 is of any use currently on Linux) or if Vimeo throws this error message due to some other dependency not being met despite H.264 and AAC decoders being installed.
Summary and outlook
To sum it up, playback of current mainstream content does not only require an H.264 decoder but also an AAC decoder and H.265 is already preparing to replace the older one. Also I don't see the corresponding specification for MP4s with H.264 to be changed towards recommending a more open source friendly audio codec in the foreseeable future.
Seriously, push for WebM! You get VP8 + Vorbis as the H.264/AVC contender and VP9 + Opus as the H.265/HEVC contender.
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
add a comment |
Firefox currently uses OpenH264 only for WebRTC and not for the video tag, because OpenH264 does not yet support the high profile format frequently used for streaming video.
Source: http://andreasgal.com/2014/10/14/openh264-now-in-firefox/
gstreamer1.0-libav
is probably the only option to add support for the H264 HTML5 video tag in Firefox for Linux.
add a comment |
With Firefox30 you have to install gstreamer 1.0. You should also install most of the plugins : bad,ugly,...
Don't get confuse by the package name, you should install : gstreamer1, not gstreamer (the one/1 number is as part of the package and not a "version"). The same rules apply for all plugins : "gstreamer1-plugins-..."
Here's a more complete url to test your browser html5 capabilities and codec support :
http://html5test.com/
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f389437%2fhow-do-i-get-html5-h-264-video-working-on-firefox%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
For 12.04 / 14.04 / 18.10
Just visited the HTML5 Youtube test and I have H.264 checked; you probably will need to install Ubuntu restricted extras to get the gstreamer codecs.
sudo apt-get install ubuntu-restricted-extras
You may need to restart.
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packagesflashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
|
show 1 more comment
For 12.04 / 14.04 / 18.10
Just visited the HTML5 Youtube test and I have H.264 checked; you probably will need to install Ubuntu restricted extras to get the gstreamer codecs.
sudo apt-get install ubuntu-restricted-extras
You may need to restart.
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packagesflashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
|
show 1 more comment
For 12.04 / 14.04 / 18.10
Just visited the HTML5 Youtube test and I have H.264 checked; you probably will need to install Ubuntu restricted extras to get the gstreamer codecs.
sudo apt-get install ubuntu-restricted-extras
You may need to restart.
For 12.04 / 14.04 / 18.10
Just visited the HTML5 Youtube test and I have H.264 checked; you probably will need to install Ubuntu restricted extras to get the gstreamer codecs.
sudo apt-get install ubuntu-restricted-extras
You may need to restart.
edited 3 hours ago
Jack
1,13921521
1,13921521
answered Dec 11 '13 at 20:51
xanguaxangua
6,57442226
6,57442226
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packagesflashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
|
show 1 more comment
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packagesflashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
2
2
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packages
flashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
That did the trick! So simple! I thought I already installed that...silly me. The ubuntu-restricted-extras package installed the following packages
flashplugin-installer gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse libfaac0 libmjpegtools-1.9 libnspr4-0d libnss3-1d liboil0.3 ubuntu-restricted-addons
– HarlemSquirrel
Dec 11 '13 at 21:00
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
Same is true for 14.04
– Rael Gugelmin Cunha
Nov 27 '15 at 23:26
1
1
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Worked on 16.04 too!
– Rael Gugelmin Cunha
Mar 25 '16 at 13:45
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):
sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
Confirmed this works for 16.04 as well. Note that if you have installed the 32-bit Firefox (unusual) you MUST install the i386 version of the gstreamer library as well (32-bit Firefox can't use the 64-bit library):
sudo apt-get install libavformat-ffmpeg56:i386 libavfilter-ffmpeg5:i386 gstreamer1.0-libav:i386
– Nate Lampton
Jun 11 '16 at 0:33
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
How to get it without installing flash?
– Gringo Suave
Oct 19 '16 at 3:12
|
show 1 more comment
For 14.04
The solutions above are not working anymore with Trusty Tahr 14.04.
The reason for this is the package gstreamer0.10-ffmpeg has been replaced by gstreamer1.0-libav but Firefox is planning to support gstreamer 1.0 only with version 30.
So in the meantime you can install the gstreamer0.10-ffmpeg from saucy for your appropriate architecture here :
- https://launchpad.net/~mc3man/+archive/trusty-media
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
Firefox 30 is now in uptopic -proposed & supports .h264 thrugstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0
– doug
Jun 1 '14 at 18:05
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
|
show 1 more comment
For 14.04
The solutions above are not working anymore with Trusty Tahr 14.04.
The reason for this is the package gstreamer0.10-ffmpeg has been replaced by gstreamer1.0-libav but Firefox is planning to support gstreamer 1.0 only with version 30.
So in the meantime you can install the gstreamer0.10-ffmpeg from saucy for your appropriate architecture here :
- https://launchpad.net/~mc3man/+archive/trusty-media
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
Firefox 30 is now in uptopic -proposed & supports .h264 thrugstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0
– doug
Jun 1 '14 at 18:05
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
|
show 1 more comment
For 14.04
The solutions above are not working anymore with Trusty Tahr 14.04.
The reason for this is the package gstreamer0.10-ffmpeg has been replaced by gstreamer1.0-libav but Firefox is planning to support gstreamer 1.0 only with version 30.
So in the meantime you can install the gstreamer0.10-ffmpeg from saucy for your appropriate architecture here :
- https://launchpad.net/~mc3man/+archive/trusty-media
For 14.04
The solutions above are not working anymore with Trusty Tahr 14.04.
The reason for this is the package gstreamer0.10-ffmpeg has been replaced by gstreamer1.0-libav but Firefox is planning to support gstreamer 1.0 only with version 30.
So in the meantime you can install the gstreamer0.10-ffmpeg from saucy for your appropriate architecture here :
- https://launchpad.net/~mc3man/+archive/trusty-media
edited Jun 1 '14 at 18:01
doug
14.3k13553
14.3k13553
answered Mar 19 '14 at 12:01
Geoffrey MosiniGeoffrey Mosini
15314
15314
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
Firefox 30 is now in uptopic -proposed & supports .h264 thrugstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0
– doug
Jun 1 '14 at 18:05
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
|
show 1 more comment
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
Firefox 30 is now in uptopic -proposed & supports .h264 thrugstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0
– doug
Jun 1 '14 at 18:05
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
4
4
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
The link now leads to a 404
– Delapouite
Apr 23 '14 at 17:54
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
Geoffrey: Can you add sources to back up your claim that "Firefox is planning to support gstreamer 1.0 only with version 30." Not that I doubt you, but pointing to an authorative source will be helpful for those of us who want to understand this problem.
– Stefan Lasiewski
Apr 27 '14 at 20:01
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
@Delapouite Hello, try using this ppa: launchpad.net/~jon-severinsson/+archive/ffmpeg to download ffmpeg for 14.04
– Akronix
May 3 '14 at 22:30
2
2
Firefox 30 is now in uptopic -proposed & supports .h264 thru
gstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0– doug
Jun 1 '14 at 18:05
Firefox 30 is now in uptopic -proposed & supports .h264 thru
gstreamer1.0-libav
package. At some point it should show up in 14.04 though currently I use the utopic -proposed package in 14.04 with no issues. The 0.10-ffmpeg plugin will remain in ppa for apps that haven't yet ported to gst-1.0– doug
Jun 1 '14 at 18:05
1
1
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
Firefox > 35 works with h264 without any extra ppa in ubuntu 14.04 For Video install gstreamer1.0-libav For Audio install gstreamer1.0-fluendo-mp3
– Mariuz
Jan 16 '15 at 12:43
|
show 1 more comment
Firefox 33 and beyond
Mozilla added support for OpenH264 as a plugin in Firefox 33. To enable this plugin Firefox will now automatically download a binary from the OpenH264 website the first time you start the program.
That sounds great, doesn't it? Wait… that was a pun.
While this is indeed a very convenient solution it should also raise privacy and security concerns when software automatically downloads binaries from sites affiliated with Cisco Systems or other companies, no matter how transparent the process and license agreement is.
Not directly related but if you prefer to automatically delete cookies when Firefox gets closed and can't find the right cookie to keep for persistent HTML5 playback then I suggest to install YouTube ALL HTML5.
Tests with 14.04.2 and 15.04 VMs
My guess was that only installing an H.264 decoder binary wouldn't be enough, so I set up 2 new virtual machines:
- Ubuntu 14.04.2 with restricted addons installed during installation
- Ubuntu 15.04 without restricted addons installed during installation
After the installation of both VMs was completed I booted the systems, updated them again, installed VM guest additions, started Firefox for the first time and rebooted for the actual testing.
Since YouTube also offers their open sourced WebM formats and I wanted to avoid going into to much detail about test methods I needed to use another HTML5 capable site to test proprietary H.264 playback support. I chose Vimeo, because they say they default to HTML5 and they don't seem to support WebM, which I consider not to be a good thing.
Whenever I made some changes in the test, like installing a package or enabling/disabling something in Firefox I closed and launched Firefox again.
14.04.2 with restricted addons
As you can see in this screenshot only the OpenH264 plugin is enabled in Firefox, all the necessary GStreamer packages in different versions are preinstalled and the video plays as expected.
15.04 without restricted addons
As you can see in this screenshot the OpenH264 plugin is enabled, there is no Flash plugin, a few GStreamer packages in different versions are preinstalled but the video does not play! Instead the site immediately tells us that the video can't be played. Why is that?
- AAC is missing! – To put an explanation simple, there is a file on the server that is fed into our browser. If you look for it using the inspector from the context menu in Firefox, you will find an MP4 with AAC-encoded audio. The error message could be more clear but it makes sense since we don't have a decoder for AAC currently installed.
Update: Looking again into this issue with Firefox 41, I found that OpenH264 seems to be disabled in about:config through:
media.fragmented-mp4.exposed;false
media.fragmented-mp4.gmp.enabled;falseSetting these to
true
had no effect. Further settings I tried:media.audio_data.enabled;true
no effect.media.mediasource.enabled;true
Vimeo didn't use MSE before, enabling these and related settings had no effect.media.fragmented-mp4.use-blank-decoder;true
result: a solid green canvas and a constant sine wave audio signal.
15.04 with restricted addons
A smart approach would have been to install gstreamer1.0-plugins-bad-faad
, but this doesn't make the particular error message on Vimeo go way, so let's install all the restricted addons.
As expected, everything works if you install the restricted addons package afterwards, but you may want to set the Flash plugin to something else than enabled
in Firefox to be sure to use HTML5 video.
Analysis or just make it break
Apparently gstreamer1.0-libav
is the only package you need to remove to get the error message back. So it was using libav's AAC decoder? I didn't dig deeper to find proof for that nor did I look for which decoder will be preferred (e.g. if OpenH264 is of any use currently on Linux) or if Vimeo throws this error message due to some other dependency not being met despite H.264 and AAC decoders being installed.
Summary and outlook
To sum it up, playback of current mainstream content does not only require an H.264 decoder but also an AAC decoder and H.265 is already preparing to replace the older one. Also I don't see the corresponding specification for MP4s with H.264 to be changed towards recommending a more open source friendly audio codec in the foreseeable future.
Seriously, push for WebM! You get VP8 + Vorbis as the H.264/AVC contender and VP9 + Opus as the H.265/HEVC contender.
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
add a comment |
Firefox 33 and beyond
Mozilla added support for OpenH264 as a plugin in Firefox 33. To enable this plugin Firefox will now automatically download a binary from the OpenH264 website the first time you start the program.
That sounds great, doesn't it? Wait… that was a pun.
While this is indeed a very convenient solution it should also raise privacy and security concerns when software automatically downloads binaries from sites affiliated with Cisco Systems or other companies, no matter how transparent the process and license agreement is.
Not directly related but if you prefer to automatically delete cookies when Firefox gets closed and can't find the right cookie to keep for persistent HTML5 playback then I suggest to install YouTube ALL HTML5.
Tests with 14.04.2 and 15.04 VMs
My guess was that only installing an H.264 decoder binary wouldn't be enough, so I set up 2 new virtual machines:
- Ubuntu 14.04.2 with restricted addons installed during installation
- Ubuntu 15.04 without restricted addons installed during installation
After the installation of both VMs was completed I booted the systems, updated them again, installed VM guest additions, started Firefox for the first time and rebooted for the actual testing.
Since YouTube also offers their open sourced WebM formats and I wanted to avoid going into to much detail about test methods I needed to use another HTML5 capable site to test proprietary H.264 playback support. I chose Vimeo, because they say they default to HTML5 and they don't seem to support WebM, which I consider not to be a good thing.
Whenever I made some changes in the test, like installing a package or enabling/disabling something in Firefox I closed and launched Firefox again.
14.04.2 with restricted addons
As you can see in this screenshot only the OpenH264 plugin is enabled in Firefox, all the necessary GStreamer packages in different versions are preinstalled and the video plays as expected.
15.04 without restricted addons
As you can see in this screenshot the OpenH264 plugin is enabled, there is no Flash plugin, a few GStreamer packages in different versions are preinstalled but the video does not play! Instead the site immediately tells us that the video can't be played. Why is that?
- AAC is missing! – To put an explanation simple, there is a file on the server that is fed into our browser. If you look for it using the inspector from the context menu in Firefox, you will find an MP4 with AAC-encoded audio. The error message could be more clear but it makes sense since we don't have a decoder for AAC currently installed.
Update: Looking again into this issue with Firefox 41, I found that OpenH264 seems to be disabled in about:config through:
media.fragmented-mp4.exposed;false
media.fragmented-mp4.gmp.enabled;falseSetting these to
true
had no effect. Further settings I tried:media.audio_data.enabled;true
no effect.media.mediasource.enabled;true
Vimeo didn't use MSE before, enabling these and related settings had no effect.media.fragmented-mp4.use-blank-decoder;true
result: a solid green canvas and a constant sine wave audio signal.
15.04 with restricted addons
A smart approach would have been to install gstreamer1.0-plugins-bad-faad
, but this doesn't make the particular error message on Vimeo go way, so let's install all the restricted addons.
As expected, everything works if you install the restricted addons package afterwards, but you may want to set the Flash plugin to something else than enabled
in Firefox to be sure to use HTML5 video.
Analysis or just make it break
Apparently gstreamer1.0-libav
is the only package you need to remove to get the error message back. So it was using libav's AAC decoder? I didn't dig deeper to find proof for that nor did I look for which decoder will be preferred (e.g. if OpenH264 is of any use currently on Linux) or if Vimeo throws this error message due to some other dependency not being met despite H.264 and AAC decoders being installed.
Summary and outlook
To sum it up, playback of current mainstream content does not only require an H.264 decoder but also an AAC decoder and H.265 is already preparing to replace the older one. Also I don't see the corresponding specification for MP4s with H.264 to be changed towards recommending a more open source friendly audio codec in the foreseeable future.
Seriously, push for WebM! You get VP8 + Vorbis as the H.264/AVC contender and VP9 + Opus as the H.265/HEVC contender.
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
add a comment |
Firefox 33 and beyond
Mozilla added support for OpenH264 as a plugin in Firefox 33. To enable this plugin Firefox will now automatically download a binary from the OpenH264 website the first time you start the program.
That sounds great, doesn't it? Wait… that was a pun.
While this is indeed a very convenient solution it should also raise privacy and security concerns when software automatically downloads binaries from sites affiliated with Cisco Systems or other companies, no matter how transparent the process and license agreement is.
Not directly related but if you prefer to automatically delete cookies when Firefox gets closed and can't find the right cookie to keep for persistent HTML5 playback then I suggest to install YouTube ALL HTML5.
Tests with 14.04.2 and 15.04 VMs
My guess was that only installing an H.264 decoder binary wouldn't be enough, so I set up 2 new virtual machines:
- Ubuntu 14.04.2 with restricted addons installed during installation
- Ubuntu 15.04 without restricted addons installed during installation
After the installation of both VMs was completed I booted the systems, updated them again, installed VM guest additions, started Firefox for the first time and rebooted for the actual testing.
Since YouTube also offers their open sourced WebM formats and I wanted to avoid going into to much detail about test methods I needed to use another HTML5 capable site to test proprietary H.264 playback support. I chose Vimeo, because they say they default to HTML5 and they don't seem to support WebM, which I consider not to be a good thing.
Whenever I made some changes in the test, like installing a package or enabling/disabling something in Firefox I closed and launched Firefox again.
14.04.2 with restricted addons
As you can see in this screenshot only the OpenH264 plugin is enabled in Firefox, all the necessary GStreamer packages in different versions are preinstalled and the video plays as expected.
15.04 without restricted addons
As you can see in this screenshot the OpenH264 plugin is enabled, there is no Flash plugin, a few GStreamer packages in different versions are preinstalled but the video does not play! Instead the site immediately tells us that the video can't be played. Why is that?
- AAC is missing! – To put an explanation simple, there is a file on the server that is fed into our browser. If you look for it using the inspector from the context menu in Firefox, you will find an MP4 with AAC-encoded audio. The error message could be more clear but it makes sense since we don't have a decoder for AAC currently installed.
Update: Looking again into this issue with Firefox 41, I found that OpenH264 seems to be disabled in about:config through:
media.fragmented-mp4.exposed;false
media.fragmented-mp4.gmp.enabled;falseSetting these to
true
had no effect. Further settings I tried:media.audio_data.enabled;true
no effect.media.mediasource.enabled;true
Vimeo didn't use MSE before, enabling these and related settings had no effect.media.fragmented-mp4.use-blank-decoder;true
result: a solid green canvas and a constant sine wave audio signal.
15.04 with restricted addons
A smart approach would have been to install gstreamer1.0-plugins-bad-faad
, but this doesn't make the particular error message on Vimeo go way, so let's install all the restricted addons.
As expected, everything works if you install the restricted addons package afterwards, but you may want to set the Flash plugin to something else than enabled
in Firefox to be sure to use HTML5 video.
Analysis or just make it break
Apparently gstreamer1.0-libav
is the only package you need to remove to get the error message back. So it was using libav's AAC decoder? I didn't dig deeper to find proof for that nor did I look for which decoder will be preferred (e.g. if OpenH264 is of any use currently on Linux) or if Vimeo throws this error message due to some other dependency not being met despite H.264 and AAC decoders being installed.
Summary and outlook
To sum it up, playback of current mainstream content does not only require an H.264 decoder but also an AAC decoder and H.265 is already preparing to replace the older one. Also I don't see the corresponding specification for MP4s with H.264 to be changed towards recommending a more open source friendly audio codec in the foreseeable future.
Seriously, push for WebM! You get VP8 + Vorbis as the H.264/AVC contender and VP9 + Opus as the H.265/HEVC contender.
Firefox 33 and beyond
Mozilla added support for OpenH264 as a plugin in Firefox 33. To enable this plugin Firefox will now automatically download a binary from the OpenH264 website the first time you start the program.
That sounds great, doesn't it? Wait… that was a pun.
While this is indeed a very convenient solution it should also raise privacy and security concerns when software automatically downloads binaries from sites affiliated with Cisco Systems or other companies, no matter how transparent the process and license agreement is.
Not directly related but if you prefer to automatically delete cookies when Firefox gets closed and can't find the right cookie to keep for persistent HTML5 playback then I suggest to install YouTube ALL HTML5.
Tests with 14.04.2 and 15.04 VMs
My guess was that only installing an H.264 decoder binary wouldn't be enough, so I set up 2 new virtual machines:
- Ubuntu 14.04.2 with restricted addons installed during installation
- Ubuntu 15.04 without restricted addons installed during installation
After the installation of both VMs was completed I booted the systems, updated them again, installed VM guest additions, started Firefox for the first time and rebooted for the actual testing.
Since YouTube also offers their open sourced WebM formats and I wanted to avoid going into to much detail about test methods I needed to use another HTML5 capable site to test proprietary H.264 playback support. I chose Vimeo, because they say they default to HTML5 and they don't seem to support WebM, which I consider not to be a good thing.
Whenever I made some changes in the test, like installing a package or enabling/disabling something in Firefox I closed and launched Firefox again.
14.04.2 with restricted addons
As you can see in this screenshot only the OpenH264 plugin is enabled in Firefox, all the necessary GStreamer packages in different versions are preinstalled and the video plays as expected.
15.04 without restricted addons
As you can see in this screenshot the OpenH264 plugin is enabled, there is no Flash plugin, a few GStreamer packages in different versions are preinstalled but the video does not play! Instead the site immediately tells us that the video can't be played. Why is that?
- AAC is missing! – To put an explanation simple, there is a file on the server that is fed into our browser. If you look for it using the inspector from the context menu in Firefox, you will find an MP4 with AAC-encoded audio. The error message could be more clear but it makes sense since we don't have a decoder for AAC currently installed.
Update: Looking again into this issue with Firefox 41, I found that OpenH264 seems to be disabled in about:config through:
media.fragmented-mp4.exposed;false
media.fragmented-mp4.gmp.enabled;falseSetting these to
true
had no effect. Further settings I tried:media.audio_data.enabled;true
no effect.media.mediasource.enabled;true
Vimeo didn't use MSE before, enabling these and related settings had no effect.media.fragmented-mp4.use-blank-decoder;true
result: a solid green canvas and a constant sine wave audio signal.
15.04 with restricted addons
A smart approach would have been to install gstreamer1.0-plugins-bad-faad
, but this doesn't make the particular error message on Vimeo go way, so let's install all the restricted addons.
As expected, everything works if you install the restricted addons package afterwards, but you may want to set the Flash plugin to something else than enabled
in Firefox to be sure to use HTML5 video.
Analysis or just make it break
Apparently gstreamer1.0-libav
is the only package you need to remove to get the error message back. So it was using libav's AAC decoder? I didn't dig deeper to find proof for that nor did I look for which decoder will be preferred (e.g. if OpenH264 is of any use currently on Linux) or if Vimeo throws this error message due to some other dependency not being met despite H.264 and AAC decoders being installed.
Summary and outlook
To sum it up, playback of current mainstream content does not only require an H.264 decoder but also an AAC decoder and H.265 is already preparing to replace the older one. Also I don't see the corresponding specification for MP4s with H.264 to be changed towards recommending a more open source friendly audio codec in the foreseeable future.
Seriously, push for WebM! You get VP8 + Vorbis as the H.264/AVC contender and VP9 + Opus as the H.265/HEVC contender.
edited Apr 13 '17 at 12:24
Community♦
1
1
answered Jun 15 '15 at 13:51
LiveWireBTLiveWireBT
21.8k1972156
21.8k1972156
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
add a comment |
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
On 15.04, do you actually have the html5 youtube player working? For me, the video plays, but no sound. I have all of the mentioned packages installed. Using FF 38.
– naught101
Jun 17 '15 at 14:38
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
Very interesting. Could you tell us if installing the audio codec has an effect on the H264 decoding available value on about:support?
– Martin Hansen
Nov 2 '15 at 11:39
add a comment |
Firefox currently uses OpenH264 only for WebRTC and not for the video tag, because OpenH264 does not yet support the high profile format frequently used for streaming video.
Source: http://andreasgal.com/2014/10/14/openh264-now-in-firefox/
gstreamer1.0-libav
is probably the only option to add support for the H264 HTML5 video tag in Firefox for Linux.
add a comment |
Firefox currently uses OpenH264 only for WebRTC and not for the video tag, because OpenH264 does not yet support the high profile format frequently used for streaming video.
Source: http://andreasgal.com/2014/10/14/openh264-now-in-firefox/
gstreamer1.0-libav
is probably the only option to add support for the H264 HTML5 video tag in Firefox for Linux.
add a comment |
Firefox currently uses OpenH264 only for WebRTC and not for the video tag, because OpenH264 does not yet support the high profile format frequently used for streaming video.
Source: http://andreasgal.com/2014/10/14/openh264-now-in-firefox/
gstreamer1.0-libav
is probably the only option to add support for the H264 HTML5 video tag in Firefox for Linux.
Firefox currently uses OpenH264 only for WebRTC and not for the video tag, because OpenH264 does not yet support the high profile format frequently used for streaming video.
Source: http://andreasgal.com/2014/10/14/openh264-now-in-firefox/
gstreamer1.0-libav
is probably the only option to add support for the H264 HTML5 video tag in Firefox for Linux.
edited Jul 14 '15 at 23:18
answered Jul 14 '15 at 23:07
Stéphane TrébouxStéphane Tréboux
1,4301928
1,4301928
add a comment |
add a comment |
With Firefox30 you have to install gstreamer 1.0. You should also install most of the plugins : bad,ugly,...
Don't get confuse by the package name, you should install : gstreamer1, not gstreamer (the one/1 number is as part of the package and not a "version"). The same rules apply for all plugins : "gstreamer1-plugins-..."
Here's a more complete url to test your browser html5 capabilities and codec support :
http://html5test.com/
add a comment |
With Firefox30 you have to install gstreamer 1.0. You should also install most of the plugins : bad,ugly,...
Don't get confuse by the package name, you should install : gstreamer1, not gstreamer (the one/1 number is as part of the package and not a "version"). The same rules apply for all plugins : "gstreamer1-plugins-..."
Here's a more complete url to test your browser html5 capabilities and codec support :
http://html5test.com/
add a comment |
With Firefox30 you have to install gstreamer 1.0. You should also install most of the plugins : bad,ugly,...
Don't get confuse by the package name, you should install : gstreamer1, not gstreamer (the one/1 number is as part of the package and not a "version"). The same rules apply for all plugins : "gstreamer1-plugins-..."
Here's a more complete url to test your browser html5 capabilities and codec support :
http://html5test.com/
With Firefox30 you have to install gstreamer 1.0. You should also install most of the plugins : bad,ugly,...
Don't get confuse by the package name, you should install : gstreamer1, not gstreamer (the one/1 number is as part of the package and not a "version"). The same rules apply for all plugins : "gstreamer1-plugins-..."
Here's a more complete url to test your browser html5 capabilities and codec support :
http://html5test.com/
answered Jun 23 '14 at 14:54
TeenageTeenage
101
101
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f389437%2fhow-do-i-get-html5-h-264-video-working-on-firefox%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I have gstreamer0.10-plugins-good already installed. I am going to try installing gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly
– HarlemSquirrel
Dec 11 '13 at 20:54
Note that this feature is present in Firefox since version 24. The only thing what is changed in 26 that it is now activated by default, previously you had to set
media.gstreamer.enabled
to true inabout:config
.– falconer
Dec 11 '13 at 21:04
I don't have that in
about:config
@falconer - and I have Firefox 25 AND anything beginning with gstreamer :-(– Wilf
Dec 11 '13 at 21:56
1
@wilf That's interesting. For me it works with no problem. But as I read on google it had to be enabled at compile time, and e.g. Fedora didn't allow it in their builds. Are you using FF builds from the official ubuntu repo?
– falconer
Dec 11 '13 at 22:16
While this is definitely not an answer to the question originally asked, I still think it's worth mentioning: HTML5 video, while ideologically better, may result in utterly terrible performance. When using youtube with the HTML5 player, I consistently see the CPU hit 100% no matter which machine I use, and stuttering is frequent. This indicates that there's a whole lot of software-decoding going on. When using the Adobe Flash Player w/HW accelleration[1], I'm getting the expected 10-20% CPU consumption while playing video. If a Core i7 with 12GBs of RAM cannot reliably play back HTML5 vide
– Jostein Kjønigsen
May 3 '14 at 11:23