Changes between Version 49 and Version 50 of HWAccelIntro


Ignore:
Timestamp:
Jul 20, 2017, 12:10:03 AM (5 months ago)
Author:
jkqxz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HWAccelIntro

    v49 v50  
    7575Video Acceleration API (VAAPI) is a non-proprietary and royalty-free open source software library ("libva") and API specification, initially developed by Intel but can be used in combination with other devices. 
    7676 
    77 See [wiki:Hardware/VAAPI VAAPI]. 
     77It can be used to access the Quick Sync hardware in Intel GPUs and the UVD/VCE hardware in AMD GPUs.  See [wiki:Hardware/VAAPI VAAPI]. 
    7878 
    7979== DXVA2 == 
     
    167167The {{{-hwaccel_device}}} option can be used to specify the GPU to be used by the cuvid hwaccel in ffmpeg. 
    168168 
    169 == Intel QSV == 
     169== libmfx == 
    170170 
    171 Intel QSV (Quick Sync Video) is a technology which allows decoding and encoding using recent Intel CPU and integrated GPU, supported on recent Intel CPUs. 
    172 Note that the (CPU)GPU needs to be compatible with both QSV and OpenCL. Some (older) QSV -enabled GPUs aren't compatible with OpenCL. 
    173 See: 
    174 http://www.intel.com/content/www/us/en/architecture-and-technology/quick-sync-video/quick-sync-video-general.html 
    175 https://software.intel.com/en-us/articles/intel-sdk-for-opencl-applications-2013-release-notes 
    176  
    177 To enable QSV support, you need the Intel Media SDK integrated in the Intel Media Server Studio: 
    178 https://software.intel.com/en-us/intel-media-server-studio 
    179  
    180 The Intel Media Server studio is available for both Linux and Windows, and contains the libva and libdrm libraries, the libmfx dispatcher library and the intel drivers.  
    181 libmfx is the library which selects the codec depending on the system capabilities, falling back to a software implementation if the hardware accelerated codec is not available). 
    182  
    183 FFmpeg QSV support relies on libmfx, but the library provided by Intel does not come with {{{pkg-config}}} files and a proper installer. Thus the easiest to install the library is to use the libmfx version packaged by lu_zero here: 
    184 https://github.com/lu-zero/mfx_dispatch 
    185  
    186 Requirements on Windows: install the Intel Media SDK packaged in the Intel Media Server Studio, which comes with a graphic installer, and a MinGW compilation enviroment (for example provided by MSYS2 with a corresponding Mingw-w64 package). Then you need to build libmfx and install it in a path recognized by pkg-config. For example if you install in {{{/usr/local}}} then you need the update the {{{$PKG_CONFIG_PATH}}} environment variable to make it point to {{{/usr/local/lib/pkgconfig}}}. 
    187  
    188 Requriments on Linux: you need either to rely on the Intel Media Server Studio for Linux, or use a recent enough supported system, with the libva and libdrm libraries, the libva Intel drivers, and the libmfx library packaged by lu_zero. 
    189 Note: in case you use the Intel Media Server Studio generic installation script, the installation script may overwrite your system libraries and break the system. 
    190  
    191 Check the following website for updated information about the Intel Graphics stack on the various Linux platforms: 
    192 https://01.org/linuxgraphics 
    193  
    194 To enable QSV support in the FFmpeg build, configure with {{{--enable-libmfx}}}. 
    195  
    196 Support for decoding and encoding is integrated in FFmpeg through several codecs identified by the {{{_qsv}}} suffix. In particular, it currently supports MPEG2 video, VC1 (decoding only), H.264 and H.265. 
    197  
    198 For example to encode to H.264 using {{{h264_qsv}}}, you can use the command: 
    199 {{{ 
    200 ffmpeg -i INPUT -c:v h264_qsv -preset:v faster out.qsv.mp4 
    201 }}} 
    202  
    203  
    204 If you have a Kaby Lake CPU, you can encode with HEVC using {{{hevc_qsv}}}: 
    205 {{{ 
    206 ffmpeg -i INPUT -c:v hevc_qsv -load_plugin hevc_hw -preset:v faster out.qsv.mp4 
    207 }}} 
     171See [wiki:Hardware/QuickSync QuickSync]. 
    208172 
    209173== OpenCL == 
     
    217181For enable-opencl to work you need to basically install your local graphics cards drivers, as well as SDK, then use its .lib files and headers. 
    218182 
    219 == AMD VCE == 
     183== AMD UVD/VCE == 
    220184 
    221 AMD VCE is exposed through VA-API on linux.  For windows there have been port [https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=4231 attempts] but nothing official yet. 
     185AMD UVD is usable for decode via VDPAU and VAAPI in Mesa on Linux.  VCE also has some initial support for encode via VAAPI, but should be considered experimental. 
     186 
     187For windows there have been port [https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=4231 attempts] but nothing official yet. 
    222188 
    223189== External resources ==