Ch. 13 · Hardware Encoders

한국어日本語
7 min

Checking Codec Support by Generation: How Do You Know What Works?

"ffmpeg lists the encoder" is not the same as "my machine can encode with it." Check in three steps.

Chapter 10 said that hardware decoder circuits are set at chip design time. Encoders are no different. Which codecs you can encode in hardware is decided by the chip generation. For example, AV1 encoding is known to have started only with relatively recent GPU generations, and older generations sometimes handle only H.264. You can find out which camp your machine is in with the three steps below.

  1. 1Does your ffmpeg build include that encoder? This depends on whether whoever made the build turned it on.
  2. 2Does your driver or runtime expose that feature? The driver has to support the API version ffmpeg calls.
  3. 3Does the chip support that codec in hardware? This is a matter of generation. Check the manufacturer's official support tables (NVIDIA's Video Encode and Decode GPU Support Matrix, and the Intel and AMD product documentation).
Step 1: list the encoders your ffmpeg build has
ffmpeg -hide_banner -encoders

The output is long, so it helps to use your terminal's search or a filter such as grep nvenc / findstr nvenc. Seeing a line like h264_nvenc there only means you've passed Step 1.

Steps 2–3: actually run a 2-second test encode (and throw away the output)
ffmpeg -hide_banner -f lavfi -i testsrc2=size=1280x720:rate=30 -t 2 -c:v h264_nvenc -f null -

If it finishes without errors, that encoder works with this machine, driver, and ffmpeg combination. Swap the encoder name for hevc_nvenc, av1_nvenc, hevc_qsv, and so on, and test each codec. If it fails, the error message is your clue. With NVENC, you may see a message like Driver does not support the required nvenc API version, meaning the driver's API version is too old (the case in Lesson 6).

Codec support check tools are about "decoding"

This site's codec support checker tells you whether your browser can play (decode) a codec. It can't tell you whether that device can encode the codec in hardware. The two kinds of support are separate, and some machines can decode but not encode.

Field note: when buying an encoding server

Whether "this GPU can encode AV1" should be checked not by product name but in the per-generation, per-model support table. Entry-level and high-end models of the same brand can differ in how many encoding blocks they have, so it's safest to make a habit of checking the encoder line in the spec sheet yourself.

Support matrixSupport matrix

A table, published by the manufacturer, of the codecs and features each chip model supports. The final authority on hardware support.

Driver API versionDriver API version

The version of the encoding API the driver provides. If it's lower than what ffmpeg requires, the encoder can't be opened.

Check yourself

av1_nvenc shows up in the ffmpeg -encoders list. What can you conclude from that alone?