My thoughts on Slackware, life and everything

Tag: drm (Page 3 of 3)

Watch Netflix video in your chromium browser – this time for real

chromium_icon

I have made change to my Chromium package which some of you will find interesting. As you might know (I wrote about it in an earlier article here on Alien Pastures) Google and Netflix combined their efforts and that resulted in native support in Chrome for the playback of Netflix videos, using the Widevine Content Decryption Module (CDM) which is incidentally also owned by Google. This was all made possible using the Encrypted Media Extensions (EME) in a HTML5 player. Unfortunately, I was not able to find a way to add this Widevine CDM support to my Chromium package – using a similar approach to the way I add support for Flash using the binary libraries taken from the official Chrome RPM.

Then my Slackware buddy ppr:kut pointed me to a discussion in the Chromium bugtracker on Google Code where someone stated he had found the solution. The description was a bit vague, no patches were posted, but the general concept was clear.

I proceeded with updating my SlackBuild for chromium-dev (which is currently at version 41.0.2236.0) and re-writing my not-working widevine patch. That resulted in a new chromium-dev package which reported that a Widevine plugin was available. Alas… when opening a Netflix page and attempting to play a video, this only resulted in the error “M7363-1262-00000000” which seems to have a relation to a mismatch between the Widevine CDM library and the browser. A possible explanation could be that I used the Widevine CDM library from stable Chrome 39.0.2171.95 in that build of the chromium development version 41.

So, my next attempt was to rebuild the stable chromium package (39.0.2171.95) with the Widevine patch, using the Widevine CDM library from the Chrome RPM bearing that same version. And what do you know… success!

I can now watch Netflix video’s in my Slackware chromium browser. How nice is that.

Apparently, having a functional Widevine CDM support will allow you to watch Youtube Movies as well, but since I already pay for Netflix I did not want to test these Youtube rentals. Another test which failed was my attempt to watch television on horizon.tv, the content streaming network of my provider (UPC/Liberty Global). Even with a UserAgent spoofer and all browser cookies removed, that site still detected that I was visiting using a Chrome/Chromium browser and kept presenting an annoying popup to force me to switch to a different browser because Chrome does not support Silverlight anymore (on Mac OSX and Windows 64-bit at least, remember their NPAPI depreciation). No way around that, even though I was fairly sure that Horizon TV also used Widevine for Digital Rights Management (DRM) in the past. Guess I still have to use Firefox with Pipelight for that, then.

What do you need in order to watch Netflix in Chromium on Slackware (14.1 and -current)?

  • Just two packages are needed: chromium and chromium-widevine-plugin. The latest chromium package was rebuilt to enbable support for Widevine. The chromium package itself does not contain any proprietary binaries. The chromium-widevine-plugin package is what contains the “libwidevinecdm.so” library which was extracted from the official binary Chrome RPM – this is proprietary software.
  • It is not necessary to use a UserAgent spoofer. Netflix works out of the box.
  • Make sure your mozilla-nss package has at least version 3.16.4 (Pat Volkerding upgraded all mozilla-nss packages in recent Slackware releases for this reason)
  • In Netflix Playback-settings chose HTML5

Note 1:

No more changes are needed to the file “/etc/default/chromium”. The plugin is announced to chromium by means of the “libwidevinecdmadapter.so” library which is built from the Open Source code in the chromium tarball, but only in the presence of the proprietary “libwidevinecdm.so”. Installing or upgrading the chromium-widevine-plugin package will show a few lines of warning if it detects that you still have the old configuration block enclosed by “START chromium-widevine-plugin” and “END chromium-widevine-plugin“. You should delete that block now.

Note 2:

If you don’t care about Netflix or don’t want to install any non-free software, then the chromium package is still OK for you – just don’t install chromium-widevine-plugin and you’ll be fine. If you even want to get rid of any hint of Widevine support you can always recompile the package with the variable “USE_CDM” inside the chromium.SlackBuild set to zero (0). That will prevent the creation of the (open source) adapter library “libwidevinecdmadapter.so”.

Have fun! Eric

Pipelight: using Silverlight in Linux browsers

pipelight-logo That is the exact title of an article which appeared on fds-team.de last august.

You may have read my earlier rant about dutch schools migrating (or forced to migrate) to a Microsoft SilverLight based learning management software called Magister. A disastrous move induced by an arrogant company, which of course leaves Linux desktop users out in the cold. In my article, I mentioned that I was looking at ways to render SilverLight based websites in a Linux browser. The most promising (in fact as it turned out,  the only) solution appeared to be Pipelight.

It took a while to get it all sorted out and make sense of the way in which the various pieces of software interact, but despite a busy work schedule I managed to pull it off in the end. This article will show you how to install and configure Pipelight on Slackware Linux without effort. Not just dutch Slackware users with children in secondary school will profit. You may definitely want to install Pipelight in order to view Netflix content on your Linux computer! Having a Netflix subscription forced you to boot a Windows computer but that is now history.

What is Pipelight and how does it render these SilverLight pages, and Netflix videos, and more, in your browser?

Project Pipelight utilizes the efforts made by Erich E. Hoover who created a set of Wine patches to get Playready DRM protected content working inside Wine. This modified Wine (wine-pipelight) is combined with a new browser plugin (pipelight) that embeds Silverlight directly in any Linux browser supporting the Netscape Plugin API (yes… the API which Google is planning to drop from its Chrome browser in 2014… not playing nice here, Google!).

Let me quote verbatim from the project page, because I can not phrase it better:

Pipelight consists out of two parts: A Linux library which is loaded into the browser and a Windows program started in Wine. The Windows program, called “pluginloader.exe”, simply simulates a browser and loads the Silverlight DLLs. When you open a page with a Silverlight application the library will send all commands from the browser through a pipe to the Windows process and act like a bridge between your browser and Silverlight. The used pipes do not have any big impact on the speed of the rendered video since all the video and audio data is not send through the pipe. Only the initialization parameters and (sometimes) the network traffic is send through them. As a user you will not notice anything from that “magic” and you can simply use Silverlight the same way as on Windows.

That is good news. And now, how to get this all working in Slackware?

? First, you need a couple of my packages (you may have some of them already). I made them available for Slackware 14.0 and 14.1, both 32-bit and 64-bit editions. Download and install the following packages for your Slackware version and architecture:

? Note that Wine is a 32-bit product (and the pre-compiled pipelight pluginloader comes as 32-bit binary only), so if you are running 64-bit Slackware you will have to switch it to a multilib system first. I noticed some references to wine64 in the piplelight sourcecode (un-implemented functionality as of yet) so there’s hope that multilib will not be needed in future.

? If you are running 64-bit Slackware, then you should download the 32-bit version of the OpenAL package and use the “convertpkg-compat32” program in order to create a multilib “compat32” package. You need to install that, instead of using the 64-bit package, otherwise Wine will not work. For instance (version and build numbers may change over time) using these commands:

# convertpkg-compat32 -i OpenAL-1.15.1-i486-2alien.tgz
# upgradepkg –install-new /tmp/OpenAL-compat32-1.15.1-x86_64-2aliencompat32.tgz

? The webcore-fonts-installer is a nifty package. It does not contain any Microsoft font (therefore I am allowed to distribute the package), but the post-installation script will automatically download and install the Microsoft Core Fonts for the Web for you. These fonts are required by SilverLight.

? Then, open a terminal and check out the new functionality by running the “pipelight-plugin” program. Use it to list the available plugins and to enable/disable one or more of these plugins. Do this as your own user account, not as the root user! The result of enabling a plugin is that a symbolic link to the corresponding shared library will be created in your ~/.mozilla/plugins/ directory.

$ pipelight-plugin –help

Supported plugins:
silverlight5.1
silverlight5.0
silverlight4
flash
shockwave
unity3d
$ pipelight-plugin –enable silverlight
Plugin silverlight5.1 is now enabled
$ pipelight-plugin –list-enabled
silverlight5.1

? Install a browser User Agent switcher. Some SilverLight sites will tell your Linux browser that it is unsupported, and you will have to make the server believe that your browser is running on Windows. For Firefox, you should pick https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider .

? Start your Firefox or Chrome browser (Konqueror should work too but I did not test that) and open the URL http://fds-team.de/pipelight/ which is the team’s diagnostics page. You can select one of the available plugins to test, and this will trigger the browser to try and load that pipelight plugin. The first time the plugin loads, it will automatically download and install the required Windows programs using the customized wine-pipelight program. You will see a few Windows installation dialogs (for SilverLight etc). These do not require any interaction, and you can sit back and relax. It will only take a short while, and then the disgnostics page will show the plugin’s status. The wine-pipelight program will install all its files in its own wine prefix so that it will not interfere with a “normal” version of  Wine which you may have installed already. The directory which is used, is  ~/.wine-pipelight/ .

pipelight03

SilverLight DRM (protected content) on Linux

In order to play protected content in SilverLight, Microsoft has invented PlayReady. The customized version of Wine which comes with Pipelight (wine-pipelight) implements this DRM support through Linux Extended Attributes (xattr). Your kernel has to support it for the filesystem you use. Slackware’s kernels have enabled this for most filesystems (below output is for a Slackware 13.37 kernel):

# zcat /proc/config.gz | grep XATTR
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_REISERFS_FS_XATTR=y
# CONFIG_JFFS2_FS_XATTR is not set
CONFIG_UBIFS_FS_XATTR=y
CONFIG_SQUASHFS_XATTR=y
# CONFIG_CIFS_XATTR is not set

The Linux extended filesystems (ext2, ext3, ext4) enable extended attributes by default when you mount them. Other filesystem types may require a mount option in /etc/fstab.

Troubleshooting Pipelight issues

  • Running Firefox from the command line will show debugging output from the pipelight plugin when you go to http://fds-team.de/pipelight/
  • When using the UserAgent control to spoof your browser and OS, try not to pick MS Internet Explorer. Apparently, only disguising as Firefox/Windows will work with Netflix.
  • If you are using Firefox and the pipelight diagnostics page informs you that SilverLight was installed OK but that your browser’s plugin cache needs to be cleared, you should follow the advice. If you don’t do that, Firefox will not reload the plugin on the next start. To clear the plugin cache, type “about:support” in your address line and hit Enter. You should now see a button which opens your profile directory. Click on it and remove the “pluginreg.dat” file. Restart your browser and check if it works (don’t worry, the “pluginreg.dat” file will be automatically re-created).
  •  If Netflix informs you that you are logged in with another browser or tab and you are certain that you are not, you need to close your browser windows and then kill off all of the wine services, plugin-container and pluginloader.exe processes. Then start your browser again. The Wine processes are left-overs from a previous (failed) attempt to load the pipelight plugin.

Enjoy! Eric

Newer posts »

© 2024 Alien Pastures

Theme by Anders NorenUp ↑