As a few people already noticed, www/chromium has been recently patched to enable Widevine support. (It's debatable whether that's a good or bad thing, but the demand is certainly there.)
This is done with the help of www/foreign-cdm, which is a relatively straightforward proxy for the Content Decryption Module API. The port provides a native FreeBSD CDM implementation (a shared library) that in background transparently launches one or more Linux processes loading Widevine. They communicate through a pair of Unix sockets.
Widevine itself is available through www/linux-widevine-cdm.
So, what does that actually mean? Enabling DRM playback should now be as easy as(assuming the latest repo):
Use the demo at https://bitmovin.com/demos/drm or https://reference.dashif.org/dash.js/latest/samples/drm/widevine.html to test the playback. (This might require a few attempts + browser restart.)
There are, of course, some limitations:
This is done with the help of www/foreign-cdm, which is a relatively straightforward proxy for the Content Decryption Module API. The port provides a native FreeBSD CDM implementation (a shared library) that in background transparently launches one or more Linux processes loading Widevine. They communicate through a pair of Unix sockets.
Widevine itself is available through www/linux-widevine-cdm.
So, what does that actually mean? Enabling DRM playback should now be as easy as
Code:
% sudo pkg install chromium # 117.0.5938.149_2 or higher
% sudo pkg install foreign-cdm
% sudo sysrc linux_enable="YES"
% sudo service linux start
% git clone --depth 1 https://github.com/freebsd/freebsd-ports
% cd freebsd-ports/www/linux-widevine-cdm
% make
% sudo make install
Use the demo at https://bitmovin.com/demos/drm or https://reference.dashif.org/dash.js/latest/samples/drm/widevine.html to test the playback. (This might require a few attempts + browser restart.)
There are, of course, some limitations:
- we are permanently restricted to the Widevine L3 protection level, just like Linux;
there is no sandboxing yet;- I'll eventually get to disabling debug logging as well as fixing a few minor memory leaks, but for the time being they remain there for everyone to enjoy.
Last edited: