📜 ⬆️ ⬇️

Enable h264 video support on Firefox 49 on Windows XP

Why Firefox never supported h264 video on windows xp or a history tour

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 it was nowhere to use h264 in the modern web, it was implemented with the help of the Windows Media Foundation component missing in Windows XP. When Cisco provided open and licensed OpenH264 codecs, it was too late - no one wanted to rewrite the working code using WMF for the OS, the manufacturer’s support for which was over, and the implementation of OpenH264 restricted WebRTC video.

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

Help, not waited


After updating to Firefox 48, I suddenly discovered for myself that the video in h264 works great.
A little investigation led me to make this possible thanks to the Adobe Primetime plugin, which focuses on DRM video playback.
')
In the screenshot below, obtained using Process Explorer, you can see that the plugin-container process that appeared after loading the video page uses the eme-adobe.dll file from the current user profile.



Going into the setting of Firefox plug-ins, I found Adobe Primetime there, disabling which caused FF to stop playing h264, which proved that it was he who was responsible for this celebration.
But my joy was not long.

All broke again


When I upgraded to Firefox 49, I sadly discovered that h264 is not playing again. I did not find Adobe Primetime in the list of plug-ins, I did not find its files in the profile, and an attempt to slip them to nothing resulted.

While searching on the Internet, I came across a discussion of the proposal to hide Adobe Primetime on an OS below Vista . From there, I learned that this plugin does not officially support Windows XP, and some configurations have experienced stability problems. But I had no problems!

In the bugtracker there was a link to the “fix” problem of displaying the Primetime plugin on XP. Relying 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, files do not need to be edited. The previous version of the fix remains for historical purposes.
You need to unzip the omni.ja file from the browser's 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

 6973506C6174666F726D416E6456657273696F6E41744C656173740700000077696E0300000035 

Thus, we will enable the plug-in to work on the kernel NT 5.0 and higher, instead of NT 6.0. After the fix, 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 them with the original, everything worked again.

I note that it is also necessary to activate support for video playback using plug-ins, in about: config you need to set it to true:

 media.gmp.decoder.enabled 

I have this setting been turned on for a long time, in the hope that h264 will work through OpenH264. After that, you can enjoy h264 videos on any sites, including YouTube, Vimeo, online broadcast services, etc.

image
(test on a clean OS in a virtual machine)

I created a request in Bugzilla to return Primetime plugin support on Windows XP, but something tells me that this 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 did not notice), and the English clarity of my explanations is completely lost, which further reduces the chances of official fixing this problem in future versions of Firefox.

Afterword


For those who are too lazy to tinker with HEX editors and archiver, I attach a link to the catalog on Yandex.Disk , where I will drop my corrected omni.ja files after updates. While there is one file from the current version.

Note for paranoids (whom I myself am)
Plug-ins 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 propose to download the corrected file, I also give instructions for correcting it myself above.

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

Thanks for attention!

PS Update


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

 media.gmp-eme-adobe.forceSupported 

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

Source: https://habr.com/ru/post/311626/


All Articles