This gist will help you to compile ffmpeg
with NVENC, QSV, VAAPI, VDPAU, and OpenCL support.
nVidia
nvresize
patch is outdated and not more compatible to the latest version of FFmpeg, so it's not included in this documentation.
(even if I've passed a lot of time at trying to make it compile... without any success)
Please don't rely on this page: https://developer.nvidia.com/ffmpeg, the implementation is a hack and was never been added to the main FFmpeg tree.