Difference between revisions of "VA-API"

From ArchWiki
Jump to: navigation, search
(GStreamer: -)
(Made the configuration section clearer, added examples, added info about gallium.)
 
(72 intermediate revisions by 26 users not shown)
Line 1: Line 1:
 
[[Category:Graphics]]
 
[[Category:Graphics]]
[[Category:X Server]]
+
[[Category:X server]]
{{Article summary start}}
+
[[ja:VA-API]]
{{Article summary text|Explains VA-API support in various hardware and software components}}
+
[[ru:VA-API]]
{{Article summary heading|Related}}
+
[[zh-CN:VA-API]]
{{Article summary wiki|XvMC}}
+
{{Related articles start}}
{{Article summary wiki|MPlayer}}
+
{{Related|VDPAU}}
{{Article summary end}}
+
{{Related|XvMC}}
 +
{{Related articles end}}
  
'''[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 encoding and decoding.
  
==Supported hardware==
+
== Supported hardware ==
*[[NVIDIA]] GeForce 8 series and newer cards are supported by the {{pkg|libva-vdpau-driver}} package, available in the [[official repositories]]. It uses the proprietary {{pkg|nvidia-utils}} driver.
+
*[[Intel]] GMA 4500 series and newer GPUs are supported by the open source {{pkg|libva-intel-driver}} package, available in the [[official repositories]].
+
*[[ATI Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by {{pkg|xvba-video-open}} package, available in the [[official repositories]]. It uses the proprietary {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-legacy-utils}} for Radeon HD 4000 series. Recent {{Pkg|mesa}} versions together with [[ATI#Enabling video acceleration|AMD open source driver]] can decode some videos too, but number of formats supported is poor.
+
  
===Supported formats===
+
{{Expansion|1=[https://wiki.archlinux.org/index.php?title=ATI&diff=next&oldid=411145 This revision] contained some information about {{Pkg|libva-mesa-driver}} and {{ic|1=LIBVA_DRIVER_NAME=gallium}}, which should be added here.}}
{| class="wikitable" border="1" cellpadding="2" style="width: 100%"
+
 
 +
'''Open source drivers:'''
 +
 
 +
* [[ATI|AMD]] Radeon 9500 and newer GPUs are supported by either the {{pkg|libva-vdpau-driver}} package or the {{Pkg|libva-mesa-driver}} package, together with the {{pkg|mesa}} package.
 +
* [[Intel]] GMA 4500 series and newer GPUs are supported by the {{pkg|libva-intel-driver}} package together with the {{pkg|mesa}} package.
 +
* [[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package together with the {{pkg|mesa}} package. 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:'''
 +
 
 +
* [[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{AUR|libva-xvba-driver}} package. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-total-hd234k}} for Radeon HD 4000 series.
 +
* [[NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package together with the {{pkg|nvidia-utils}} driver.
 +
 
 +
=== Supported formats ===
 +
 
 +
{| class="wikitable" style="width: 100%"
 
!  
 
!  
! {{pkg|libva-vdpau-driver}}
+
! colspan="3" | Open source
! {{pkg|libva-intel-driver}}
+
! colspan="2" | Proprietary
! {{pkg|xvba-video-open}}
+
|-
 +
!
 +
! AMD
 +
! Intel
 +
! Nvidia
 +
! AMD
 +
! Nvidia
 
|-
 
|-
 
| MPEG2 decoding
 
| MPEG2 decoding
| Nvidia GeForce 8 and newer, AMD Radeon 9500 and newer
+
| Radeon 9500 and newer
| Intel GMA 4500 and newer
+
| GMA 4500 and newer
| AMD Radeon HD 4000 and newer
+
| GeForce 8 and newer
 +
| Radeon HD 4000 and newer
 +
| GeForce 8 and newer
 
|-
 
|-
 
| MPEG4 decoding
 
| MPEG4 decoding
| Nvidia GeForce 200 and newer
+
| Radeon HD 6000 and newer
| -
+
| <center>—</center>
| -
+
| GeForce 200 and newer
 +
| Radeon HD 6000 and newer
 +
| GeForce 200 and newer
 
|-
 
|-
 
| H264 decoding
 
| H264 decoding
| Nvidia GeForce 8 and newer
+
| Radeon HD 4000 and newer
| Intel GMA 4500<sup>1</sup>, Ironlake Graphics and newer
+
| GMA 4500<sup>1</sup>, Ironlake Graphics and newer
| AMD Radeon HD 4000 and newer
+
| GeForce 8 and newer
 +
| Radeon HD 4000 and newer
 +
| GeForce 8 and newer
 
|-
 
|-
 
| VC1 decoding
 
| VC1 decoding
| Nvidia GeForce 8 and newer
+
| Radeon HD 4000 and newer
| Intel Sandy Bridge Graphics and newer
+
| Sandy Bridge Graphics and newer
| AMD Radeon HD 4000 and newer
+
| GeForce 8200, 8300, 8400, 9300, 200 and newer
 +
| Radeon HD 4000 and newer
 +
| GeForce 8 and newer
 +
|-
 +
| MPEG2 encoding
 +
| <center>—</center>
 +
| Ivy Bridge Graphics and newer
 +
| <center>—</center>
 +
| <center>—</center>
 +
| <center>—</center>
 
|-
 
|-
 
| H264 encoding
 
| H264 encoding
| -
+
| <center>—</center>
| Intel Sandy Bridge Graphics and newer
+
| Sandy Bridge Graphics and newer
| -
+
| <center>—</center>
 +
| <center>—</center>
 +
| <center>—</center>
 
|}
 
|}
<sup>1</sup>Supported by the libva-driver-intel-g45-h264 package. See [[Intel_Graphics#H.264_decoding_on_GMA_4500|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 {{pkg|libva}} package:
+
<sup>1</sup>Supported by the {{AUR|libva-intel-driver-g45-h264}} package. See [[Intel graphics#H.264_decoding_on_GMA_4500|H.264 decoding on GMA 4500]] for instructions and caveats.
{{bc|$ vainfo}}
+
 
VAEntrypointVLD means that your card is capable to decode this format, VAEntrypointEncSlice means that you can encode to this format.
+
In order to check what profiles (features) are supported by your GPU, you may want to read the [[#Verifying]] section.
 +
 
 +
=== Configuration ===
 +
 
 +
{{Expansion|Add notes on the {{ic|LIBVA_DRIVER_NAME}} values for different drivers, c.f. [[VDPAU#Configuration]]. The drivers are installed in {{ic|/usr/lib/dri/}}.}}
 +
 
 +
The [http://www.freedesktop.org/wiki/Software/vaapi/#driversback-endsthatimplementva-api driver] used by VA-API is autodetected. To determine which one is used see [[#Verifying]]. You can override it by setting the {{ic|LIBVA_DRIVER_NAME}} [[environment variable]]:
 +
 
 +
* For Intel Graphics use {{ic|i965}}.
 +
* For NVIDIA use {{ic|vdpau}}.
 +
* For AMD use either {{ic|gallium}} (for {{Pkg|libva-mesa-driver}}) or {{ic|vdpau}} (for {{Pkg|libva-vdpau-driver}}).
 +
 
 +
The installed drivers are in {{ic|/usr/lib/dri/}}.
 +
 
 +
=== Verifying ===
 +
Verify the settings for VAAPI by running {{ic|vainfo}}, which is provided by the {{Pkg|libva}} package:
 +
{{hc|$ vainfo|<nowiki>
 +
libva info: VA-API version 0.38.0
 +
libva info: va_getDriverName() returns 0
 +
libva info: User requested driver 'vdpau'
 +
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so
 +
libva info: Found init function __vaDriverInit_0_35
 +
libva info: va_openDriver() returns 0
 +
vainfo: VA-API version: 0.38 (libva 1.6.1)
 +
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
 +
vainfo: Supported profile and entrypoints
 +
      VAProfileMPEG2Simple            : VAEntrypointVLD
 +
      VAProfileMPEG2Main              : VAEntrypointVLD
 +
      VAProfileMPEG4Simple            : VAEntrypointVLD
 +
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
 +
      VAProfileH264Baseline          : VAEntrypointVLD
 +
      VAProfileH264Main              : VAEntrypointVLD
 +
      VAProfileH264High              : VAEntrypointVLD
 +
      VAProfileVC1Simple              : VAEntrypointVLD
 +
      VAProfileVC1Main                : VAEntrypointVLD
 +
      VAProfileVC1Advanced            : VAEntrypointVLD</nowiki>}}
 +
 
 +
''VAEntrypointVLD'' means that your card is capable to decode this format, ''VAEntrypointEncSlice'' means that you can encode to this format.
  
==Supported software==
+
In this example the {{ic|vdpau}} driver is used, as you can see in this line:
=== [[MPlayer]] ===
+
{{bc|libva info: Trying to open /usr/lib/dri/'''vdpau'''_drv_video.so}}
Install {{pkg|mplayer-vaapi}} package, available in the [[official repositories]].
+
{{bc|$ mplayer -vo vaapi  -va vaapi -fs ''foobar.mpeg''}}
+
*'''-vo''' - Select vaapi video output driver
+
*'''-va''' - Select vaapi video decoder driver
+
*'''-fs''' - Fullscreen playback (optional)
+
  
MPlayer based players:
+
== Supported software ==
* {{pkg|gnome-mplayer}}: open preferences and set the video output to "vaapi".
+
* {{pkg|smplayer}}: open preferences and set the video driver to "vaapi", and deselect "Enable screenshots".
+
  
=== [[GStreamer]] ===
+
* [[GStreamer]] based players - VA-API is used automatically, if supported format found.
Install {{AUR|gstreamer-vaapi-git}} package, available in the [[Arch User Repository]].
+
: See more at http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+8%3A+Hardware-accelerated+video+decoding.
{{bc|$ gst-launch-0.10 playbin2 uri&#61;file://''/path/to/foobar.mpeg''}}
+
* VLC media player: see [[VLC media player#Hardware acceleration support]].
VA-API is used automatically, if supported format found.
+
* Mpv: see [[Mpv#Hardware Decoding]].
 +
* MPlayer: see [[MPlayer#Enabling VA-API]].

Latest revision as of 17:57, 5 May 2016

Related articles

Video Acceleration API is a specification and open source library to provide hardware accelerated video encoding and decoding.

Supported hardware

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: This revision contained some information about libva-mesa-driver and LIBVA_DRIVER_NAME=gallium, which should be added here. (Discuss in Talk:VA-API#)

Open source drivers:

Proprietary drivers:

Supported formats

Open source Proprietary
AMD Intel Nvidia AMD Nvidia
MPEG2 decoding Radeon 9500 and newer GMA 4500 and newer GeForce 8 and newer Radeon HD 4000 and newer GeForce 8 and newer
MPEG4 decoding Radeon HD 6000 and newer
GeForce 200 and newer Radeon HD 6000 and newer GeForce 200 and newer
H264 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
VC1 decoding Radeon HD 4000 and newer Sandy Bridge Graphics and newer GeForce 8200, 8300, 8400, 9300, 200 and newer Radeon HD 4000 and newer GeForce 8 and newer
MPEG2 encoding
Ivy Bridge Graphics and newer
H264 encoding
Sandy Bridge Graphics and newer

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

In order to check what profiles (features) are supported by your GPU, you may want to read the #Verifying section.

Configuration

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Add notes on the LIBVA_DRIVER_NAME values for different drivers, c.f. VDPAU#Configuration. The drivers are installed in /usr/lib/dri/. (Discuss in Talk:VA-API#)

The driver used by VA-API is autodetected. To determine which one is used see #Verifying. You can override it by setting the LIBVA_DRIVER_NAME environment variable:

The installed drivers are in /usr/lib/dri/.

Verifying

Verify the settings for VAAPI by running vainfo, which is provided by the libva package:

$ vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.1)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

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

In this example the vdpau driver is used, as you can see in this line:

libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so

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.