Example of ffmpeg based sample NVIDIA encoder c/c++ code

Hello,

Can anyone provide the example of ffmpeg based NVIDIA encoder c/c++ sample code(not command based)? Which can also support multi nvidia gpu.