Ch. 13 · Hardware Encoders

한국어日本語
8 min

Hardware Encoders by Vendor: NVENC, Quick Sync, AMF, VideoToolbox, and Mobile

Every company has its own name and access method. In ffmpeg, you tell them apart by the suffix at the end of the encoder name.

Circuits that do the same job still have different names and APIs from company to company. In ffmpeg, encoder names carry a suffix such as _nvenc, _qsv, _amf, or _videotoolbox to tell them apart.

NameMade byWhere it livesffmpeg encoder examples
NVENCNVIDIAThe encoding block inside NVIDIA GPUs such as GeForceh264_nvenc, hevc_nvenc, av1_nvenc
Quick Sync (QSV)IntelThe media engine in Intel CPU integrated graphics, and Arc GPUsh264_qsv, hevc_qsv, av1_qsv
AMFAMDThe encoding block inside Radeon GPUsh264_amf, hevc_amf, av1_amf
VideoToolboxAppleA system framework that uses the media engine in the chips of Macs, iPhones, and iPadsh264_videotoolbox, hevc_videotoolbox
Mobile SoC encodersSoC makers such as Qualcomm, Samsung, and MediaTekThe video engine inside a smartphone chip (reached through MediaCodec on Android)Apps call it through the OS API; in ffmpeg, h264_mediacodec and the like

Which codecs are supported differs by chip generation, even within one company. An encoder name being present in your ffmpeg build is not the same as being able to use it on your hardware (Lesson 4).

What they share, and how they differ

  • In common: a driver or OS API wraps the dedicated circuit, and ffmpeg acts as a thin glue layer that calls that API. So no matter how new your ffmpeg is, it can't use the encoder unless the driver supports it.
  • NVENC and AMF: these live on discrete GPUs, so they're common in desktop PCs. Even within one company, newer generations have added supported codecs (AV1, for example).
  • Quick Sync: this is a circuit on the integrated-graphics side of the CPU. Its distinguishing feature is that you can use it without a separate graphics card.
  • VideoToolbox: Apple devices only. App developers don't drive the chip directly; they go through a framework the OS provides.
  • Mobile SoCs: the classic case is a camera app saving video in real time. Because of battery and heat, hardware encoding is known to be effectively the default choice.
Linux also has VAAPI

On Linux, you can call Intel and AMD encoding circuits through a common API called VAAPI (ffmpeg encoder names like h264_vaapi). Lesson 5 shows an example.

NVENCNVENC

The hardware video encoder block inside NVIDIA GPUs.

Quick Sync Video (QSV)Quick Sync Video

Intel's hardware video encoding and decoding feature. It uses the media engine in integrated graphics.

AMFAMD Media Framework

The API for calling the hardware encoder on AMD GPUs.

VideoToolboxVideoToolbox

Apple's framework for hardware encoding and decoding on its platforms.

VAAPIVideo Acceleration API

A common API on Linux for calling video circuits on Intel, AMD, and others.

Check yourself

In the ffmpeg encoder name hevc_qsv, what does qsv refer to?