Difference between revisions of "VA-API"

From ArchWiki
Jump to: navigation, search
(update link(s) (avoid redirect))
m (Supported software links to articles.)
Line 9: Line 9:
 
'''[http://www.freedesktop.org/wiki/Software/vaapi Video Acceleration API]''' is a specification and open source library to provide hardware accelerated video decode/encode.
 
'''[http://www.freedesktop.org/wiki/Software/vaapi Video Acceleration API]''' is a specification and open source library to provide hardware accelerated video decode/encode.
  
==Supported hardware==
+
== Supported hardware ==
  
 
'''Open source drivers:'''
 
'''Open source drivers:'''
  
*[[ATI|AMD]] Radeon 9500 and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|ati-dri}} driver.
+
* [[ATI|AMD]] Radeon 9500 and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|ati-dri}} driver.
  
*[[Intel Graphics|Intel]] GMA 4500 series and newer GPUs are supported by the {{pkg|libva-intel-driver}} package, available in the [[official repositories]].
+
* [[Intel Graphics|Intel]] GMA 4500 series and newer GPUs are supported by the {{pkg|libva-intel-driver}} package, available in the [[official repositories]].
  
*[[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|nouveau-dri}} driver. It uses the {{AUR|nouveau-fw}} package, which contains the required firmware to operate that is presently extracted from the NVIDIA binary driver.
+
* [[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|nouveau-dri}} driver. It uses the {{AUR|nouveau-fw}} package, which contains the required firmware to operate that is presently extracted from the NVIDIA binary driver.
  
 
'''Proprietary drivers:'''
 
'''Proprietary drivers:'''
  
*[[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{AUR|libva-xvba-driver}} package, available in the [[AUR]]. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-legacy-utils}} for Radeon HD 4000 series.
+
* [[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{AUR|libva-xvba-driver}} package, available in the [[AUR]]. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-legacy-utils}} for Radeon HD 4000 series.
  
*[[NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|nvidia-utils}} driver.
+
* [[NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package (available in the [[official repositories]]) together with the {{pkg|nvidia-utils}} driver.
 +
 
 +
=== Supported formats ===
  
===Supported formats===
 
 
{| class="wikitable" border="1" cellpadding="2" style="width: 100%"
 
{| class="wikitable" border="1" cellpadding="2" style="width: 100%"
 
!  
 
!  
Line 82: Line 83:
 
''VAEntrypointVLD'' means that your card is capable to decode this format, ''VAEntrypointEncSlice'' means that you can encode to this format.
 
''VAEntrypointVLD'' means that your card is capable to decode this format, ''VAEntrypointEncSlice'' means that you can encode to this format.
  
===Configuration===
+
=== Configuration ===
{{pkg|libva-vdpau-driver}} has to be enabled manually with an [[Environment variables|environment variable]] [[Environment variables#Defining_Variables_Globally|globally]] or [[Environment variables#Defining_Variables_Locally|locally per user]].
+
 
 +
{{Pkg|libva-vdpau-driver}} has to be enabled manually with an [[Environment variables|environment variable]] [[Environment variables#Defining_Variables_Globally|globally]] or [[Environment variables#Defining_Variables_Locally|locally per user]].
  
 
  export LIBVA_DRIVER_NAME=vdpau
 
  export LIBVA_DRIVER_NAME=vdpau
  
==Supported software==
+
== Supported software ==
=== [[GStreamer]] ===
 
Install {{pkg|gst-vaapi}} package, available in the [[official repositories]].
 
{{bc|$ gst-launch-1.0 playbin uri=file://''/path/to/foobar.mpeg''}}
 
VA-API is used automatically, if supported format found.
 
 
 
GStreamer based players:
 
* {{pkg|totem}}: no configuration needed.
 
 
 
=== [[VLC media player]] ===
 
Install {{pkg|vlc}} package, available in the [[official repositories]].
 
 
 
To enable hardware acceleration: {{ic|Tools -> Preferences -> Input & Codecs}}, then check "''Use GPU accelerated decoding''".
 
 
 
To enable hardware acceleration since version 2.1.x: {{ic|Tools -> Preferences -> Input & Codecs}}, then choose under "''Hardware-accelerated decoding''" the suitable item, e.g. "''Video Acceleration (VA) API''".
 
 
 
=== [[Mpv]] ===
 
Install {{Pkg|mpv}} from the [[official repositories]].
 
For vaapi decoding with high quality opengl output:
 
  $ mpv --vo=opengl --hwdec=vaapi ''foobar.mkv''
 
Or to use vaapi for displaying the video as well:
 
  $ mpv --vo=vaapi --hwdec=vaapi ''foobar.mkv''
 
Hardware deinterlacing is also supported through the vaapi video post-processing api
 
  $ mpv --vo=opengl --hwdec=vaapi --vf=vavpp=deint=bob ''foobar.mkv''
 
 
 
 
 
To use vaapi with any other video output methods requires the less efficient vaapi-copy method
 
  $ mpv --vo=wayland --hwdec=vaapi-copy ''foobar.mkv''
 
this copies the decoded video back to main memory. It is also necssary for non-vavpp filters
 
  $ mpv --vo=opengl --hwdec=vaapi-copy --vf=pp=hb/vb/dr/al/fd  ''foobar.mkv''
 
 
 
=== [[MPlayer]] ===
 
Mainline mplayer doesn't have vaapi support. There is however a the {{pkg|mplayer-vaapi}} fork, available in the [[official repositories]].
 
{{bc|$ mplayer -vo vaapi -va vaapi ''foobar.mpeg''}}
 
*'''-vo''' - Select vaapi video output driver
 
*'''-va''' - Select vaapi video decoder driver
 
 
 
{{Note|You can also use {{AUR|mplayer2}} with VDPAU backend. See [[MPlayer#Enabling_VDPAU]] for more information.}}
 
  
MPlayer based players:
+
* [[GStreamer]] based players - VA-API is used automatically, if supported format found.
* {{pkg|gnome-mplayer}}: to enable hardware acceleration: {{ic|Edit -> Preferences -> Player}}, then set Video Output to "''vaapi''".
+
: See more at http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+8%3A+Hardware-accelerated+video+decoding.
* {{pkg|smplayer}}: to enable hardware acceleration: {{ic|Options -> Preferences -> General -> Video}}, then set Output driver to "''vaapi''".
+
* [[VLC media player]] - See [[VLC media player#Harware accelleration support|article]].
 +
* [[Mpv]] - See [[Mpv#Hardware Decoding|article]].
 +
* [[MPlayer]] - See [[MPlayer#Enabling VA-API|article]].

Revision as of 10:53, 6 March 2014

zh-CN:VA-API

Video Acceleration API is a specification and open source library to provide hardware accelerated video decode/encode.

Supported hardware

Open source drivers:

Proprietary drivers:

Supported formats

libva-vdpau-driver with ati-dri libva-intel-driver libva-vdpau-driver with nouveau-dri libva-xvba-driverAUR libva-vdpau-driver with nvidia-utils
MPEG2 decoding AMD Radeon 9500 and newer Intel GMA 4500 and newer Nvidia GeForce 8 and newer AMD Radeon HD 4000 and newer Nvidia GeForce 8 and newer
MPEG4 decoding AMD Radeon HD 6000 and newer - Nvidia GeForce 200 and newer AMD Radeon HD 6000 and newer Nvidia GeForce 200 and newer
H264 decoding AMD Radeon HD 4000 and newer Intel GMA 45001, Ironlake Graphics and newer Nvidia GeForce 8 and newer AMD Radeon HD 4000 and newer Nvidia GeForce 8 and newer
VC1 decoding AMD Radeon HD 4000 and newer Intel Sandy Bridge Graphics and newer Nvidia GeForce 8200, 8300, 8400, 9300, 200 and newer AMD Radeon HD 4000 and newer Nvidia GeForce 8 and newer
MPEG2 encoding - Intel Ivy Bridge Graphics and newer - - -
H264 encoding - Intel Sandy Bridge Graphics and newer - - -

1Supported by the libva-driver-intel-g45-h264 package. See H.264 decoding on GMA 4500 for instructions and caveats.

In order to check what profiles (features) are supported by your GPU, run the following command, which provided by the libva package:

$ vainfo

VAEntrypointVLD means that your card is capable to decode this format, VAEntrypointEncSlice means that you can encode to this format.

Configuration

libva-vdpau-driver has to be enabled manually with an environment variable globally or locally per user.

export LIBVA_DRIVER_NAME=vdpau

Supported software

  • GStreamer based players - VA-API is used automatically, if supported format found.
See more at http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+8%3A+Hardware-accelerated+video+decoding.