I'd like to also add a couple of things:
- Software encoding (CPU compression) is always superior over hardware encoding (GPU compression) thanks to Constant Rate Factor, if you're only concerned with quality and size.
- You can still perform hardware encoding even without a dedicated GPU...