Video playback lags or is slow

Created by Michael Müller
Keywords:
Last updated by:
Sebastian Lackner

---------------
If you are using Pipelight 0.1-2 or newer, please try to force hardware acceleration before using the tip described in this faq entry. You can find more information on how you can change this in the following faq entry: https://answers.launchpad.net/pipelight/+faq/2364
---------------

Getting a good video playback performance with Silverlight is a bit tricky. The NPAPI defines two models of drawing and handling events: windowed and windowless mode. Both terms do not define if the window is embedded inside the browser window, they are just used internally. The default setting is windowed mode, which has the disadvantage that the drawing of video frames is linked to a timer inside the browser (usually this would be linked to the drawing process of the browser, but for Pipelight things are a bit different). You can manually switch to the windowless mode, which has a better overall performance (only a tiny part of the drawing is linked to the browser), by editing the config of Pipelight. Simply copy the default config to ~/.config/:

(Pipelight version >= 0.2.4)
cp /usr/share/pipelight/configs/pipelight-silverlight5.1 $HOME/.config/

(Pipelight version >= 0.2.0, but < 0.2.4)
cp /usr/share/pipelight/pipelight-silverlight5.1 $HOME/.config/

(Pipelight version < 0.2.0)
cp /usr/share/pipelight/pipelight $HOME/.config/

and change the value of windowlessmode to true in your new copy. While testing the different modes we figured out that there are some keyboard input problems within windowless mode, which is also the reason why it's not set by default. So please remember this and switch back if you have problems with your Silverlight application.