Hardware encoding is FAST, not good. If you want a “proper” file, use CPU. If you want it on the fly, in embedded systems or systems with no CPU to speak of or fast in general, GPU encoding “ASIC” is the way to go but you have to limit yourself to not always optimal presets.
I’ve tried to do some hw transcodes to h264 and h265 and av1 on 7900xtx and pretty much gave up immediately.
I dint note down the details, but there were absurd results from seemingly optimal presets in handbrake , like h265 transcode larger and worse looking than original h264.
FAST and LIMITED properties of hw accelerated encoding is pretty succinct observation, whats worse it lack of good documentation and limitations differ across generations and vendors.
Some specific profiles worked without obvious issues, but quality was not good enough for my use. Good enough for streaming, which is probably the primary use case here.
(I didn’t re-compute the datapoints under 100MB, that’s why no log scale)
There is a thing called gop_size that controls how often a frame is recomputed from zero. I don’t care about scrubbing performance, so I just set it at -g:v 10000000