Activating h264 video support on Firefox 49 on Windows XP

Why Firefox never supported video in h264 on Windows XP, or a digression into history

At first Mozilla refused to support the proprietary and patent-protected h264 format, promoting the use of open codecs, then, when it became clear that without h264 support in the modern web, it was implemented when Using the Windows Media Foundation component, which is missing from Windows XP When Cisco provided the open and licensed clean OpenH264 codecs, it was too late - no one wanted to rewrite the working code using WMF for the OS, which was no longer supported by the manufacturer, and the implementation of OpenH264 limited the video to WebRTC.

But many (including me) still use this OS for various reasons, and they should not be denied viewing videos in h264 in the best (in my humble opinion) Firefox browser.

Help from where did not wait


After upgrading to Firefox 48, I suddenly found for myself that video in h264 worked great.
A little investigation led me to make this possible thanks to the Adobe Primetime plugin, which focuses on DRM video playback.

The screenshot below, obtained using Process Explorer, shows that the plugin-container process that appeared after loading the page from the video uses the eme-adobe.dll file from the profile of the current user. Having entered the Firefox plug-in settings, I found Adobe Primetime there, disabling it led to the fact that FF stopped playing h264, which proved that it was he who was responsible for this triumph. But my joy was not long.






They broke everything again


The next time I upgraded to Firefox 49, I sadly found that h264 was not playing again. I did not find Adobe Primetime in the list of plugins, I did not find its files in the profile, and an attempt to palm them off did not lead to anything.

While searching the internet, I came across a discussion of suggestions for hiding Adobe Primetime on OSs below Vista . From there, I learned that this plugin does not officially support Windows XP, and some configurations experienced stability issues. But I had no problems!

In the bug tracker there was a link to a “fix” for Primetime plugin display problem on XP. Based on the code from it, I made a correction that rolls back the harmful effect of these changes.

Correction


Update : a simpler and more correct way is specified in PS, you do not need to edit files. The previous version of the correction remains for historical purposes.
You need to unzip the omni.ja file from the browser root directory, find the /jsloader/resource/gre/modules/GMPUtils.jsm file there, open it in any hex editor and replace the bytes there

6973506C6174666F726D416E6456657273696F6E41744C656173740700000077696E0300000036

on the

6973506C6174666F726D416E6456657273696F6E41744C656173740700000077696E0300000035

Thus, we will enable the plugin to work on the kernel NT 5.0 and higher, instead of NT 6.0. After fixing, you need to pack the files back into omni.ja. Archiving with the usual parameters will not work here, you need to use the console :

zip -qr9XD omni.ja *

After replacing the original with it, everything worked again.

I note that you must also activate support for video playback using plugins, in about: config you need to set to true:

media.gmp.decoder.enabled

I have had this setting turned on for a long time, hoping for h264 to work through OpenH264. After that, you can enjoy the video in h264 on any sites, including YouTube, Vimeo, online broadcast services, etc. (test on a clean OS in a virtual machine) I made a request in Bugzilla to return Primetime plug-in support on Windows XP, but something tells me that it will end in nothing. I propose to help in correcting the description of the request, since I am tongue-tied even in Russian (if you have not noticed), and even in English the clarity of my explanations is completely lost, which further reduces the chances of an official correction of this problem in future versions of Firefox.

image





Afterword


For those who are too lazy to mess with HEX-editors and archiver, I attach a link to the directory on Yandex.disk , where I will dump my fixed omni.ja files after updates. So far, there is one file from the current version.

A note for the paranoid (which I myself am)
Plugins in Firefox run in an isolated process that does not have access to the page, so there is nothing wrong with using a closed-source plugin. Although I suggest downloading the corrected file, I also give instructions on how to fix it myself above.

The binary omni.ja file that you got may differ from mine even on the same version of FF in binary comparison, since different archivers, its versions and default compression parameters are used.

Thanks for attention!

PS Update


Bugzilla suggested a simpler and more correct way to activate the plugin. It is enough to create the setting in about: config:

media.gmp-eme-adobe.forceSupported

And set it to true. It is also necessary to set the already existing parameter media.gmp.decoder.enabled to true, and just in case check the parameters media.gmp-eme-adobe.visible and media.gmp-eme-adobe.enabled, they are activated by default, but not enough whether. This allows you to activate the plugin without binary file patches, so I will not post new versions.

Also popular now: