How to enable MSE & H.264 support on YouTube for Firefox right now - gHacks Tech News

How to enable MSE & H.264 support on YouTube for Firefox right now

When you open YouTube's HTML5 page in the most recent stable version of Firefox right now, you will notice that support is not available for all technologies listed on the page.

Support may be available for HTMLVideoElement, H.264 and WebM VP8, but not for Media Source Extensions, MSE & H.264 or MSE & WebM VP9.

A configuration option is available to enable Media Source Extensions and MSE & WebM VP9 right now in the Firefox browser.

To do so, load about:config in the browser's address bar and search for the term media.mediasource.enabled there. Double-click the preference to set it to true if it is not set to true already.

Then, search for media.mediasource.webm.enabled afterwards and make sure it is set to true as well. If it is not, double-click on it to switch its value to true.

When you go back to YouTube's HMTL5 page afterwards, you will notice that only MSE & H.264 is listed as unsupported while all remaining options are supported.

firefox mse support

If you do not do that, you will only receive select resolutions for videos on YouTube when using the HTML5 video player. This is quite problematic as Google will force Firefox users to use the HTML5 video player from Firefox 33 on.

Mozilla has not enabled the feature by default yet, not even in the most recent Nightly version of Firefox. This is an indicator that the feature is not yet ready for prime time and that it may take a couple of release cycles before it will be enabled by default.

Most video resolutions become available after you enable Media Source Extensions in Firefox. What is still not supported afterwards however is MSE & H.264 which means that some videos may not play in all resolutions yet on the site.

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:

  1. Type about:config and hit enter.
  2. Confirm you will be careful.
  3. Right-click and select New > Boolean.
  4. Name the preference media.mediasource.ignore_codecs.
  5. Set its value to True.

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

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

If you go back to YouTube's HTML page, you should see all six technologies listed as supported (in green).

firefox mse h264 support

Several bugs need to be resolved before the feature will be enabled directly by Mozilla for all users of the browser. You can check out the mediasource progress here.

This means that you may get hangs or experience other issues after enabling mp4 container support for Media Source Extensions in the browser.

Still, it is great to see that Mozilla is working on support for the feature in Firefox. It is unclear if it will manage to resolve all issues before Firefox 33 gets released, as it may result in an increase in support requests when Firefox users notice that YouTube is serving them only some resolutions.

Summary
How to enable MSE & H2.64 support on YouTube for Firefox right now
Article Name
How to enable MSE & H2.64 support on YouTube for Firefox right now
Description
Mozilla has enabled support for H.264 Media Source Extensions in Firefox 34. Find out how to enable the feature in Firefox right now.
Author
Publisher
Ghacks Technology News
Logo

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. EuroScept1C said on July 25, 2014 at 4:56 pm
    Reply

    Right now best way to see videos on Youtube: IE11 and go to Safety-> ActiveX Filtering and enable it. It will play ALL videos on mp.4 format with DASH enabled, 1080p support and all. The most efficient way.

    1. Rofl said on October 17, 2014 at 8:54 am
      Reply

      IE, are you crazy?

      1. Lofty said on November 1, 2014 at 8:50 am
        Reply

        Software has no opinion. Only people do. Such as yours.

    2. lofr said on February 9, 2015 at 2:16 am
      Reply

      install user agent switcher and set it to IE 11

    3. RandomGuy said on April 3, 2016 at 4:06 am
      Reply

      Thank you man, you really helped me out with that hint.
      Actually in my case it’s a problem with playing videos on YouPorn (and it’s partner sites) I have trouble with for the last couple of months (I don’t remember when this first came up). lol…

      The video starts playing fine, but this lasts only for a couple of minutes. Then the video just stops (sometimes just the video track, while the audio proceeds playing), also the minute counter keeps it’s value.
      At some point, a couple of minutes before video ends, it starts playing fine again. It’s a strange behaviour, in addition seeking does not work.

      I’m running Firefox ESR 38.7.1 on Windows 7. No Flash installed, so just HTML5 is used.
      And there was a time in the past where the videos played flawlessly on that system.

      So I tried enabling the media.mediasource.webm.enabled flag, explained above, but this didn’t change anything.
      For me it never came to mind trying Internet Explorer 11. … Just did this –> no issue there.

      So as a workaround I decided to (temporarily) change my user agent in Firefox to that one that IE11 uses.
      Works like a charm!

  2. pd said on July 25, 2014 at 7:54 pm
    Reply

    Running Aurora on Windows XP, I still don’t have the Cisco h.264 codec. Any way to enable that?

    1. Martin Brinkmann said on July 25, 2014 at 8:07 pm
      Reply

      Not yet, it appears to be only available in Nightly right now.

  3. geeknik said on July 26, 2014 at 1:27 am
    Reply

    MSE on YouTube still doesn’t work properly. Seeking sometimes takes a lot of time, seeking back doesn’t work at all and repeat also doesn’t work. Just because you can flip the switch doesn’t mean you’re going to get MSE & H.264 support because according to a Mozilla developer, MP4 (H.264, etc.) aren’t supported in MSE yet. They are concentrating on Webm on YouTube right now.

    Relevant bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=881512, https://bugzilla.mozilla.org/show_bug.cgi?id=1024858

    My advice, don’t force enable MSE for now unless you want a lot of YouTube headaches. ;)

  4. marius t said on July 26, 2014 at 9:48 am
    Reply

    No thanks I’ll still use flash untill it really dies,my motto if it works don’t mess with it!I’ll force flash player with Youtube Center if I have to!

  5. Aramir said on September 1, 2014 at 10:47 am
    Reply

    I did that and lost sound on youtube videos …. No thanks

    1. vita said on December 20, 2014 at 11:34 am
      Reply

      i lost sound too. how to fix it?

  6. bedsitter said on September 19, 2014 at 8:54 pm
    Reply

    I’ve done this under Firefox 32.02, but MSE & H.264 is still signed red.
    Don’t know why this works for the author…

    1. Petre said on September 22, 2014 at 12:26 am
      Reply

      It’s the same for me under Ubuntu

  7. pd said on October 30, 2014 at 1:46 pm
    Reply

    The CISCO h.264 codec is in my plugin list now.

    I’ve added the media.mediasource.ignore_codecs true boolean

    On this page: https://www.youtube.com/html5

    only HTMLVideoElement and WebM VP8 are available.

    So I’ve got a CISCO h.264 codec, the Flash plugin would have h.264 support, but YouTube thinks I can’t play h.264 videos. WTF? :)

    I’m keen to get rid of the crappy Flash plugin if I can finally use the HTML video tag with the CISCO h.264 codec.

    1. Martin Brinkmann said on October 30, 2014 at 2:23 pm
      Reply

      The Cisco plugin is currently only being used for WebRTC as far as I know.

  8. pd said on October 30, 2014 at 2:29 pm
    Reply

    Ah nuts. Flipping Mozilla sure know how to make life hard on their users!

    1. Rick said on July 17, 2017 at 10:47 pm
      Reply

      Worked 1 time before something disabled it again. F it back to Opera 36

  9. Jay said on November 15, 2014 at 1:01 am
    Reply

    MSE works fine as far as I can tell. But I can see why they hid “ignore_codecs” from the config page. 1080p playback just stops playing randomly, and 720p keeps glitching, freezing, and occasionally the audio stops working. Hope Mozilla can sort this out soon as I really want to play 60fps in Firefox. For now I have to use ‘youtube-dl -g’ to grab the URLs for 60fps streams so I can watch them in VLC, or open Chrome.

    Firefox Developer Edition 35.0a2 (2014-11-14)

    EDIT: Slight correction. With MSE enabled, some 60fps videos do work with FF as they have WEBM 60fps streams, but playback is sporadic/laggy and not very watchable. Chrome plays the same videos fine at 60fps so it’s not my PC’s fault.

  10. Hisham said on January 5, 2015 at 7:53 pm
    Reply

    Thank you :)

  11. Remi said on January 7, 2015 at 1:23 pm
    Reply

    Do not add the value to ignore codecs in “about:config”. You’ll lose sound in Youtube-Videos !

  12. Marc Aurel said on February 14, 2015 at 4:16 pm
    Reply

    Running FF 35.01 in Windows 7 and MSE still doesn’t work properly. Sound is sometimes lost and seeking back does not work, so no change from earlier, although Mozilla claims most of the bugs fixed now. Perhaps the nightly builds would work.

    Enabling MSE also causes Youtube to offer VP9 streams to FF by default, which means that you will lose hardware acceleration with most GPUs. That happens even with “ignore_codecs” enabled. With a modern CPU that is not a problem, but it certainly is on my secondary system with an older processor. 720p is choppy and 1080p is a slide show.

    1. Jay said on February 14, 2015 at 4:28 pm
      Reply

      MSE is working near flawlessly in FF37, so it’ll trickle down soon. I have none of the issues you mention in the latest DE build.

      PS: You can disable WebM support by disabling the following flag: “media.mediasource.webm.enabled”

      1. Marc Aurel said on February 16, 2015 at 3:02 am
        Reply

        Thanks for your answer. Good to know that it’s improving. Do you know if they are going to enable MSE by default in FF37?

    2. Jay said on February 16, 2015 at 7:24 am
      Reply

      Seems the plan is to have MSE enabled in FF36, but limited to Youtube and only Windows 7+(maybe Mac as well). It seems they are still having issues with MSE+MP4 on Linux, and MSE+WEBM still isn’t completely ready. Seems full MSE support will hit in FF37, but EME doesn’t seem ready yet so support for services like Netflix will likely still be awhile.

      NOTE: This is what I’ve gathered by reading the Bug Tracker, but there are hundreds of different bugs and issues being tracked related to MSE and EME making it hard to be sure, so things could always be delayed.

  13. hugh said on April 1, 2015 at 5:27 am
    Reply

    Hi Martin,

    I’m missing something here about the youtube html page.

    https://www.dropbox.com/s/p2dmdzl4et97wcf/not_enabled.jpg?dl=0

    I’ve managed since taking the screenshot to to enable the MSE & WebM VP9 after finding an older post of yours.

    However The remaining two H.264 and MSE & H.264 still have the red exclamation marks.

    Any advice appreciated,

    Hugh

    1. Martin Brinkmann said on April 1, 2015 at 8:23 am
      Reply

      Which operating system are you using?

      1. hugh said on August 15, 2015 at 12:22 am
        Reply

        Sorry for the delay

        Current OS = Windows 10 Pro.
        I think when I first posted it was Windows 8.1 Pro – but the youtube html page still shows the same information as in the originally posted screenshot.

        Cheers,

        Hugh

  14. Claymore said on April 1, 2015 at 3:27 pm
    Reply

    I thought, I’ll post my frankenstein-solution for smooth 1080p videos @60FPS at Youtube here:

    Firefox: 37.0
    Clean Profile: Yes
    Used OpenH264 Version: 1.3

    System specs:
    Q6600 @3.0Ghz
    8GB DDR2 RAM
    Club3D 7870 JokerCard

    Following settings are changed for it:
    media.fragmented-mp4.ffmpeg.enabled: true
    media.fragmented-mp4.gmp.enabled: true
    media.peerconnection.video.h264_enabled: true

    Tested video: https://www.youtube.com/watch?v=mii5yODkVa

    Yes, “MMSE & WebM VP9” won’t get enabled, but doesn’t really matter in this case.

  15. Kurt said on May 5, 2015 at 3:56 pm
    Reply

    This doesn’t work anymore. media.mediasource.enabled is already true in 37.0.2, and adding ignore_codecs does nothing.

    Youtube only offers 360p as an option.

    1. Jay said on May 5, 2015 at 6:55 pm
      Reply

      MSE is enabled by default in FF37. Youtube videos should play with DASH support now. If they aren’t for you try making sure “media.mediasource.mp4.enabled” and “media.mediasource.webm.enabled” are both set to true. Also make sure “media.mediasource.whitelist” is set to false if you want to use non-Youtube sites with MSE, though it should already be disabled in FF37.

      If you are still having issues, what OS are you running? Are all of the boxes checked on http://youtube.com/html5 ?

      1. Kurt said on May 5, 2015 at 11:40 pm
        Reply

        Setting “media.mediasource.webm.enabled” to true fixed it. Thank you!

        MSE & H.264 and H.264 are red, but I can choose the quality now.

      2. Einar Ólafsson said on September 24, 2015 at 8:05 pm
        Reply

        Excellent addition to the tutorial, this fixed my last issue on getting “MSE & WebM VP9” checked of the list of supported features. I’m running a stable build (40.0.3) on Fedora 22.

    2. Jay said on May 6, 2015 at 12:31 am
      Reply

      Sounds like there is something wrong with MSE MP4 support for you then. Are you running Mac or Linux? That could be part of the reason.

      1. Kurt said on May 6, 2015 at 11:42 am
        Reply

        EDIT: I just fixed it by setting “media.fragmented-mp4.enabled” to true. I’m using Windows 7, but this was in your Linux only users section.

        Now everything on the youtube HTML5 page is ticked.

  16. Set Elrich said on May 6, 2015 at 11:39 pm
    Reply

    I followed the instructions, and nothing changed. :/

    1. Taladas said on November 19, 2015 at 2:10 am
      Reply

      Me too, I am on Linux and I followed the instructions but absolutely nothing has changed.

  17. datruche said on September 17, 2015 at 10:05 pm
    Reply

    Firefox 40.0.3 on Win XP SP3: All is red on Youtube html5 test page, ie does not work.

    Intel Graphics GMA500 “Poulsbo”: Hardware acceleration on.
    CCCP installed and configured with both filters (MPEG4 Video (H264) 720×576 plays fine in mpc)
    Firefox: media.directshow.enabled;true && media.hardware-video-decoding.enabled;true && media.mediasource.mp4.enabled;true && media.fragmented-mp4.enabled;true && media.mediasource.webm.enabled

    Looks like there’s no H264 support in Windows XP. That’s what is said in these places:
    http://codecs.forumotion.net/t1710-html5-h-264-in-windows-xp-possible
    http://forums.mozillazine.org/viewtopic.php?f=38&t=2867807
    https://support.mozilla.org/fr/questions/1053509

  18. MJS said on November 20, 2015 at 4:56 pm
    Reply

    Thanks for this!

  19. Chris said on December 20, 2015 at 12:26 am
    Reply

    You SHOULD NOT set the “media.fragmented-mp4.gmp.enabled” pref to true. This pref is for developer testing only. With this pref enabled, Firefox will try to decode YouTube video using the Cisco OpenH264 codec. YouTube serves H.264 High Profile video, but OpenH264 can only decode H.264 Baseline Profile. OpenH264 is only intended for use with WebRTC video chat, for now.

    1. Thank You said on December 22, 2015 at 2:53 am
      Reply

      Thank You Very Much. After following this post, html5 on youtube worked fine for a while. Around firefox 42 it stopped and would revert to using flash. Finally thought to check this post for anything new. Luckily found this comment. After changing back ‘media.fragmented-mp4.gmp.enabled’ to false. And html5 on youtube works again. Also made sure to set ‘media.fragmented-mp4.* to use firefox 43 defaults.

      While was in ‘about:config’, also made sure the rest that was suggested in this post was not causing any other issues. Looks that they are not as what is suggested here is default in firefox 43. Oh, this on Linux BTW.

      Chris, Thank You Very Much. Youtube works with html5 again :)

  20. Anonymous said on January 15, 2016 at 3:42 pm
    Reply
  21. Anonymous said on April 3, 2016 at 12:50 pm
    Reply

    media.fragmented-mp4.gmp.enabled
    doesnt not exist.

  22. Anonymous said on April 3, 2016 at 12:53 pm
    Reply
  23. mben42 said on June 6, 2016 at 3:20 pm
    Reply

    This worked on Debian until an update that morning, every variables are still true but the second line of functionalities on https://www.youtube.com/html5 are red now. I have upgraded all packages, nothing changed. I can watch videos with HTML5 player but not in Full HD and 30FPS only.

  24. XP Forever said on June 9, 2016 at 12:09 pm
    Reply
  25. Anonymous said on June 9, 2016 at 1:06 pm
    Reply

    I will never understand why Mozilla blacklisted a GTX650, sicnce I am able to watch 4k 100Mbps with 5% CPU in full screen, instead in Firefox I am unable to watch a simply html5 240p.

  26. pd said on September 27, 2016 at 4:12 am
    Reply

    Using Firefox 49.0.1 now on Windows 10 and I have the first two columns ticked, but not “WebM VP8” or “MSE and WebM VP9”. I’d like to see all 6 boxes ticked though I’m not sure I can explain why :)

    Martin, this article is very cool but probably dated now. Recent articles like the h264ify article were good. Perhaps it would be helpful to update this article though?

    Keep up the great work. Ghacks is one of the most useful sites on the net from my PoV.

    1. Martin Brinkmann said on September 27, 2016 at 5:38 am
      Reply

      I just checked Fx49 on two Windows machines and they have all boxed ticked on YouTube without me modifying preferences at all. Which version and OS are you running? Can you check and see what is listed under plugins?

      1. pd said on September 27, 2016 at 7:28 am
        Reply

        My comment says Windows 10 :) Strictly “Windows 10 Enterprise 2015 LTSB”. Unsure if there’s a way to get a more exact version string in Windows 10?

        As for Firefox, it’s 49.0.1, x64, Build 20160922113459, release channel.

        Only plugin installed is:

        OpenH264 Video Codec provided by Cisco Systems, Inc.
        File: 1.6

        which is exactly how I like it :)

        NPAPI plugins BLOW! :)

        about:config prefs that may be related:

        media.mediasource.enabled;true
        media.mediasource.mp4.enabled;true
        media.mediasource.webm.audio.enabled;true
        media.mediasource.webm.enabled;true
        media.webm.intel_decoder.enabled;false

        Also, I’ve unticked “Play DRM content” under Tools > Options > Content

      2. Martin Brinkmann said on September 27, 2016 at 5:48 pm
        Reply

        This is rather strange. I have the same configuration and all boxes are ticked on YouTube in the same browser on the same OS. Do you have any add-on installed that might interfere with this? Could you try and check the page with Firefox’s Safe Mode enabled? Hold down Shift-key while you start Firefox.

  27. Thomas said on September 28, 2016 at 9:09 am
    Reply

    i have to uncheck (set to false)

    media.mediasource.webm.enabled

    on my core i5 notebook, otherwise youtube seems to use webm always and then there is no hw accel.

    something like

    https://www.youtube.com/watch?v=K4YDMmWBac4

    i can play @2160p with only ~10% CPU, with mediasource.webm enabled it’s going at 80% and stuttering all the time.

    1. pd said on September 28, 2016 at 11:56 am
      Reply
      1. Thomas said on September 28, 2016 at 12:22 pm
        Reply

        thanks, yes, in the meantime i did, that works too.

        btw, upcoming firefox releases do perform a lot better on webm changelog for v51

        Improved video performance for users without GPU acceleration:

        – Less CPU Usage
        – Better full screen experience

        on my system there really is a big difference.

  28. pd said on September 28, 2016 at 12:25 pm
    Reply

    Excellent news. Maybe those boys in Kiwi land who AFAIK did significant video work are at it again. Excellent.

  29. vastymedoisa said on July 18, 2017 at 12:14 pm
    Reply

    Hi, on my OS I am able to watch 4k up to 120Mbps. What to do the see a simply 240p on Facebook without hang in Firefox? thanks. On Firefox I can watch videos only via Flash Player.

  30. Akira Phoenix said on April 3, 2018 at 6:03 pm
    Reply

    Well, now i can’t watch any videos.
    Thanks for fucking my YouTube experience up.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.