Might be a controversial take, but Raspberry Pi's are pure ass as media servers. They're profoundly i/o limited, which extends to access to external USB devices as well as ethernet, and lack the oomph required to decode hi-res video streams locally. 1080p can be choppy, forget about 4K.
Pi5 occupies the unhappy spot where it's too expensive for enthusiast and hobby applications, but inadequate as a desktop PC which benefit from a bit more power.
A mini-PC is a much better fit. An N100 might even be overkill - mine has a Skylake from a decade ago in it, and it crushes 'media' activities while gently sipping at electricity.