Video Acceleration API

{{jargon|date=November 2021}}

{{Short description|Open source API for video acceleration}}

{{Infobox software

| name = libva

| author = Intel

| released = {{#statements:inception}}

| latest release version = {{wikidata|property|reference|P348}}

| latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}}

| programming language = {{#statements:programmed in}}

| operating system = Linux, Android, BSD, Windows 10, Windows 11

| genre = API

| license = {{#statements:copyright license}}

}}

Video Acceleration API (VA-API) is an open source application programming interface that allows applications such as VLC media player or GStreamer to use hardware video acceleration capabilities, usually provided by the graphics processing unit (GPU). It is implemented by the free and open-source library {{mono|libva}}, combined with a hardware-specific driver, usually provided together with the GPU driver.

VA-API video decode/encode interface is platform and window system independent but is primarily targeted at Direct Rendering Infrastructure (DRI) in X Window System on Unix-like operating systems (including Linux, FreeBSD, Solaris), and Android, however it can potentially also be used with direct framebuffer and graphics sub-systems for video output. Accelerated processing includes support for video decoding, video encoding, subpicture blending, and rendering.{{cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=MTA0NDI|title=VA-API Video Acceleration On Intel Medfield - Phoronix|website=Phoronix.com|access-date=23 February 2019}}

The VA-API specification was originally designed by Intel for its GMA (Graphics Media Accelerator) series of GPU hardware with the specific purpose of eventually replacing the XvMC standard as the default Unix multi-platform equivalent of Microsoft Windows DirectX Video Acceleration (DxVA) API, but today the API is no longer limited to Intel-specific hardware or GPUs.{{cite web|url=https://events.linuxfoundation.org/images/stories/pdf/lceu2012_debski.pdf|title=Video4Linux2: Path to a Standardized Video Codec API|website=Events.linuxfoundation.org|access-date=23 February 2019|archive-date=6 January 2014|archive-url=https://web.archive.org/web/20140106032317/https://events.linuxfoundation.org/images/stories/pdf/lceu2012_debski.pdf|url-status=dead}} Other hardware and manufacturers can freely use this open standard API for hardware accelerated video processing with their own hardware without paying a royalty fee.{{cite web |url=https://lwn.net/Articles/339349/ |title=VA API slowly, but surely, making progress |author=Nathan Willis |date=2009-07-01 |website=Lwn.net}}

Overview

File:Vainfo screenshot.png

The main motivation for VA-API is to enable hardware-accelerated video decode at various entry-points (VLD, IDCT, motion compensation, deblocking{{cite web|url=https://www.phoronix.com/scan.php?page=article&item=xorg_vaapi_mplayer&num=1|title=Mplayer, FFmpeg Gain VA-API Support - Phoronix|website=Phoronix.com|access-date=23 February 2019}}) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, H.265/HEVC, and VC-1/WMV3). Extending XvMC was considered, but due to its original design for MPEG-2 MotionComp only, it made more sense to design an interface from scratch that can fully expose the video decode capabilities in today's GPUs.{{cite web|url=https://www.freedesktop.org/wiki/Software/vaapi/|title=vaapi|website=Freedesktop.org|access-date=23 February 2019}}

= Supported hardware and drivers =

As of 2022, VA-API is natively supported by:{{cite web |url=https://wiki.archlinux.org/index.php/Hardware_video_acceleration |title=Hardware video acceleration |work=wiki.ArchLinux.org}}

  • Intel Quick Sync open-source drivers for Linux
  • Mesa open-source drivers for AMD and Nvidia graphics cards
  • AMDGPU-PRO drivers for AMD graphics cards on Linux
  • libva-vdpau-driver for cards supported by VDPAU
  • Direct3D 12 implementations with the VAOn12 driver{{Cite web |last=Vilerino |first=Sil |date=2023-02-15 |title=Video acceleration API (VA-API) now available on Windows! |url=https://devblogs.microsoft.com/directx/video-acceleration-api-va-api-now-available-on-windows/ |access-date=2023-03-08 |website=DirectX Developer Blog |language=en-US}}

= Supported video codecs =

VA-API currently supports these video codecs in the official mainline version, but note that exactly which video codecs are supported depends on the hardware and the driver's capabilities.

  • MPEG-2 decode acceleration Main Profile
  • VC-1 / WMV3 decode acceleration Advanced Profile
  • MPEG-4 Part 2 (H.263) (a.k.a. MPEG-4 SP / MPEG-4 ASP, more commonly known as Xvid) decode acceleration
  • H.264 AVC encode acceleration Main Profile
  • H.264 AVC decode acceleration High Profile
  • H.264 / AVC Hardware Variable Length Decoding (VLD) - CABAC
  • H.264 / AVC Hardware Variable Length Decoding (VLD) - CAVLC
  • H.264 / AVC Hardware Inverse Transform (IT)
  • H.264 / AVC Hardware Motion Compensation (HWMC)
  • H.264 / AVC Hardware In-Loop Deblocking (ILDB)
  • H.265/HEVC encode acceleration
  • H.265/HEVC decode acceleration
  • VP9 8-bit encode acceleration{{Cite web |url=https://wiki.libav.org/Hardware/vaapi |title=Hardware/vaapi |work=wiki.libav.org |access-date=2017-01-20 |archive-url=https://web.archive.org/web/20170201235322/https://wiki.libav.org/Hardware/vaapi |archive-date=2017-02-01 |url-status=live }}
  • VP9 8-bit and 10-bit decode acceleration
  • AV1 8-bit and 10-bit encode acceleration
  • AV1 8-bit and 10-bit decode acceleration

Processes that can be accelerated with VA-API

Video decoding and post-processing processes that can be offloaded and accelerated if both the device drivers and GPU hardware supports them:

Software architecture

File:Vaapi illustration.svg

The current interface is window system independent, so that it can potentially be used with graphics sub-systems other than the DRI (Direct Rendering Infrastructure) in X Window System, such as direct with framebuffer, and it can work with third-party DRM (Direct Rendering Manager) libraries. In a nutshell, it is a scheme to pass various types of data buffers from the application to the GPU for decoding or encoding a compressed bit-stream.

Software supporting VA-API

File:VA-API log of video playback on Firefox.png showing VA-API being used for video decoding acceleration]]

  • Chromium
  • Bluecherry DVR client (starting from release 2.2.6){{cite web |date=2 March 2017 |title=[Client] 2.2.6 Released – Significant CPU usage reductions included |url=http://www.bluecherrydvr.com/client-2-2-6-released-significant-cpu-usage-reductions-included/ |access-date=23 February 2019 |website=Bluecherrydvr.com}}
  • datarhei Restreamer{{Cite web |title=datarhei Restreamer |url=https://docs.datarhei.com/restreamer/}} real-time live video streaming
  • Emby media server (starting from release 3.0.6400){{cite web|url=http://emby.media/|title=Emby Server 3.0.6400 Released|date=29 August 2016|website=Emby.media|access-date=23 February 2019}}
  • ffmpeg, a command line tool from the FFmpeg project (starting from 3.1){{Cite web |url=https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog |title=Archived copy |access-date=2016-08-31 |archive-url=https://web.archive.org/web/20160916205031/https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog |archive-date=2016-09-16 |url-status=dead }}
  • Firefox (On Wayland since release 78 and on X11 since release 80){{Cite web |date=3 June 2020 |title=Firefox on Fedora finally gets VA-API on Wayland |url=https://mastransky.wordpress.com/2020/06/03/firefox-on-fedora-finally-gets-va-api-on-wayland/ |access-date=2020-08-19 |website=mastransky.wordpress.com}}{{Cite web |title=Firefox 80 Available With VA-API On X11, WebGL Parallel Shader Compile Support |url=https://www.phoronix.com/scan.php?page=news_item&px=Firefox-80-Released |access-date=2020-08-25 |website=www.phoronix.com}}
  • Fluendo{{Cite web |title=Fluendo |url=https://fluendo.com/en/}}{{cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=ODEwMw|title=Fluendo's New Codecs Support VDPAU, VA-API - Phoronix|website=Phoronix.com|access-date=23 February 2019}}
  • Frigate NVR{{cite web|url=https://docs.frigate.video/configuration/hardware_acceleration/#via-vaapi|title=Hardware Acceleration}}
  • Gnash Flash / SWF player{{cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=NzU1MA|title=H.264 VA-API GPU Video Acceleration For Flash - Phoronix|website=Phoronix.com|access-date=23 February 2019}}
  • GStreamer through {{mono|gstreamer-vaapi}}{{cite web|url=https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi|title=Hardware-accelerated video decoding, encoding and processing on Intel graphics through VA-API|website=Cgit.freedesktop.org|access-date=23 February 2019}}
  • Helix media player (Linux){{cite web |title=Mailing list entry that describes uses of VA-API |url=http://lists.moblin.org/pipermail/dev/2008-September/002750.html |access-date=23 February 2019 |website=Lists.moblin.org}}{{Cite web |title=RealPlayer for MID & Intel/Linux FAQ |url=https://community.helixcommunity.org/Licenses/realplayer_for_mid_faq.html |url-status=dead |archive-url=https://web.archive.org/web/20120324001505/https://community.helixcommunity.org/Licenses/realplayer_for_mid_faq.html |archive-date=2012-03-24 |access-date=2011-05-12 |work=HelixCommunity.org}}
  • Jellyfin media server{{Cite web |title=Intel GPU |url=https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/ |access-date=2024-12-02 |website=jellyfin.org |language=en}}

  • Kodi (formerly XBMC Media Center) (Linux){{cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=ODEyNw|title=XBMC Gets Working Intel VA-API Support - Phoronix|website=Phoronix.com|access-date=23 February 2019}}
  • Kodibuntu (formerly XBMC Live) (Linux Live CD/USB operating-system)
  • libavcodec{{Cite web |last= |title=This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats. |url=https://gist.github.com/jcf/266239b2b9106bcd00358acb77c1f12e |access-date=2024-12-02 |website=Gist |language=en}}
  • MPlayer with custom patches{{Cite web |title=gbeauchesne / mplayer-vaapi |url=https://github.com/gbeauchesne/mplayer-vaapi}} and its fork mpv (native)
  • MythTV (starting from release 0.25){{cite web|url=https://www.mythtv.org/wiki/Release_Notes_-_0.25|title=Release Notes - 0.25 - MythTV Official Wiki|website=Mythtv.org|access-date=23 February 2019}}
  • OBS Studio{{Cite web |title=OBS Studio Now Supports VA-API For Video Encoding - Phoronix |url=https://www.phoronix.com/scan.php?page=news_item&px=OBS-Studio-VA-API-H264 |access-date=2020-08-06 |website=www.phoronix.com}}
  • OpenShot{{Cite web |title=OpenShot Library {{!}} libopenshot |url=https://openshot.org/files/libopenshot/md_doc_HW-ACCEL.html}}
  • VLC media player (starting from release 1.1.0){{cite web|url=http://www.videolan.org/vlc/releases/1.1.0.html|title=VLC 1.1.0 release - VideoLAN|website=Videolan.org|access-date=23 February 2019}}
  • Xine (via "xine-lib-vaapi" library) since Version 1.2.3{{cite web|url=http://xine-project.org/news|title=the xine project - News Feed|website=Xine-project.org|access-date=23 February 2019}}

See also

{{Portal|Free and open-source software}}

  • Distributed Codec Engine (libdce) — Texas Instruments API for the video codec engine in OMAP based embedded systems
  • OpenMAX — a royalty-free cross-platform media abstraction API from the Khronos Group

References

{{Reflist}}