Firefox stopped to support DRM ?

It never did. There is a www/linux-widevine-cdm plugin nowadays though. Is that what you meant?
I remember how just a few years ago, people were annoyed by the fact they couldn't watch Netflix on FreeBSD because of the absence of this widevine thing. But I guess linuxulator is more advanced now than it was just a few years ago; that's why the widevine thing is finally available for FreeBSD.
 
No, that isn't the reason.
If it was easy to make widevine run under linuxulator in the year 2017, 2018, or 2019, then why wasn't linuxulator-based widevine available back then? widevine for linuxulator-based google chrome appeared less than 4 years ago and as far as I remember, google chrome itself couldn't run under linuxulator just a few years ago. Foreign-cdm for the native chromium browser became available less than a year ago.
 
I tested a slightly different strategy years ago: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229708#c2, https://forums.freebsd.org/threads/...e-content-decryption-module.77205/post-480099. It was working fine and foreign-cdm only exists because of some changes in the recent Widevine versions.

why wasn't linuxulator-based widevine available back then?
It's an indirect result of my work on the Steam wrapper script, as you can see from https://github.com/mrclksr/linux-br...8faa3a6d73ac1cdb/linux-browser-installer#L338 (through https://forums.freebsd.org/threads/...-google-chrome-linux-binary-on-freebsd.77559/, which is derived from https://forums.freebsd.org/threads/compat-linux-microsoft-teams.75356/post-463091). I am actually moderately annoyed by its existence, since it interferes with the said set of scripts.
 
shkhln : please check the private messages with me. I've opened a bug ticket to fix the bug of Firefox that deletes the widevine files. Developers are asking me technical questions that I'm not able to reply. But you can. So,if we can collaborate,we can fix that bug and we can have widevine on Firefox.

PS : anyway it's not important that you reply to my private messages. You can do it here :

My bug description (it has been set as confidential) :

We are trying to enable widevine for Firefox on FreeBSD. Widevine support appears be compiled and the instructions from :

https://old.reddit.com/r/firefox/comments/nrb6fk/fix_widevine_content_decryption_module_wont/

mostly work (in combination with media.gmp-widevinecdm.enabled/media.gmp-widevinecdm.visible keys), but Firefox immediately deletes the files, then it can't find the cdm because it just deleted it. So that is the part that has to be located and patched.

Firefox developers asked to me :

1) Are you using a custom built Firefox binary by chance?

2) One option that might help is to run the instance with media.gmp.log.level set to 5, and check the console for addon install logging information.
 
Hint:
1711587897567.png
 

@graham : not now. The priority now is to collaborate with the Firefox developers to fix the bug. So please don't give me hints. I need to have fast replies to help the developers. To be able to enable widevine on Firefox is an added value for every FreeBSD user. We should reach the goal without wasting time. I think that I have understood what you want that I do,but I don't understand what he means with the next sentence : "check the console for addon install logging information"
 
Developers are asking me technical questions that I'm not able to reply.

I thought you needed help with how to set what was suggested by the developers. Sorry.

Console, means run Firefox from the command line, but first, make the suggested setting (then quit the instance of Firefox that you'll run from the command line).
 
I don't understand what he means with the next sentence : "check the console for addon install logging information"
I think that the Mozilla devs meant a different kind of console:
1711595605765.png

Click that hamburger menu, then 'More tools' -> 'Browser Console' (Ctrl-Shift-J).

Browser Console should be able to track the addon install logging info... A regular UNIX console terminal like XTerm or Konsole is most likely NOT what Mozilla devs had in mind.
 
I thought you needed help with how to set what was suggested by the developers. Sorry.

Console, means run Firefox from the command line, but first, make the suggested setting (then quit the instance of Firefox that you'll run from the command line).

grahamperrin :

I think I should try to rack my brains a little bit more to figure out what I need to do, thanks for the hint...and for every good suggestion that you give me every time...
 
ok. First of all I've set media.gmp.log.level set to 5 and I have checked the console for addon install logging information.

Furthermore I tried to enable widevine on Firefox following the instructions explained in the link below :


they say :

In the first table on the page, on the Profile Folder row, click the "Open Folder" button. This should launch a new window listing various files and folders in Windows Explorer.

Select and copy the folder name: gmp-widevinecdm

Good. I did that :

Istantanea_2024-03-28_14-03-29.png


But on the directory called "/home/marietto/.mozilla/firefox/qlo97du5.default-release-1642269005662" I don't have any directory called "gmp-widevinecdm" ; why ? it should be there. So,is this the bug that we are talking about ?

anyway,I see the directory called "gmp-widevinecdm" in different Firefox profiles that aren't the default ones :

Code:
/usr/home/marietto/.wine/drive_c/users/marietto/Application Data/Mozilla/Firefox/Profiles/rlhnwwfz.default-release/gmp-widevinecdm
/usr/home/marietto/.mozilla/firefox/t1yhalgh.default-beta/gmp-widevinecdm
/usr/home/marietto/.mozilla/firefox/q75tq2rc.default-release-1/gmp-widevinecdm
/usr/home/marietto/.mozilla/firefox/914cfpzp.default-release-2/gmp-widevinecdm
/usr/home/marietto/.mozilla/firefox/bxfdihgo.default-release/gmp/Linux_x86_64-gcc3/gmp-widevinecdm
/usr/home/marietto/.mozilla/firefox/bxfdihgo.default-release/gmp-widevinecdm

I see that none of these profiles is the default one. Anyway,I want to continue to follow the instructions that I read here :


point 5 ? --->
  • Unzip and place the 'gmp-widevinecdm' folder inside Firefox Profiles folder
so,for example :

Code:
[mario@marietto /home/marietto/.mozilla/firefox/qlo97du5.default-release-1642269005662]==> cp -r /usr/home/marietto/.mozilla/firefox/q75tq2rc.default-release-1/gmp-widevinecdm .

And here :



Istantanea_2024-03-28_14-34-08.png



anyway I'm not sure if the value of "media.gmp-widevinecdm.abi is correct..(I have also tried : x86_64-linux-x64)

I tried to search for that value from widevine installed on Chrome,but I didn't find it :

Istantanea_2024-03-28_14-40-34.png


I'm using FreeBSD,so it can't be the ABI used by Firefox used on Windows,neither on Linux,right ?

Netflix gives error : F7701-1003 ; probably caused by a bad installation of Widevine.

Below there is the Widevine tab as configured by Firefox installed on the Linuxulator :

Istantanea_2024-03-28_16-06-49.png
 
even if you copy the widevine files used by chromium and put them into the directory where firefox expects them to be
and enable the widevine settings in about:config it doesnt work

Did you read what I said here :


?

Do you have the habit to read the previous messages or only the last one ? I hope that you get the habit to read a little bit more of old messages. I opened a bug ticket and I'm trying to explain what's wrong to the firefox developers,trying to understand what's broken on the firefox code. That's because @shkhln pointed us to the right direction. And we should try to find what's wrong on that direction to fix it.
 
i have already tried what you are doing in the post above on Freebsd with the firefox pkg
and with firefox installed as a deb in the linuxulator
 
It will not work if there is a bug,don't you think ? I will explain what I tried to the firefox developers. I want to remember what "shkhln" said :

Widevine support appears be compiled and the instructions from :

https://old.reddit.com/r/firefox/comments/nrb6fk/fix_widevine_content_decryption_module_wont/

mostly work (in combination with media.gmp-widevinecdm.enabled/media.gmp-widevinecdm.visible keys), but Firefox immediately deletes the files, then it can't find the cdm because it just deleted it. So that is the part that has to be located and patched.

My sensation is that it does not work because there is a bug on Firefox. That's the reason why I want to fix that bug...
 
even if you copy the widevine file to firefox and enable all the options in about:config
the option to play drm content doesnt show up in the firefox settings

on linux if you enable widevine using about:config the option to enable drm playback is enabled in the settings

when you check the enable drm playback checkbox on linux it downloads the widevine file
and installs it into the current firefox profile

because firefox isnt built with an the option to enable drm playback
there is no option in the firefox settings on freebsd to enable drm playback with a checkbox that enables widevine

adding the widevine file and enable settings in about:config cant active the checkbox in the firefox settings
because its not there

output of mount when playing a drm video with chromium on freebsd

Code:
mount

mountpoints

Code:
tmpfs on /var/run/user/1001/.fcdm-jail (tmpfs, local, noexec, read-only)
/compat/linux/bin on /var/run/user/1001/.fcdm-jail/bin (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
/compat/linux/etc on /var/run/user/1001/.fcdm-jail/etc (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
/compat/linux/lib on /var/run/user/1001/.fcdm-jail/lib (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
/compat/linux/lib64 on /var/run/user/1001/.fcdm-jail/lib64 (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
/compat/linux/usr on /var/run/user/1001/.fcdm-jail/usr (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
devfs on /var/run/user/1001/.fcdm-jail/dev (devfs)
linprocfs on /var/run/user/1001/.fcdm-jail/proc (linprocfs, local)
linsysfs on /var/run/user/1001/.fcdm-jail/sys (linsysfs, local)
/usr/local/lib/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so on /var/run/user/1001/.fcdm-jail/opt/cdm.so (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
/usr/local/libexec/fcdm-worker on /var/run/user/1001/.fcdm-jail/opt/worker (nullfs, local, noatime, nosuid, read-only, nfsv4acls)
.whatever on /var/run/user/1001/.fcdm-jail/.setup-done (nullfs, local, noexec)
 
Widevine DRM is Google’s content protection system for premium media.

heres the problem

on linux, mac and windows when you enable drm in the firefox settings it downloads and installs widevine

there is no freebsd build of widevine thats why we have to use the linux version

so there is no option in the firefox settings to enable drm because
there is no freebsd version of widevine to download and install

the widevine license means its only available as a port and not a package
so firefox cant download, build and install the widevine port

catch 22
 
Widevine DRM is Google’s content protection system for premium media.

heres the problem

on linux, mac and windows when you enable drm in the firefox settings it downloads and installs widevine

there is no freebsd build of widevine thats why we have to use the linux version

so there is no option in the firefox settings to enable drm because
there is no freebsd version of widevine to download and install

the widevine license means its only available as a port and not a package
so firefox cant download, build and install the widevine port

catch 22
 
Now I'm following this tutorial :


even here,at the very bottom,he talks about the bug that needs to be fixed :

(For some reason Firefox could try to remove files in 1.4.8.885 directory. To prevent that you may remove write bit from directory permissions (chmod a-w 1.4.8.885), and also make the directory owned by root user.)
 
Someone could explain how to "link" Firefox instead of Chrome "within" the foreign-cdm config. files ? I don't understand how the mechanism works. I can understand that what I want to try will not work,but I'm curious to exchange the chrome config. files with the firefox config files to see what happens :D
 
~/.config/chromium/WidevineCdm

Code:
Yes Master ? ls -l ~/.config/chromium/WidevineCdm
total 1
-rw-------  1 djwilcox djwilcox 48 29 Mar 23:43 latest-component-updated-widevine-cdm

latest-component-updated-widevine-cdm

Code:
{"Path":"/usr/local/share/chromium/WidevineCdm"}

/usr/local/share/chromium/WidevineCdm

Code:
Yes Master ? ls -l /usr/local/share/chromium/WidevineCdm
total 1
drwxr-xr-x  3 root wheel  3  1 Dec 19:52 _platform_specific
lrwxr-xr-x  1 root wheel 40 12 Jan 02:40 manifest.json -> /usr/local/lib/WidevineCdm/manifest.json

/usr/local/share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so

Code:
Yes Master ? ls -l /usr/local/share/chromium/WidevineCdm/_platform_specific/linux_x64
total 1
lrwxr-xr-x  1 root wheel 39 12 Jan 02:40 libwidevinecdm.so -> /usr/local/lib/foreign-cdm/fcdm-fbsd.so

/usr/local/lib/WidevineCdm/manifest.json

Code:
{
  "manifest_version": 2,
  "update_url": "https://clients2.google.com/service/update2/crx",
  "name": "WidevineCdm",
  "description": "Widevine Content Decryption Module",
  "version": "4.10.2710.0",
  "minimum_chrome_version": "68.0.3430.0",
  "x-cdm-module-versions": "4",
  "x-cdm-interface-versions": "10",
  "x-cdm-host-versions": "10",
  "x-cdm-codecs": "vp8,vp09,avc1,av01",
  "x-cdm-persistent-license-support": false,
  "x-cdm-supported-encryption-schemes": [
    "cenc",
    "cbcs"
  ],
  "icons": {
    "16": "imgs/icon-128x128.png",
    "128": "imgs/icon-128x128.png"
  },
  "platforms": [
    {
      "os": "linux",
      "arch": "x64",
      "sub_package_path": "_platform_specific/linux_x64/"
    },
    {
      "os": "linux",
      "arch": "arm64",
      "sub_package_path": "_platform_specific/linux_arm64/"
    }
  ]
}

fcdm-jail seems to start a linux jail and mount the needed directories

Code:
/usr/local/libexec/fcdm-jail
/usr/local/libexec/fcdm-worker
 
Yes,thanks. I've looked at that. And I copied the Firefox files from the directory "/usr/local/lib/firefox" to the directory "/usr/local/share/firefox". Furthermore I have copied the directory gmp-clearkey :

Istantanea_2024-03-30_15-32-18.png


and widevineCdm to "/usr/local/share/firefox" :

Istantanea_2024-03-30_15-34-01.png


and I tried to see if I could watch something on www.netflix.com ; Unfortunately I can't. Widevine is not working correctly. I'm missing something :

Istantanea_2024-03-30_15-35-43.png


It says that I'm not using the lastest Firefox version available....

I forgot to mention that in addition,I created these entries on Firefox :

Istantanea_2024-03-30_15-18-18.png


In other words I'm trying to mimic for firefox the same way Widevine has been configured to work with Chrome.

maybe the manifest.json file located here : /usr/local/lib/WidevineCdm and here : /usr/local/share/firefox/WidevineCdm

has been written for chrome and does not work for Firefox :

Code:
"manifest_version": 2,
  "update_url": "https://clients2.google.com/service/update2/crx",
  "name": "WidevineCdm",
  "description": "Widevine Content Decryption Module",
  "version": "4.10.2710.0",
  "minimum_chrome_version": "68.0.3430.0",
  "x-cdm-module-versions": "4",
  "x-cdm-interface-versions": "10",
  "x-cdm-host-versions": "10",
  "x-cdm-codecs": "vp8,vp09,avc1,av01",
  "x-cdm-persistent-license-support": false,
  "x-cdm-supported-encryption-schemes": [
    "cenc",
    "cbcs"
  ],
icons": {
    "16": "imgs/icon-128x128.png",
    "128": "imgs/icon-128x128.png"
  },
  "platforms": [
    {
      "os": "linux",
      "arch": "x64",
      "sub_package_path": "_platform_specific/linux_x64/"
    },
    {
      "os": "linux",
      "arch": "arm64",
      "sub_package_path": "_platform_specific/linux_arm64/"
    }
  ]
}
 
Back
Top