In terms of codecs, Pi4 is the best option (out of the Pi family) for hardware video decoders, Pi5 removed some hardware decoders which is unfortunate.