You are not logged in.

#1 2015-12-03 10:03:11

Compizfox
Member
Registered: 2015-08-06
Posts: 12

[SOLVED] No h264 playback in Firefox since a few weeks

Hi,

HTML5 video playback in Firefox worked beautifully on my laptop, until a few weeks back. I suppose some update broke it. Since then, most (but not all) videos on YouTube don't play anymore. I get the very descriptive error message "An Error Occurred, Please Try Again Later". It's not specific to YouTube; html5 videos on other website don't play either.

After some testing, I narrowed down the problem to h264 playback. WebM and Ogg Theora work fine, but h264 doesn't.

I have the relevant gstreamer-packages installed. https://youtube.com/html5 shows 6 blue checkmarks, including the one for h264. Nevertheless, it doesn't work.  The OpenH264 plugin by Cisco is installed.

I can't remember I changed something which might have caused this.

I run Firefox Beta (from the AUR), currently version 43.

Last edited by Compizfox (2015-12-09 19:48:36)

Offline

#2 2015-12-03 10:12:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,871

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Compizfox wrote:

I run Firefox Beta (from the AUR), currently version 43.

Afaik, Firefox 43 is slated to replace gstreamer with plain ffmpeg and support for that is still in development so there might as well be issues related to that (and/or you compiled without ffmpeg support)

Offline

#3 2015-12-05 15:26:49

Compizfox
Member
Registered: 2015-08-06
Posts: 12

Re: [SOLVED] No h264 playback in Firefox since a few weeks

V1del wrote:
Compizfox wrote:

I run Firefox Beta (from the AUR), currently version 43.

Afaik, Firefox 43 is slated to replace gstreamer with plain ffmpeg and support for that is still in development so there might as well be issues related to that (and/or you compiled without ffmpeg support)

Hmm, what about the Cisco h264 codec? Shouldn't that be enough?

Offline

#4 2015-12-05 15:32:13

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED] No h264 playback in Firefox since a few weeks

The Cisco plugin is used exclusively for WebRTC, it's not capable of handling HTML5 video.

Gstreamer code is still in Firefox I think, even though they're indeed switching to ffmpeg, as V1del states. Go into about:config, you should be able to disable ffmpeg and enable gstreamer there. Or maybe the problem is that both are activated.

Another thing, do you by any chance have ffmpeg-git installed? Firefox doesn't support that yet, you need to use the 2.8.x release.

Offline

#5 2015-12-05 15:49:19

Compizfox
Member
Registered: 2015-08-06
Posts: 12

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Gusar wrote:

The Cisco plugin is used exclusively for WebRTC, it's not capable of handling HTML5 video.

Oh, I genuinely thought it was for h264 video playback.

Gstreamer code is still in Firefox I think, even though they're indeed switching to ffmpeg, as V1del states. Go into about:config, you should be able to disable ffmpeg and enable gstreamer there. Or maybe the problem is that both are activated.

Both media.fragmented-mp4.ffmpeg.enabled and media.gstreamer.enabled were true. Disabling one of them doesn't change anything.

Another thing, do you by any chance have ffmpeg-git installed? Firefox doesn't support that yet, you need to use the 2.8.x release.

No, I have ffmpeg 2.8.3 installed.

BTW, unrelated question: how does h264 playback in Firefox on Windows work if it's handled by gstreamer/ffmpeg on Linux? AFAIK Windows doesn't have a h264 decoder by default, most software that play h264 (like VLC) have built-in codecs.

Last edited by Compizfox (2015-12-05 16:13:28)

Offline

#6 2015-12-09 17:16:09

luckybc
Member
Registered: 2014-04-25
Posts: 55

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Here the solution,
1) Open the terminal

$ sudo pacman -S gst-plugins-ugly gst-libav ## If you don't have

2) Open firefox,

Enable MSE & H.264

A new preference in Firefox Nightly 34 changes that however, so that support for all requested technologies is provided afterwards on YouTube.
Note: While the article concentrates on Google's video hosting platform, enabling support for MSE & H.264 will benefit users of the browser on other websites as well.
You need to create a new preference to do so:

    Type about:config and hit enter.
    Confirm you will be careful.
    Right-click and select New > Boolean.
    Name the preference

media.mediasource.ignore_codecs

    Set its value to True.

Update: Linux userrs may change the following preferences as well:

    media.mediasource.mp4.enabled to true
    media.fragmented-mp4.* to true
    media.fragmented-mp4.use-blank-decoder to false

3) Close and restart firefox, go to youtube.com/html5 you will see the label H.264 now is checked !

The source link

Last edited by luckybc (2015-12-09 17:27:07)

Offline

#7 2015-12-09 17:51:08

Compizfox
Member
Registered: 2015-08-06
Posts: 12

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Thanks for your reply.

I already have both of these packages. *media.mediasource.mp4.enabled*, and *media.fragmented-mp4.* were set to true as well. Also, the h264 label at youtube.com/html5 was always already checked.

However, while poking around in *media.fragmented-mp4* settings, I found that *media.fragmented-mp4.gmp.enabled* was user-set to true. I set it to false and now h264 playback is working again! I have no idea what it does, but apparently that was the problem.

Offline

#8 2015-12-09 18:23:41

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED] No h264 playback in Firefox since a few weeks

gmp = Gecko Media Plugins. This setting enables the use of Adobe Primetime for decoding of all videos, not just DRM ones (the primary purpose of Adobe Primetime is DRM). But there's no Adobe Primetime for Linux yet.

Last edited by Gusar (2015-12-09 18:24:14)

Offline

#9 2015-12-09 18:25:23

Compizfox
Member
Registered: 2015-08-06
Posts: 12

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Ah, right. That clears things up.

I have no idea why that setting was set to true. I don't remember setting it myself.

Offline

#10 2015-12-09 19:30:02

luckybc
Member
Registered: 2014-04-25
Posts: 55

Re: [SOLVED] No h264 playback in Firefox since a few weeks

Are you missing the mark, [SOLVED] on the title ?

Offline

Board footer

Powered by FluxBB