VDPAU (简体中文)
相关文章
Unix视频解码及演示 API (Video Decode and Presentation API for Unix,缩写为VDPAU)是一个开源的库,它使得部分的视频解码和视频后期处理任务转移到GPU硬件上。
Contents
支持的硬件
开源驱动:
- AMD: 位于官方软件仓库的 mesa-vdpau 软件包为 Radeon 9500 或更新的GPU提供支持。
- Intel: 位于官方软件仓库的libvdpau-va-gl和libva-intel-driver这两个软件包为 GMA 4500 系列或者更新的GPU提供支持。
- NVIDIA: 位于官方软件仓库的 mesa-vdpau 软件包为 GeForce 8 系列和更新的GPU提供支持。位于AUR的 nouveau-fwAUR 软件包包含从NVIDIA闭源驱动中提取出的必要的固件 。
闭源驱动:
- AMD: 位于官方软件仓库的libvdpau-va-gl、位于AUR的libva-xvba-driverAUR软件包两者为 Radeon HD 4000 系列或更新的GPU提供支持。在 Radeon HD 5000 系列或者更新的GPU上请使用 catalyst-utilsAUR 驱动;在 Radeon HD 4000 系列上 使用 catalyst-total-hd234kAUR 作为驱动程序。
- NVIDIA: 位于官方软件仓库的nvidia-utils软件包为 GeForce 400 系列或更新的GPU提供支持。
- GeForce 8/9 和 GeForce 100-300 系列由 nvidia-340xx-utils 软件包支持。
支持格式
开源 | 闭源 | ||||
---|---|---|---|---|---|
AMD | Intel | Nvidia | AMD | Nvidia | |
MPEG2 decoding | Radeon 9500 and newer | |
GeForce 8 and newer | |
GeForce 8 and newer |
MPEG4 decoding | Radeon HD 6000 and newer | |
GeForce 200 and newer | |
GeForce 200 and newer |
H.264 decoding | Radeon HD 4000 and newer | GMA 45001, Ironlake Graphics and newer | GeForce 8 and newer | Radeon HD 4000 and newer | GeForce 8 and newer |
HEVC (H.265) decoding | |
|
|
|
GeForce 9004 and newer |
VC1 decoding | Radeon HD 4000 and newer | |
GeForce 83 and newer | |
GeForce 83 and newer |
- 1 Supported by the libva-intel-driver-g45-h264AUR package. See Intel graphics#H.264 decoding on GMA 4500 for instructions and caveats.
- 2 As of version 0.3, the VA GL driver doesn't support any other hardware decoder than H.264.
- 3 Except GeForce 8800 Ultra, 8800 GTX, 8800 GTS (320/640 MB).
- 4 Except GeForce GTX 970 and GTX 980.
要检查一个功能是否被 GPU 支持,可以使用 vdpauinfo 软件包提供的命令:
$ vdpauinfo
配置
环境变量 VDPAU_DRIVER
决定使用的驱动。可以全局设置 或 针对一个用户 设置 环境变量
正确的驱动程序名称取决于您的设置:
- Intel 或 AMD Catalyst 使用
va_gl
. - 开源AMD/ATI驱动程序,您需要将它设置为适当的驱动程序版本取决于你的GPU。
- Nvidia的专有版本将变量设置为“nvidia”。
$ grep -i vdpau /var/log/Xorg.0.log
(II) RADEON(0): [DRI2] VDPAU driver: r300
然后设置 VDPAU 驱动:
VDPAU_DRIVER=r300
多显卡显示
对混合显卡(NVIDIA和AMD),需要设置下面环境变量。
$ export DRI_PRIME=1
更多信息,参阅 PRIME wiki 页面。
开启软件的硬件加速
- Adobe Flash Player — 见 Browser plugins#Adobe Flash Player.
- || flashplugin
- gnome-mplayer — 开启硬件加速: Edit > Preferences > Player, 设置 Video Output 为
vdpau
.
- SMplayer — 开启硬件加速: Options > Preferences > General > Video, 设置 Output driver 为
vdpau
.
- || smplayer
- bomi — 硬件加速可以启用: Preferences > Video > Hardware acceleration.
- https://bomi-player.github.io || bomiAUR bomi-gitAUR
- Mpv — 见 Mpv#Hardware Decoding.
- || mpv
- || vlc