打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Adobe Flash Player Hardware Acceleration on Intel Graphics Cards ~ Web Upd8: Ubuntu / Linux blog
libvdpau-va-gl is a VDPAU driver that uses OpenGL under the hood to accelerate drawing and scaling, and VA-API (if available) to accelerate video decoding.

Using it, you can get hardware acceleration on some Intel graphics cards for Mplayer (well, we already have mplayer-vaapi but it hasn't been merged) and even Adobe Flash Player. That means a lot less CPU usage as you'll see below. 


AMD users: in theory, this should also work with AMD cards (Catalyst) however, from what users are reporting, it doesn't seem to work properly and the libvdpau-va-gl developer said that he can only test this on Intel, so it's unlikely that the AMD bugs will be fixed soon. However, the open source AMD drivers should have built-in VDPAU support (you need Linux 3.10 and Mesa 9.2).

In my test (Ubuntu 13.10, Intel graphics), a full-screen 1080p flash YouTube video used around 160-170% CPU without libvdpau-va-gl and about 14-17% CPU when using libvdpau-va-gl. There were some occasional spikes when using libvdpau-va-gl, but usually it stayed around those values which is a really great improvement.

Note: I've tested this with Firefox and Chromium browsers with Adobe Flash Player 11.2 r202. It doesn't seem to work with Pepper Flash (available by default in Google Chrome).

libvdpau-va-gl is work-in-progress and while it has worked properly with Adobe Flash Player / Firefox on my system, it may not work properly for you or it may cause problems with other VDPAU-enabled applications and for this reason, it's advisable not to use this system-wide.

Below you can watch a quick video demoing the CPU usage for a YouTube flash video, with and without libvdpau-va-gl:




Install and set up libvdpau-va-gl in Ubuntu


Important: make sure libvdpau-va-gl1 is not enabled system-wide because it causes Nvidia Settings to crash on start - if it is, either disable it or simply remove the package.

1. Firstly, install the VAAPI drivers (for Intel HD Graphics as well as G45 and later)::
sudo apt-get install i965-va-driver

2. Install libvdpau-va-gl by using the main WebUpd8 PPA (I've used Vincent Bernat's Debian packaging - thanks!):
sudo add-apt-repository ppa:nilarimogard/webupd8sudo apt-get updatesudo apt-get install libvdpau-va-gl1

3. Adobe Flash doesn't use hardware acceleration by default on Linux so we'll have to force it:
sudo mkdir -p /etc/adobeecho "EnableLinuxHWVideoDecode=1" | sudo tee /etc/adobe/mms.cfgecho "OverrideGPUValidation=1" | sudo tee -a /etc/adobe/mms.cfg

4. Like I was telling you above, it's not a good idea to enable libvdpau-va-gl system-wide yet. Instead, you can simply launch an application with "VDPAU_DRIVER=va_gl".

Example: to launch Firefox with libvdpau-va-gl enabled, use:
VDPAU_DRIVER=va_gl firefox

To enable libvdpau-va-gl system-wide (not recommended for now because this may cause problems with some VDPAU-enabled applications), you need to open /etc/X11/Xsession.d/20vdpau-va-gl as root with a text editor and uncomment (remove the "#" in front of the lines) the last two lines. Or simply copy/paste the commands below:
sudo sed -i "s/^# \[/\[/g" /etc/X11/Xsession.d/20vdpau-va-glsudo sed -i "s/^#   export/  export/g" /etc/X11/Xsession.d/20vdpau-va-gl

5. Optional: check if libvdpau-va-gl/VDPAU is working.

You can check if libvdpau-va-gl is working and Adobe Flash Player uses hardware acceleration by right clicking a Flash video on YouTube and selecting "Stats for nerds". The stats box that shows up should display the following: "accelerated video rendering, accelerated video decoding", like in this screenshot.

Another way to check if libvdpau-va-gl/VDPAU is working propely, install vdpauinfo:
sudo apt-get install vdpauinfo

Then, run:
VDPAU_DRIVER=va_gl vdpauinfo

And you should get something like THIS. If you get an error (for example "Failed to open VDPAU backend"), either your graphics card doesn't support VA-API (since this VDPAU driver requires VA-API) or you've missed a step from the instructions above.


Arch Linux users can install libvdpau-va-gl from AUR.

For more information, source code or bug reports, see the libvdpau-va-gl GitHub page.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Coding Chase
完美解决Android中AVD模拟器启动慢(卡在Android启动界面)等问题
ADT中通过Android SDK Manager安装Intel Hardware Accelerated Execution Manager(Haxm) | 在路上
ubuntu安装NVIDIA驱动
加快android emulator启动速度
emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服