I just got Firefox to play a DRM encrypted video
Video of Firefox playing a widevine drm encrypted mpd
note i didnt record the audio ( audio works ) because i would have had to start virtual oss to capture the audio
and i wasnt sure if i would be get the drm video playing again
note you may need to be logged into google to view the video
i made it public but may still show a log into google page for you
i couldnt upload the video to Youtube
because i have a strike against me for making a video about Kodi and the youtube addon
Using this DRM Streaming Test page
I have the linux-widevine-cdm installed ( built with poudriere )
Im my Firefox profile
there is a gmp-widevinecdm directory
inside that directory i recreated the files that are present on Firefox with drm enabled
output of tree in the gmp-widevinecdm directory
i copied the libwidevinecdm.so from this location
libwidevinecdm.so is actually a symlink to fcdm-fbsd.so
i copied the manifest.json from Firefox on linux
firefox settings
widevine settings i copied from linux
mpd url
try playing the mpd with mpv
and it shouldnt play and you will get these errors in the terminal
if you download the mpd file
and look inside the mpd file you will see if using Widevine drm encryption with the pssh key inside the mpd file
Just creating the 4.10.2710.0 directory and files in my firefox profiles gmp-widevinecdm directory
doesnt magically enable Firefox to play the video on the link at the top of the page
I managed to get Firefox to play the video a couple of time,
i was actually logged in itv.com ( which use drm ) and trying to play a video
The video on ITV didnt play
but the DRM Streaming Test in the other tab started to play the video
i couldnt get drm content on itv or channel 4 to work
im guessing the mpd played back in Firefox because the mpd contained the pssk key
I have also been playing around with Kodi which can play back drm content
with using kodi-addon-inputstream.adaptive
create a file called widevine.strm
with this content which is the license key and mpd from the drm test page
copy the widevine.strm file to the video playlist directory for kodi
copy the libwidevinecdm.so to the ~/.kodi/cdm directory
which is where it looks for the libwidevinecdm.so file
if you try play the widevine.strm in the kodi playlist directory with kodi,
kodi crashes, so no joy yet
the libwidevinecdm.so is too large to attach as a zip to this post
so if you want to try this out you need the linux-widevine-cdm port installed
and then copy the libwidevinecdm.so into place as described above
on freebsd 14.1 the xdg runtime dir is set to /var/run/xdg/username
where username is your username
inside the xdg runtime dir you will see the fcdm-jail and fcdm-lock directories
created by the linux-widevine-cdm port
Video of Firefox playing a widevine drm encrypted mpd
note i didnt record the audio ( audio works ) because i would have had to start virtual oss to capture the audio
and i wasnt sure if i would be get the drm video playing again
firefox-widevine.mp4
drive.google.com
note you may need to be logged into google to view the video
i made it public but may still show a log into google page for you
i couldnt upload the video to Youtube
because i have a strike against me for making a video about Kodi and the youtube addon
Using this DRM Streaming Test page
DRM videojs stream test
Test DRM protected stream using videojs player with Nuevo. Enable DRM playback utilizing the HTML5 Encrypted Media Extensions (EME).
www.nuevodevel.com
I have the linux-widevine-cdm installed ( built with poudriere )
Im my Firefox profile
Code:
~/.mozilla/firefox/kd3khr3t.default-release/gmp-widevinecdm
there is a gmp-widevinecdm directory
inside that directory i recreated the files that are present on Firefox with drm enabled
output of tree in the gmp-widevinecdm directory
Code:
.
└── 4.10.2710.0
├── libwidevinecdm.so
└── manifest.json
i copied the libwidevinecdm.so from this location
Code:
/usr/local/share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
libwidevinecdm.so is actually a symlink to fcdm-fbsd.so
Code:
libwidevinecdm.so -> /usr/local/lib/foreign-cdm/fcdm-fbsd.so
i copied the manifest.json from Firefox on linux
Code:
{
"arch": "x64",
"description": "Widevine Content Decryption Module",
"manifest_version": 2,
"name": "WidevineCdm",
"os": "linux",
"version": "4.10.2710.0",
"x-cdm-codecs": "vp8,vp09,avc1,av01",
"x-cdm-host-versions": "10",
"x-cdm-interface-versions": "10",
"x-cdm-module-versions": "4",
"x-cdm-persistent-license-support": false
}
firefox settings
Code:
about:config
widevine settings i copied from linux
mpd url
try playing the mpd with mpv
Code:
mpv 'https://media.axprod.net/TestVectors/v6.1-MultiDRM-MultiKey/Manifest_1080p.mpd'
and it shouldnt play and you will get these errors in the terminal
Code:
Error decoding audio.
Error while decoding frame!
if you download the mpd file
Code:
wget 'https://media.axprod.net/TestVectors/v6.1-MultiDRM-MultiKey/Manifest_1080p.mpd'
and look inside the mpd file you will see if using Widevine drm encryption with the pssh key inside the mpd file
Code:
<ContentProtection value="Widevine" schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
<cenc:pssh>AAAANHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABQIARIQFTDToGkERGqRoTOhFaqMQQ==</cenc:pssh>
</ContentProtection>
Just creating the 4.10.2710.0 directory and files in my firefox profiles gmp-widevinecdm directory
doesnt magically enable Firefox to play the video on the link at the top of the page
I managed to get Firefox to play the video a couple of time,
i was actually logged in itv.com ( which use drm ) and trying to play a video
The video on ITV didnt play
but the DRM Streaming Test in the other tab started to play the video
i couldnt get drm content on itv or channel 4 to work
im guessing the mpd played back in Firefox because the mpd contained the pssk key
I have also been playing around with Kodi which can play back drm content
with using kodi-addon-inputstream.adaptive
Code:
sudo pkg install kodi kodi-addon-inputstream.adaptive
create a file called widevine.strm
with this content which is the license key and mpd from the drm test page
Code:
#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://drm-widevine-licensing.axtest.net/AcquireLicense
https://media.axprod.net/TestVectors/v6.1-MultiDRM-MultiKey/Manifest_1080p.mpd
copy the widevine.strm file to the video playlist directory for kodi
Code:
cp widevine.strm ~/.kodi/userdata/playlists/video
copy the libwidevinecdm.so to the ~/.kodi/cdm directory
which is where it looks for the libwidevinecdm.so file
Code:
cp /usr/local/share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so ~/.kodi/cdm
if you try play the widevine.strm in the kodi playlist directory with kodi,
kodi crashes, so no joy yet
the libwidevinecdm.so is too large to attach as a zip to this post
so if you want to try this out you need the linux-widevine-cdm port installed
and then copy the libwidevinecdm.so into place as described above
on freebsd 14.1 the xdg runtime dir is set to /var/run/xdg/username
where username is your username
inside the xdg runtime dir you will see the fcdm-jail and fcdm-lock directories
created by the linux-widevine-cdm port
Code:
# ls -l /var/run/xdg/djwilcox/
total 7
dr-xr-xr-x 2 djwilcox djwilcox 2 9 Jul 14:41 .fcdm-jail
-r--r--r-- 1 djwilcox djwilcox 0 9 Jul 14:41 .fcdm-lock
srwxr-xr-x 1 djwilcox djwilcox 0 9 Jul 13:23 Alacritty-wayland-0-59988.sock
drwx------ 2 djwilcox djwilcox 3 9 Jul 13:24 at-spi
drwx------ 3 djwilcox djwilcox 3 9 Jul 13:23 dbus-1
drwx------ 2 djwilcox djwilcox 3 9 Jul 17:52 dconf
drwx------ 2 djwilcox djwilcox 2 9 Jul 13:24 doc
drwx------ 2 djwilcox djwilcox 3 9 Jul 13:23 dwlb
drwx------ 2 djwilcox djwilcox 3 9 Jul 13:24 emacs
drwx------ 2 djwilcox djwilcox 2 9 Jul 13:24 pulse
-rw------- 1 djwilcox djwilcox 0 9 Jul 13:24 tofi.lock
srwxr-xr-x 1 djwilcox djwilcox 0 9 Jul 13:23 wayland-0
-rw-r----- 1 djwilcox djwilcox 0 9 Jul 13:23 wayland-0.lock
-rwx------ 1 root djwilcox 0 9 Jul 13:23 xdg_session.0