Hardware encoding and software encoding
Hardware and software video encoders create a new compressed representation using different execution paths and supported configuration, rate-control and coding-tool choices.
An encoder creates a new compressed video representation from prepared pictures. A hardware encoder uses an exposed hardware encoding path; a software encoder implements its selected coding work through CPU execution.
The decision concerns the output representation. It is separate from which decoder reconstructed the input.
Choose the output before comparing implementations
The encoder must fit the target codec, dimensions, bit depth, chroma format and supported coding tools. Its rate-control and latency choices shape how it spends bits and buffers pictures.
| Choice | What it describes |
|---|---|
| Codec/profile | Target compressed-video configuration |
| Picture dimensions and cadence | Prepared pictures to be represented |
| Rate control | How the encoder manages bitrate or quality objectives |
| Preset/tuning | Implementation-specific processing and coding choices |
| Reordering and lookahead | Available analysis and picture-order behavior |
An Emby H.264-to-H.264 conversion still uses another encode when it changes the representation. Matching codec family names at the input and output does not establish stream copying.
Equal bitrate does not mean equal picture quality
Encoders can choose different predictions, quantization and other coding decisions for the same pictures. Their supported tools and preset meanings also differ.
A useful comparison holds the programme interval and target constraints together:
| Preserve | Why it matters |
|---|---|
| Same prepared source pictures | Avoids comparing different scaling or tone mapping |
| Same output codec and picture configuration | Avoids spending bits on a different representation |
| Comparable achieved output rate | Nominal settings can produce different actual rates |
| Declared latency/analysis constraints | Some choices need additional buffering |
| Identified implementation and preset | Preset names are not universal quality units |
The result should be assessed on representative content, including motion and texture. Hardware execution is not a predetermined quality score, and a “slow” label from one software encoder is not a matching mode in another encoder.
Output rate and duration describe stored payload
For an original example with a known average encoded-video rate of 5,000,000 bit/s over 1800 seconds:
5,000,000 × 1800 / 8 = 1,125,000,000 bytes
That is 1.125 GB of video payload in decimal units. Audio, packaging and transport add other bytes.
The calculation assumes the achieved average rate. A maximum-rate constraint or a quality-target setting does not automatically make the output average equal to that number.
Accepted input and completed output are different events
An encoder can accept pictures into a queue before output appears. Analysis, frame reordering and asynchronous hardware completion can separate those events.
The application must retrieve generated bitstream data and retain input storage for as long as the encoder needs it. At the end, draining obtains remaining output that may have been delayed.
See Also
- NVIDIA NVENC
- Intel Quick Sync Video (QSV)
- AMD Advanced Media Framework (AMF)
- Apple VideoToolbox
- Encoding a new media representation
- Video Bitrate
- Video Encoder Presets