Ch. 13 · Hardware Encoders

한국어日本語
7 min

Why This Site Can't Use Hardware Encoders in Its Measurements

This site's measurements use only software encoders, because the driver for an older GPU can't support the NVENC API of the latest FFmpeg. We also outline how to run the comparison yourself.

This site's measurement articles compare only software encoders such as x265, SVT-AV1, and libaom. Hardware encoders aren't left out on purpose; it's because the PC used for measuring can't use them.

What's going on

  • The measurement PC's graphics card is a GTX 750. It's a first-generation Maxwell card, and its NVENC is known to be an early generation, from which you can expect little beyond H.264 encoding.
  • The NVENC encoders in the latest FFmpeg require a relatively new NVENC API version.
  • The drivers you can install on a GTX 750 don't support that API version. That produces the Driver does not support the required nvenc API version family of errors from Lesson 4.
"Why we can't use it" is itself the example from Lesson 4

The ffmpeg build has the encoder, and the GPU even has a hardware encoding circuit, but it's blocked at the driver level. Of the three steps in Lesson 4 (build, driver, chip), this is a case that fails at Step 2.

That's why this site's measured numbers can't be applied as-is to hardware encoders. For example, the preset speed measurement measured only the presets of libx265 running on the CPU, and the article states that results for hardware encoder presets can't be inferred.

If you want to compare them yourself

If your PC has a supported hardware encoder, you can compare them yourself the same way this site's measurements do. The key is to look at file size at the same quality.

  1. 1Pick one source clip, and encode it with a software encoder (x265, for example) and a hardware encoder, each at several quality values or bitrates.
  2. 2Compare each result against the source with VMAF and collect (bitrate, VMAF) points (Chapters 2 and 11).
  3. 3Overlay the two curves and read off which one is smaller at the same VMAF (the BD-rate idea).
  4. 4Also record encoding time and CPU usage. Whether the speed and power advantages are worth the size penalty depends on your use.
Change only one thing if you can

Change only the encoder and keep the resolution, filters, frame rate, and VMAF settings identical, or the comparison doesn't hold. Repeating it with several clips (animation, live action, screen recordings, and so on) makes it more trustworthy. This site's CRF sweep measurement is an example of comparing software encoders in a similar way.

Chapter 13 recap

  • A hardware encoder is a dedicated circuit in the chip, and the generation of the chip decides which codecs it supports.
  • NVENC, Quick Sync, AMF, VideoToolbox, and mobile SoC encoders differ only in name and API; they are the same family of solution.
  • The general trend: fast and light on power, but at the same quality, larger files than slow software presets. Measure the actual gap yourself.
  • Checking support takes three steps, build → driver → chip, and a test encode is the most reliable.
  • Option numbers (cq, global_quality, and so on) are on a different scale from software CRF.
BD-rateBD-rate

A metric that compares two encoders' rate-distortion curves and expresses the average bitrate difference at the same quality (Chapter 2).

Driver supportDriver support

The condition that, for ffmpeg to use a hardware feature, the driver must expose the corresponding API version.

Check yourself

What is the direct reason this site's measurements can't use hardware encoders?