Friday, December 4, 2015

How to watch paid videos on Youtube/Google Play on Debian Linux with DRM

In order to watch paid videos from youtube/google play on Debian/Firefox, you need the latest flash plugin.  To to get this, run

sudo apt-get install flashplugin-nonfree

If you already have flashplugin-nonfree installed, you should run

update-flashplugin-nonfree --install

You can then run

update-flashplugin-nonfree --status

to verify that you have the latest version. Once you have the latest flash version, you need to install HAL for the flash DRM playback to work.  Unfortunately, HAL is deprecated, so you have two options: First is to install zombie hal which is a version of hal that has been kept alive for purposes of DRM support.  Unfortunately, zombie hal is for ubuntu, and my attempts to use it on debian didn't work.  The second option is hal-flash  which is a fake version of hal designed to be just functional enough that flash will accept it.  In order to install on debian, just download the source code, and run dpkg-buildpackage from the source directory. It will tell you any required packages you need to install, and when it finishes running, it will produce a .deb file in the parent directory, which you can install directly.

After installing hal-flash, I cleared the adobe cache which is suggested by many instructions online by deleting the .adobe directory.

At this point, I was still getting the message "an error occurred. please try again later".  To investigate, I used the rightclick -> copy debug info.  On inspection of this info, it looked to be url encoded, so I used an online url decoder to inspect the contents.  The key part of the decoded info was the section "debug_error=[ErrorEvent type="FlashAccess:3315:0" bubbles=false cancelable=false eventPhase=2 text=""]".  To investigate this further, I opened firebug, and looked at the net panel, to see the network activity taking place.  It turned out that the request to youtube.com/crossdomain.xml was never completing, and I eventually figured out that this was due to the plugin HTTPS everywhere I had installed.

After disabling HTTPS everywhere, it began to work on one computer, but on the other computer, the same steps still left it broken, giving me an error message "There is an error with your flash player. Click here, select reset license files, and restart your browser".  The debug info showed me that this is caused by error "FlashAccess:3329:500".  This indicates according to the flash reference that it is some sort of "application specific error", meaning I'd need google/youtube's help debugging it further, which they don't offer.  My own investigation of the network traffic just seems to indicate that nothing is going obviously wrong.

Hopefully these steps are useful to you!