Pipelight

From ArchWiki
Revision as of 04:18, 7 September 2014 by Sylvite (talk | contribs) (Undo revision 334157 by Sylvite (talk))
Jump to navigation Jump to search

Pipelight is a special browser plugin which allows one to use Windows-only plugins inside Linux browsers. The main focus of the project is on Silverlight and its features, such as watching DRM protected videos. It works by creating a bridge between a Windows application, which handles the Windows-only plugin (e.g. Silverlight), and a native Linux browser plugin. The Windows application is run using a patched version of Wine, therefore requiring Pipelight users to move to this version. Pipelight can be used in popular browsers such as Firefox and Chromium.

Update 19 August 2014: Using the latest version of google-chromeAUR (v37+), you can now watch Netflix without the need to install Silverlight/Pipelight. This is because of the inclusion of the Widevine content decryption plugin which satisfies Netflix's DRM requirements. To use HTML5, you still need you need to set your Netflix prefs to use HTML5 and use a custom browser user-agent string such as "Mozilla/5.0 (Windows NT 6.3; Win 64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2121.3 Safari/537.36" (without quotes).

This should move to other browsers e.g. Firefox (who have agreed to implement the HTML5 code) in due course.

Installation

Pipelight is not presently available in the official repositories, and can be either installed from the AUR or the unofficial [pipelight] repository, maintained by the Pipelight developers.

Installing from the AUR

Pipelight is available in the AUR as the pipelightAUR package.

Installing from the unofficial pipelight repositories

Pre-built Pipelight packages for Arch Linux can be obtained from the unofficial pipelight repository, which is maintained by the Pipelight developers. Since these packages are pre-built, it does not require the time expensive task of compiling wine from sources.

User Agent

Since sites like Netflix refuse to stream on a Linux browser, the user agent may have to be changed

Verification

There is a test page available here. Alternatively, detected plugins can be listed in about:plugins.

GPU Acceleration in Silverlight

Default behavior

Silverlight applets may include an option called enableGPUAcceleration which controls whether or not hardware acceleration should be used (i.e. use the graphics card for video playback). This option is under the control of specific website's administrator, but this option can also be forced from the client's side (see below). By default, GPU acceleration is only enabled on verified systems cards and pages that require it. Herein, system verification is executed through the bash script /usr/share/pipelight/hw-accel-default that checks the graphics card vendor. Note that this script depends on the glxinfo utility, which is part of mesa-demos. Make sure this package is installed if you want to Pipelight's graphics verification method.

Force hardware acceleration

To take control of the enableGPUAcceleration option yourself and enable hardware acceleration by default, perform the following steps:

In case you have no Pipelight configuation file for Silverlight, copy the default one to your user's home directory:

$ cp /usr/share/pipelight/configs/pipelight-silverlight5.1 ~/.config/

Then edit the created file ~/.config/pipelight-silverlight5.1 and change the following line:

# overwriteArg      = enableGPUAcceleration=true

to:

overwriteArg      = enableGPUAcceleration=true

Disable graphics card verification

Pipelight has been tested on graphics cards from several vendors. The known-to-work card are whitelisted and are the only cards that Pipelight enables hardware acceleration on by default. This behavior can be circumvented by disabling the hardware verification procedure. However, it is recommended to check the output of the verfication procedure first. Make sure you have mesa-demos installed and run:

/usr/share/pipelight/hw-accel-default
echo $?

If this returns 0, your card is identified as a whitelisted card, otherwise it is not. In that case, you might try to disable verification. First copy Pipelight's default Silverlight configuration file to your home directory (see above), then change:

silverlightGraphicDriverCheck  = /usr/share/pipelight/hw-accel-default

to:

silverlightGraphicDriverCheck = /bin/true

Custom variables

The selection of custom variables found in Wine-Silverlight and Pipelight are as following:

  1. customprefix
    • Installs Wine to /opt instead of /usr (to not conflict with wine).
  2. _prefix
    • Allows setting a custom location.
  1. _prefix
    • Allows setting a custom location. Default is /usr.
  2. _wine
    • Location of Wine-Silverlight.

For example, to install Wine-Silverlight in /opt:

  • wine-silverlight: set customprefix=1.
  • pipelight: set _wine=/opt/wine-silverlight.
Warning: Failure to do this in the PKGBUILD will result in the files having to be modified manually.

Other plugins

Pipelight can also be used for other browser plugins as well including Adobe Flash Player and Shockwave Player. To list all available plugins, run

$ pipelight-plugin --help

Then to enable the plugin globally,

# pipelight-plugin --enable plugin

or locally,

$ pipelight-plugin --enable plugin

Troubleshooting

Pipelight stopped working after upgrade of chromium (version 35+)

NPAPI support has now been dropped from chromium. If you want to recompile in NPAPI support yourself, patches from Michael Müller are attached to this bug [1] The patches are originally from: [2]

Videos playing very fast and no sound / bad sound quality

Note: This solution is taken from this page at the Pipelight's LaunchPad page and editted to reflect changes in newer version of Pipelight.

One of the causes of bad sound quality or laggy playback might be the use of pulseaudio. Since Pipelight uses wine to handle the audio playback, changing the audio output module there can solve some problems. A good alternative to pulseaudio is alsa and can be enabled as follows.

First download, install and run the winetricks plugin.

wget -O ~/.wine-pipelight/winetricks http://winetricks.org/winetricks
chmod +x ~/.wine-pipelight/winetricks
WINEPREFIX=~/.wine-pipelight WINE=/opt/wine-compholio/bin/wine WINEARCH=win32 ~/.wine-pipelight/winetricks

Choose: "Select the default wineprefix" -> "Change Wine settings" -> "sound=alsa"

Then test whether this solves your problem (restart your browser and open a Silverlight video). If not, change the audio output device in wine to analog. Run the wine configuration utility:

WINEPREFIX=~/.wine-pipelight WINE=/opt/wine-compholio/bin/wine WINEARCH=win32 /opt/wine-compholio/bin/winecfg

Open the Audio tab and change the Output device to Out: HDA Intel - ALC1200 Analog

Note: The actual device name may vary from system to system.

This may solve video lagging issues if PulseAudio was causing it. ALSA audio might still go through PulseAudio though, if you have pulseaudio-alsa installed. This is not a problem by itself, but you may have to restart PulseAudio. This is done by runnning:

pulseaudio -k

GNOME 3/Firefox fullscreen issues

In GNOME 3, fullscreen pipelight windows do not focus properly in firefox. This can be fixed using devilspie:

First, install devilspie from the official repositories,

Create the ~/.devilspie directory:

# mkdir ~/.devilspie

Next, create the following file:

~/.devilspie/pipelight-fullscreen-firefox.ds
(if
    (and
        (is (window_class) "Wine")
        (or
            (is (application_name) "Adobe Flash Player")
            (is (application_name) "Microsoft Silverlight")
        )
    )
    (begin
        (focus)
    )
)

Finally we need to make devilspie autostart. This can be accomplished by creating the following file:

~/.config/autostart/devilspie.desktop
[Desktop Entry]
Name=devilspie
Exec=devilspie
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true

Pipelight renders all Chinese characters as squares

Silverlight will only use ”Microsoft Yahei” font to render Chinese characters, you need to install this font(probably from other Windows OSes) to support Chinese character rendering

Other known issues and solutions are often listed in the Pipelight FAQ.

No sound when using pulseaudio

If you are using pulseaudio you may get no sound from silverlight applications. To allow wine to use pulseaudio you have to install "libpulse" and "libalsa-plugins". On 64 Bit systems use "lib32-libpulse" and "lib32-alsa-plugins". You can configure the used audio device using WINEPREFIX="/home/username/.wine-pipelight" winecfg

Tips

Test 1080p video playback

To verify your Pipelight installation and check its performance on high definition videos, you can use this video for testing purposes.

See also