hardwareAcceleration

Encode with a hardware encoder, which uses a fraction of the CPU time of the software encoder: VideoToolbox on macOS, on Linux NVENC on NVIDIA GPUs or VAAPI on Intel and AMD GPUs, and on Windows NVENC on NVIDIA GPUs, Quick Sync on Intel GPUs, AMF on AMD GPUs or else the hardware encoder of Media Foundation. On Linux and Windows the encoders are tried with the ffmpeg executable that VideoWriter runs, the software encoder is kept when none of them works, see findHardwareEncoder.