Difference between revisions of "Flash DRM content"

From ArchWiki
Jump to: navigation, search
(Added instructions to clear Flash Player caches)
m (chromium-pepper-flash renamed to pepper-flash)
 
(23 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Player]]
+
[[Category:Multimedia players]]
If you try to watch Amazon Instant Video, you may see the following error: '''''an error occurred and your player could not be updated'''''
+
[[ja:Flash DRM コンテンツ]]
 +
DRM content on Flash still requires HAL to play. This is apparent for example with Google Play Movies, Amazon Instant Video, WatchESPN or Demand 5 (Channel 5 UK). If you attempt to play a DRM-protected content without HAL, you may see the following error: {{ic|an error occurred and your player could not be updated}}.
  
Amazon Instant Video requires the HAL daemon to be running. As it is deprecated, it is not likely to be installed on newer systems. Checking to see if hal is installed is easy, simply run the following command:
+
To deliver DRM-protected content, Flash calls several functions provided by the HAL daemon and its libraries. While Flash-based players remain popular, HAL has been deprecated and is not commonly installed on newer systems. To provide the necessary HAL functionality on such systems, you can either install the full HAL package and run the HAL daemon or install a modified HAL library "stub" that uses the modern UDisks daemon instead.
  
$ pacman -Qi hal hal-info
+
{{Note|Google Chrome's Pepper Flash plugin for Chromium, {{AUR|pepper-flash}}, does not support DRM. Adobe's {{Pkg|flashplugin}} supports DRM, but that's stuck at version 11.2; too old for some video players. {{AUR|adobe-flashplugin}}{{Broken package link|package not found}} provides an up to date version, but it's PPAPI, not the old NPAPI, so Firefox needs {{AUR|freshplayerplugin}}.}}
  
If hal is not installed, you will need to install [https://aur.archlinux.org/packages.php?ID=51454 hal] and [https://aur.archlinux.org/packages.php?ID=51457 hal-info] from the [[Arch User Repository|AUR]]. hal-info is a dependency of hal and should be installed first.
+
== Using the HAL package ==
  
Once you have confirmed that hal is installed, start the daemon.
+
Install the {{AUR|hal}} package from the [[AUR]]. You will need to install {{AUR|hal-info}} first as it is a dependency for {{AUR|hal}}.
  
'''sysvinit:'''
+
=== Running the HAL daemon ===
# /etc/rc.d/hal start
+
  
'''systemd:'''
+
The HAL daemon is managed by {{ic|hal.service}}, which can be controlled by [[systemd#Using units|systemctl]].
# systemctl start hal.service
+
  
You may also wish to enable the daemon at boot, either by adding '''hal''' to your '''DAEMONS''' array in /etc/rc.conf (if using sysvinit), or by running '''systemctl enable hal.service''' as root (if running systemd).
+
Alternatively, one can use the following script, which also takes care of [[#Remove Flash Player cached files|cleaning the cache]].
  
Finally, remove some Flash Player cached files:
+
{{bc|<nowiki>
 +
#!/bin/bash
  
  $ cd ~/.adobe/Flash_Player
+
## written by Mark Lee <bluerider>
  $ rm -rf NativeCache AssetCache APSPrivateData2
+
## using information from <https://wiki.archlinux.org/index.php/Chromium#Google_Play_.26_Flash>
 +
 
 +
## Start and stop Hal service on command for Google Play Movie service
 +
 
 +
function main () { ## run the main insertion function
 +
    clear-cache;  ## remove adobe cache
 +
    start-hal;  ## start the hal daemon
 +
    read -p "Press 'enter' to stop hal";  ## pause the command line with a read line
 +
    stop-hal;  ## stop the hal daemon
 +
}
 +
 
 +
function clear-cache () {  ## remove adobe cache
 +
    cd ~/.adobe/Flash_Player;  ## go to Flash player user directory
 +
    rm -rf NativeCache AssetCache APSPrivateData2;  ## remove cache
 +
}
 +
 
 +
function start-hal () {  ## start the hal daemon
 +
    sudo systemctl start hal.service && ( ## systemd : start hal daemon
 +
          echo "Started hal service..."
 +
) || (
 +
          echo "Failed to start hal service!")
 +
}
 +
 
 +
function stop-hal () {  ## stop the hal daemon
 +
sudo systemctl stop hal.service && (  ## systemd : stop hal daemon
 +
          echo "Stopped hal service..."
 +
    ) || (
 +
          echo "Failed to stop hal service!"
 +
    )
 +
}
 +
 
 +
main;  ## run the main insertion function
 +
</nowiki>}}
 +
 
 +
== Using the modified libhal stub ==
 +
 
 +
As an alternative to installing all of HAL, you can install a modified version of the libhal library from the [[AUR]] that uses the modern UDisks daemon instead of the deprecated HAL. Note that this libhal provides just enough of the HAL functionality to meet Flash's needs for copy-protected delivery: if you have other programs that require HAL, this stub probably won't satisfy them and you should use the full hal package instead.
 +
 
 +
=== Installing UDisks and hal-flash ===
 +
 
 +
You will need to install {{AUR|hal-flash}} from the [[AUR]], which relies on [[Udisks]].
 +
 
 +
=== Running UDisks ===
 +
 
 +
Since the libhal stub passes its calls to UDisks, UDisks should be running before you attempt to play DRM-protected Flash videos.
 +
 
 +
Make sure that {{ic|udisks2.service}} is started, see [[systemd#Using units]] for details.
 +
 
 +
== Remove Flash Player cached files ==
 +
 
 +
To get a fresh start after installing the package(s), remove some Flash Player cached files:
 +
 
 +
  $ rm -rf ~/.adobe/Flash_Player/{NativeCache,AssetCache,APSPrivateData2}
 +
 
 +
== See also ==
 +
 
 +
* [http://isenmann.blogspot.gr/2012/08/watching-movies-from-google-play-with.html Watching movies from Google Play on Arch Linux]

Latest revision as of 07:34, 23 September 2016

DRM content on Flash still requires HAL to play. This is apparent for example with Google Play Movies, Amazon Instant Video, WatchESPN or Demand 5 (Channel 5 UK). If you attempt to play a DRM-protected content without HAL, you may see the following error: an error occurred and your player could not be updated.

To deliver DRM-protected content, Flash calls several functions provided by the HAL daemon and its libraries. While Flash-based players remain popular, HAL has been deprecated and is not commonly installed on newer systems. To provide the necessary HAL functionality on such systems, you can either install the full HAL package and run the HAL daemon or install a modified HAL library "stub" that uses the modern UDisks daemon instead.

Note: Google Chrome's Pepper Flash plugin for Chromium, pepper-flashAUR, does not support DRM. Adobe's flashplugin supports DRM, but that's stuck at version 11.2; too old for some video players. adobe-flashpluginAUR[broken link: package not found] provides an up to date version, but it's PPAPI, not the old NPAPI, so Firefox needs freshplayerpluginAUR.

Using the HAL package

Install the halAUR package from the AUR. You will need to install hal-infoAUR first as it is a dependency for halAUR.

Running the HAL daemon

The HAL daemon is managed by hal.service, which can be controlled by systemctl.

Alternatively, one can use the following script, which also takes care of cleaning the cache.

#!/bin/bash

## written by Mark Lee <bluerider>
## using information from <https://wiki.archlinux.org/index.php/Chromium#Google_Play_.26_Flash>

## Start and stop Hal service on command for Google Play Movie service

function main () {  ## run the main insertion function
     clear-cache;  ## remove adobe cache
     start-hal;  ## start the hal daemon
     read -p "Press 'enter' to stop hal";  ## pause the command line with a read line
     stop-hal;  ## stop the hal daemon
}

function clear-cache () {  ## remove adobe cache
     cd ~/.adobe/Flash_Player;  ## go to Flash player user directory
     rm -rf NativeCache AssetCache APSPrivateData2;  ## remove cache
}

function start-hal () {  ## start the hal daemon
     sudo systemctl start hal.service && ( ## systemd : start hal daemon
          echo "Started hal service..."
) || (
          echo "Failed to start hal service!") 
}

function stop-hal () {  ## stop the hal daemon
sudo systemctl stop hal.service && (  ## systemd : stop hal daemon
          echo "Stopped hal service..."
     ) || (
          echo "Failed to stop hal service!"
     )
}

main;  ## run the main insertion function

Using the modified libhal stub

As an alternative to installing all of HAL, you can install a modified version of the libhal library from the AUR that uses the modern UDisks daemon instead of the deprecated HAL. Note that this libhal provides just enough of the HAL functionality to meet Flash's needs for copy-protected delivery: if you have other programs that require HAL, this stub probably won't satisfy them and you should use the full hal package instead.

Installing UDisks and hal-flash

You will need to install hal-flashAUR from the AUR, which relies on Udisks.

Running UDisks

Since the libhal stub passes its calls to UDisks, UDisks should be running before you attempt to play DRM-protected Flash videos.

Make sure that udisks2.service is started, see systemd#Using units for details.

Remove Flash Player cached files

To get a fresh start after installing the package(s), remove some Flash Player cached files:

$ rm -rf ~/.adobe/Flash_Player/{NativeCache,AssetCache,APSPrivateData2}

See also