Well, you are talking about a used PC with a middleclass Ryzen 5 and a 400W PSU
It may work for you, but I would not shell out 400€ for that, this config is 500.-€ new.
Put 80% weight on CPU, its supply (PSU) and waste disposal (cooler).
As a ballpark figure I had invested tenfold most of the time for top notch *and portable* en.coding, but that is just me.
You might maybe give myself a budget lift to 800, go for a 800W PSU and study CPU encoding comparisons well laid out, you may search.
As an example, just one of many:
https://www.tomshardware.com/news/am...eon-comparison
and we are getting OT here, this belongs to Hardware discussions...