Jun 18, 2015

Fresh Player Plugin Gets Hardware Accelerated Video Decoding Via VA-API And VDPAU

Fresh Player Plugin was updated recently with support for hardware accelerated video decoding via VA-API and VDPAU, along with video capture support (ALSA, JACK, PulseAudio) and other improvements.

Fresh Player Plugin is a wrapper that allows Linux users to use Pepper Flash from Google Chrome in Firefox and other NPAPI-compatible browsers. This is useful because the latest Flash Player is only available for Google Chrome (it comes bundled with it) on Linux, while other browsers, like Firefox, are stuck with an old Adobe Flash Player version (11.2).

Thanks to the new VA-API/VDPAU hardware accelerated video decoding available in the latest Fresh Player Plugin, Flash videos should use less CPU (because they'll be using the GPU).

Here's an example: with the same YouTube flash ( you can use the HTML5 video player on YouTube, but this is just for testing purposes) 1080p fullscreen video, I got a CPU usage of around 115% with Adobe Flash 11.2 without hardware accelerated video decoding and ~13% CPU usage using the latest Fresh Player plugin with accelerated video rendering (via VA-API) enabled:

Flash 11.2 (Firefox) without hardware acceleration

Fresh Player Plugin (with Flash 18 from Google Chrome, used in Firefox) with hardware accelerated video decoding enabled (VA-API)

Note that I edited the first screenshot: I manually added htop on top of the video (but what htop displays is real - it was running on my second monitor) because I couldn't get it to stay on top with Flash 11.2.

Fresh Player Plugin supports hardware accelerated video decoding via VA-API and VDPAU, under Ubuntu 15.04 and 14.10 only, because it requires a newer libav version, which is not available in the official Ubuntu 14.04 (and older) repositories. Also, this is disabled by default "due to possible whole system lock-ups on some hardware", so it might not work properly for everyone (but I didn't encounter any issues in my test).

To enable hardware accelerated video decoding via VA-API and VDPAU (Ubuntu 14.10 and 15.04 only), copy the example freshplayerplugin configuration file from /usr/share/doc/freshplayerplugin to ~/.config/ (and remove ".example" from the filename) - to do this, simply use the following command in a terminal:
cp /usr/share/doc/freshplayerplugin/freshwrapper.conf.example ~/.config/freshwrapper.conf

Then open ~/.config/freshwrapper.conf with a text editor, search for "enable_hwdec = 0" and change its value from "0" to "1". There are separate options for enabling/disabling VA-API and VDPAU too - look for "enable_vaapi" and "enable_vdpau" in the same file.

You'll also need to install the VA-API / VDPAU driver for this to work. For Intel graphics, you'll need to install the "i965-va-driver" package, for Nvidia you'll need "libvdpau1" and for AMD graphics you'll have to install "xvba-va-driver" (XvBA-based backend for VA API - AMD fglrx implementation). And of course, you'll need the latest Fresh Player Plugin from GIT (available in the main WebUpd8 PPA).

If you want to check if everything was configured properly, load a YouTube flash video, right click it, select "Stats for nerds" and the frame that shows up should say "accelerated video rendering, accelerated video decoding" (like in the second screenshot above).

Note that I only tested this with an Intel graphics card / VA-API (and Ubuntu 15.04).

Install Fresh Player Plugin

If you use Ubuntu / Linux Mint and derivatives, you can install Fresh Player Plugin by using the main WebUpd8 PPA. For installation and configuration instruction, see: Install Fresh Player Plugin In Ubuntu Via PPA (Pepper Flash Wrapper For Firefox)

Arch Linux users can install the latest Fresh Player Plugin (Git) via AUR.

For other Linux distributions, you'll have to compile it from source.

via Web Upd8 - Ubuntu / Linux blog http://ift.tt/1Txzxpf