Difference between revisions of "VLC GPU Decoding"

From VideoLAN Wiki
Jump to navigation Jump to search
m (nn)
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= Introduction to GPU decoding in VLC  =
+
== Introduction ==
  
The {{VLC}} framework can use your '''''graphic card''''' (aka GPU) to decode H.264 streams (wrongly called HD videos) under certain circumstances.  
+
The {{VLC}} framework can use your '''''graphics chip''''' (a.k.a. GPU) to accelerate decoding of video streams depending on the video codec, graphic card model and operating system. In some cases, it can let the graphic card perform post-processing and rendering of the decoded video. In any case, this frees the main processor (i.e. CPU) of some of the most computationally heavy sub-tasks involved in playing digital video.
  
VLC, in its '''modular''' approach and its transcoding/streaming capabilities, does decoding in GPU at the '''decoding stage only''' and then gets the data back to go to the other stages (streaming, filtering or plug any video output after that).  
+
== Activation ==
 +
{{See also|VLC HowTo/Hardware acceleration}}
 +
To enable hardware accelerated decoding, use the VLC preferences. By default, [[hardware acceleration]] is disabled (and consequently, hardware acceleration is not yet available to external application via [[libVLC]]).
 +
 
 +
In VLC version 2.1, you can select which acceleration method you wish to use among those available for your operating system (if any). In earlier versions, there was simply a check box as shown below:
 +
 
 +
[[File:VLC_GPU.png]]
 +
 
 +
== Operating system support ==
 +
 
 +
=== <span id="Windows"></span> Windows ===
 +
<!-- Anchor for incoming links from [[VLC Features Formats]], [[VLC VAAPI]], [[HD-Discs]], [[HD-Discs codecs]] via [[VLC DxVA2]] -->
 +
{{Wikipedia|DirectX Video Acceleration}}
 +
 
 +
Since VLC version 1.1.0, DirectX Video Acceleration (DxVA) is supported in [https://docs.microsoft.com/en-us/windows/desktop/medfound/about-dxva-2-0 DxVA 2.0]. It is available in ''Windows Vista'' (or ''Windows 2008'') or any later Windows version; it is '''not''' available for Windows XP/2003 (and never will be).
 +
 
 +
{{Forum|9421}}
 +
 
 +
The following video codecs are supported: [[MPEG-1]], [[MPEG-2]], [[Windows_Media|WMV3]], [[Windows_Media|VC-1]] and [[H.264|H.264 (MPEG-4 AVC)]].
 +
 
 +
=== X11 (GNU/Linux, FreeBSD, etc.) ===
 +
 
 +
On Linux/X11, there are two competing interfaces for hardware video decoding, VA-API from [http://www.intel.com/ Intel], and VDPAU from [http://www.nvidia.com/ NVIDIA]. Generally, VAAPI is used for Intel and Broadcom graphic cards, while VDPAU is used for AMD/ATI and NVIDIA cards.
 +
 
 +
==== VA-API ====
 +
VA-API is supported for decoding only since VLC version '''1.1.0'''.
 +
Refer to [[VLC VAAPI]] for more details.
 +
 
 +
On modern Ubuntu distributions, first install the hardware support (packages '''i965-va-driver''', '''libva-intel-vaapi-driver''' and '''vainfo''') and then activate GPU hardware acceleration in Preferences → Input&Codecs.
  
What that means is that, compared to some other implementation, GPU decoding in VLC can be slower because it needs to get the ''data back from the GPU''. But you can plug '''ANY''' video output (sink) to it and use '''all '''the VLC video filters.
+
Install via the terminal command:
 +
sudo apt-get install i965-va-driver libva-intel-vaapi-driver vainfo
  
== Operating System support ==
+
The following video codecs are supported: [[MPEG-1]], [[MPEG-2]], [[MPEG-4|MPEG-4 Visual]], [[Windows_Media|WMV3]], [[Windows_Media|VC-1]] and [[H.264|H.264 (MPEG-4 AVC)]].
=== Windows  ===
 
VLC 1.1 supports [http://en.wikipedia.org/wiki/DirectX_Video_Acceleration DxVA] in its version '''2.0'''. That means that ''Windows Vista'', ''Windows 2008'' or ''Windows 7'' are '''required'''. If you are using ''Windows XP'', VLC cannot work for you yet.  
 
  
=== Linux  ===
+
==== VDPAU ====
 +
VDPAU is supported for decoding since VLC version '''2.1.0''', and for post-processing and rendering since VLC '''2.2.0''' (still in development as of late 2013).
  
On Linux, there is code for VDPAU and VAAPI. There is also some code for a VAAPI video output, that isn't merged in the current Git.  
+
VDPAU will be enabled automatically by default in VLC version 2.2.0 onward.
 +
Refer to http://www.remlab.net/op/vlc-vdpau.shtml for technical details.
  
Read [[VLC_VAAPI]] and [http://strangestone.livejournal.com/107092.html thresh's blog] for more details.
+
The following video codecs are supported for decoding: [[MPEG-1]], [[MPEG-2]], [[MPEG-4|MPEG-4 Visual]] (and possibly H.263), [[Windows_Media|WMV3]], [[Windows_Media|VC-1]] and [[H.264|H.264 (MPEG-4 AVC)]]. Almost all video codecs are supported  for post-processing and rendering.
  
=== Mac OS X ===
+
=== macOS ===
Mac OS X (X.6.3) provides a [http://developer.apple.com/mac/library/technotes/tn2010/tn2267.html new API] for decoding in GPU. This is activated in Vlc 2.1. Testing is welcome.
+
Video Decoding Acceleration (VDA) comes with macOS X.6.3 and later (see [https://developer.apple.com/library/archive/technotes/tn2267/_index.html API]). This is somewhat supported in VLC 2.1.0.
  
== Activation ==
+
Only [[H.264|H.264 (MPEG-4 AVC)]] is supported currently.
To activate such a functionnality, use the VLC preferences.
 
[[File:VLC_GPU.png]]
 
  
= Requirements for Windows DxVA2 in VLC =
+
== Graphic card compatibility ==
  
To check your DxVA compatibility, please '''download [http://bluesky23.yu-nagi.com/en/#DXVAChecker DxVA Checker]'''
+
=== Windows ===
  
== Graphic card compatibility on Windows<br> ==
+
To check your DxVA compatibility, please '''download [http://bluesky23.yukishigure.com/en/DXVAChecker.html DxVA Checker]'''
  
=== nVidia ===
+
==== nVidia ====
  
For nVidia GPU, you are '''required''' to use a GPU supporting [http://en.wikipedia.org/wiki/Nvidia_PureVideo PureVideo] in its 2nd generation (VP2 or newer), which means that you need a [http://en.wikipedia.org/wiki/GeForce_8_Series GeForce 8], [http://en.wikipedia.org/wiki/GeForce_9_Series GeForce 9] (advised), [http://en.wikipedia.org/wiki/GeForce_200_Series GeForce 200] or newer.  
+
For nVidia GPU, you are '''required''' to use a GPU supporting [[wikipedia:Nvidia_PureVideo|PureVideo]] in its 2nd generation (VP2 or newer), which means that you need an [[wikipedia:Nvidia_Ion|ION]], [[wikipedia:GeForce_8_Series|GeForce 8]], [[wikipedia:GeForce_9_Series|GeForce 9]] (recommended), [[wikipedia:GeForce_200_Series|GeForce 200]] or newer.  
  
We '''recommend''' strongly VP3 or VP4 GPU.
+
We strongly '''recommend''' a VP3 or VP4 GPU.
  
To be sure, check your GPU against this table on [http://en.wikipedia.org/wiki/Nvidia_PureVideo#Table_of_PureVideo_.28HD.29_GPUs wikipedia] and check if you are VP2 or newer.  
+
To be sure, check your GPU against [[wikipedia:Nvidia_PureVideo#Table_of_GPUs_containing_a_PureVideo_SIP_block|this table on Wikipedia]] and check if you are VP2 or newer.
  
=== ATI ===
+
==== ATI ====
  
 
For ATI GPUs, you '''NEED''' Catalyst 10.7, that is just out.  
 
For ATI GPUs, you '''NEED''' Catalyst 10.7, that is just out.  
  
Then, you are required to use a GPU supporting [http://en.wikipedia.org/wiki/Unified_Video_Decoder Unified Video Decoder].  
+
Then, you are required to use a GPU supporting [[wikipedia:Unified_Video_Decoder|Unified Video Decoder]].
 +
 
 +
We believe you need a [[wikipedia:Unified_Video_Decoder#GPUs|GPU supporting UVD2]], like HD4xxx, 5xxx, 6xxx or 3200. One might have success with UVD+ GPU, like some HD 3xxx, but this isn't tested.
  
We believe you need a [http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_enabled_GPUs GPU supporting UVD2], like HD4xxx, 5xxx, 6xxx or 3200. One might have success with UVD+ GPU, like some HD 3xxx, but this isn't tested.
+
==== Intel ====
  
=== Intel ===
+
Latest Intel GMA should work. Tested on GNU/Linux (Ubuntu 13.10) and hardware acceleration definitely works for Intel HD Graphics 3000 (dropped CPU usage for HD720 (1280 x 720, H.264, 24fps) from 12-13% to 6%).
  
Latest Intel GMA should work.
+
[[Category:Documentation]]

Latest revision as of 02:59, 1 April 2019

Introduction

The VLC media player framework can use your graphics chip (a.k.a. GPU) to accelerate decoding of video streams depending on the video codec, graphic card model and operating system. In some cases, it can let the graphic card perform post-processing and rendering of the decoded video. In any case, this frees the main processor (i.e. CPU) of some of the most computationally heavy sub-tasks involved in playing digital video.

Activation

To enable hardware accelerated decoding, use the VLC preferences. By default, hardware acceleration is disabled (and consequently, hardware acceleration is not yet available to external application via libVLC).

In VLC version 2.1, you can select which acceleration method you wish to use among those available for your operating system (if any). In earlier versions, there was simply a check box as shown below:

VLC GPU.png

Operating system support

Windows

Since VLC version 1.1.0, DirectX Video Acceleration (DxVA) is supported in DxVA 2.0. It is available in Windows Vista (or Windows 2008) or any later Windows version; it is not available for Windows XP/2003 (and never will be).

This has also been discussed in the forum

The following video codecs are supported: MPEG-1, MPEG-2, WMV3, VC-1 and H.264 (MPEG-4 AVC).

X11 (GNU/Linux, FreeBSD, etc.)

On Linux/X11, there are two competing interfaces for hardware video decoding, VA-API from Intel, and VDPAU from NVIDIA. Generally, VAAPI is used for Intel and Broadcom graphic cards, while VDPAU is used for AMD/ATI and NVIDIA cards.

VA-API

VA-API is supported for decoding only since VLC version 1.1.0. Refer to VLC VAAPI for more details.

On modern Ubuntu distributions, first install the hardware support (packages i965-va-driver, libva-intel-vaapi-driver and vainfo) and then activate GPU hardware acceleration in Preferences → Input&Codecs.

Install via the terminal command:

sudo apt-get install i965-va-driver libva-intel-vaapi-driver vainfo

The following video codecs are supported: MPEG-1, MPEG-2, MPEG-4 Visual, WMV3, VC-1 and H.264 (MPEG-4 AVC).

VDPAU

VDPAU is supported for decoding since VLC version 2.1.0, and for post-processing and rendering since VLC 2.2.0 (still in development as of late 2013).

VDPAU will be enabled automatically by default in VLC version 2.2.0 onward. Refer to http://www.remlab.net/op/vlc-vdpau.shtml for technical details.

The following video codecs are supported for decoding: MPEG-1, MPEG-2, MPEG-4 Visual (and possibly H.263), WMV3, VC-1 and H.264 (MPEG-4 AVC). Almost all video codecs are supported for post-processing and rendering.

macOS

Video Decoding Acceleration (VDA) comes with macOS X.6.3 and later (see API). This is somewhat supported in VLC 2.1.0.

Only H.264 (MPEG-4 AVC) is supported currently.

Graphic card compatibility

Windows

To check your DxVA compatibility, please download DxVA Checker

nVidia

For nVidia GPU, you are required to use a GPU supporting PureVideo in its 2nd generation (VP2 or newer), which means that you need an ION, GeForce 8, GeForce 9 (recommended), GeForce 200 or newer.

We strongly recommend a VP3 or VP4 GPU.

To be sure, check your GPU against this table on Wikipedia and check if you are VP2 or newer.

ATI

For ATI GPUs, you NEED Catalyst 10.7, that is just out.

Then, you are required to use a GPU supporting Unified Video Decoder.

We believe you need a GPU supporting UVD2, like HD4xxx, 5xxx, 6xxx or 3200. One might have success with UVD+ GPU, like some HD 3xxx, but this isn't tested.

Intel

Latest Intel GMA should work. Tested on GNU/Linux (Ubuntu 13.10) and hardware acceleration definitely works for Intel HD Graphics 3000 (dropped CPU usage for HD720 (1280 x 720, H.264, 24fps) from 12-13% to 6%).