findHardwareEncoder
Finds a hardware encoder for codecName that ffmpeg can encode frames in pixelFormat with on this system. codecName is the FFmpeg name of the codec, for example h264, hevc or av1, pixelFormat is the pixel format the frames are encoded in, see HardwareEncoder.input.
The encoders that are tried are, in order:
macOS: VideoToolbox, which is not tried, it falls back to its software encoder on Macs without a hardware encoder
Linux: NVENC on NVIDIA GPUs, VAAPI on Intel and AMD GPUs, on each DRM render node
Windows: NVENC on NVIDIA GPUs, Quick Sync on Intel GPUs, AMF on AMD GPUs, Media Foundation on the others
The encoders are tried by encoding a frame with ffmpeg, with the arguments of HardwareEncoder.input and HardwareEncoder.arguments. FFmpeg lists encoders that the GPU or its driver does not support, for example NVENC of a newer FFmpeg needs a newer NVIDIA driver. Trying an encoder takes up to a second, the result is cached for ffmpeg, codecName and pixelFormat.
Return
the encoder, or null when no hardware encoder works
Since
openrndr 0.5.1
Parameters
the FFmpeg executable the frames are encoded with, by default the one VideoWriter runs