h265 硬解码

Intel QSV

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. Note that the (CPU)GPU needs to be compatible with both QSV and OpenCL. Some (older) QSV -enabled GPUs aren't compatible with OpenCL. See: http://www.intel.com/content/www/us/en/architecture-and-technology/quick-sync-video/quick-sync-video-general.html https://software.intel.com/en-us/articles/intel-sdk-for-opencl-applications-2013-release-notes

To enable QSV support, you need the Intel Media SDK integrated in the Intel Media Server Studio: https://software.intel.com/en-us/intel-media-server-studio

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. 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).

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: https://github.com/lu-zero/mfx_dispatch

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.

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. 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.

Check the following website for updated information about the Intel Graphics stack on the various Linux platforms: https://01.org/linuxgraphics

To enable QSV support in the FFmpeg build, configure with --enable-libmfx.

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.

For example to encode to H.264 using h264_qsv, you can use the command:

ffmpeg -i INPUT -c:v h264_qsv -preset:v faster out.qsv.mp4
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值