▶ Video & streaming

Hardware or software video encoding: NVENC, Quick Sync, x264

Differences in speed, quality and power use between software encoders and the hardware encoders in GPUs and processors, and when to choose each one.

When you export a video or start a live stream, compression can be carried out in two very different ways: by a program running on the processor, the software encoder, or by a dedicated circuit in the graphics card or the processor itself, the hardware encoder. The choice affects export times, quality at a given bitrate, power consumption and the computer's ability to do other things meanwhile. There is no answer that suits everyone, but there are clear criteria.

How they work

Software encoders

A software encoder, such as x264 for H.264, x265 for HEVC or SVT-AV1 for AV1, is an ordinary program using the processor's cores. It can explore many compression options for each block of the picture and, given time, find very efficient solutions. The level of accuracy is set through presets: slower ones mean smaller or better-quality files.

Hardware encoders

A hardware encoder is a block of silicon designed solely to compress video. The main ones are:

  • NVENC in NVIDIA graphics cards;
  • Quick Sync Video in the integrated graphics of Intel processors and in Intel Arc cards;
  • AMF/VCN in AMD cards and processors;
  • VideoToolbox on Macs, which gives access to the encoders in Apple chips.

These circuits work in parallel with the rest of the system: they can encode in real time even at high resolution while leaving the processor and graphics card almost free.

The comparison

Aspect Software Hardware
Speed depends on preset, often slow very high
Quality at equal bitrate best with slow presets good, below slow presets
CPU load high minimal
Power use high low
Option flexibility very wide limited
Available codecs all those implemented only those supported by the chip

When quality makes the difference

At high bitrates the difference between software and hardware tends to vanish: both preserve detail well. It becomes visible at low bitrates, precisely the cases where you want to save space or bandwidth. Here a software encoder with a slow preset distributes bits better, reducing blocking and smearing in complex scenes.

This is why streaming services that encode content once for millions of views often use very slow software encoders: the time spent pays for itself in bandwidth saved.

When hardware makes sense

  • Live streams with games or heavy applications: the processor stays free for the game, and streaming does not hurt performance.
  • Video calls and screen recordings: real-time encoding with low power use is needed.
  • Laptops on battery: the hardware encoder uses a fraction of the energy.
  • Previews and drafts: when sending a test version to a client, speed matters more than the last detail.
  • Real-time transcoding on home media servers: a small computer with Quick Sync can convert several streams at once.

When software makes sense

  • Final export of a project meant to stay online for a long time.
  • Archiving with the aim of using the least space for a given quality.
  • Low bitrates imposed by bandwidth or size limits.
  • Codecs or options not supported by the available hardware, for example AV1 on older-generation graphics cards.

Generations matter

Hardware encoders are tied to the chip: they improve with software updates only marginally, if at all. A graphics card a few generations old may encode H.264 and HEVC but not AV1, and at lower quality than recent ones. Before building a workflow on hardware, check which codecs, profiles and bit depths your model supports.

Using them with FFmpeg

FFmpeg lets you choose the encoder explicitly. Some examples:

# software
ffmpeg -i in.mov -c:v libx264 -preset slow -crf 20 out.mp4

# NVIDIA
ffmpeg -i in.mov -c:v h264_nvenc -preset p5 -cq 23 out.mp4

# Intel Quick Sync
ffmpeg -i in.mov -c:v h264_qsv -global_quality 23 out.mp4

Quality scales are not equivalent across encoders: a value of 23 in NVENC does not correspond to CRF 23 in x264. Run a comparative test on the same excerpt.

Decoding matters too

In a transcode the file must first be decoded. Using hardware decoding as well as encoding, keeping frames in the graphics card's memory, avoids pointless copies and speeds up the process considerably. Conversely, applying software filters between decoding and encoding forces data back to the processor and reduces the advantage.

A mixed strategy

In my work the most practical solution is often a hybrid one: hardware encoders for recordings, proxies, drafts and live streams; a software encoder with a slow preset for the distribution master. That way you get speed when you need it and quality when it counts.

In short

  • Software encoders are slower but offer the best quality at low bitrates.
  • Hardware encoders are very fast, use little power and leave the processor free.
  • At high bitrates the quality gap narrows considerably.
  • The codecs supported in hardware depend on the chip generation.
  • A mixed strategy combines speed for daily work with quality for the final result.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also