Tiny/mini/micro makes up my server environment (and two customs using old cases and replaced parts).
Storage is a 1520+ and the two customs, with the 1515+ for backups I don’t want to lose (syncs to two other locations).
Tiny/mini/micro is the majority of compute tasks, mostly proxmox, LXC’s, and a few VMs.
The little machines have plenty of processing power, usually nvme but I can add it on if needed. Combine it with network storage, and you don’t need anything else imo.
Bonus is they are small and cheap as off lease machines being auctioned off.
I’d lean towards the pi being the problem, but you can test the network throughput with iperf, and would want to test the videos outside of Kodi on the pi, so you could also check top and see what the processing looks like.
If I remember my pi 4 hardware decoding specs correctly, I believe h.264, MPEG 2, and VC1, and some support for HEVC. If I had to guess, you may have some codecs that aren’t handled by hardware acceleration, and instead just CPU.
My best rec would be to use either a dedicated stream box (like a fire stick, Nvidia shield, etc) which has better codec support, or pick up like a little Intel n100 based system, which will handle a drastically wider set of codecs with full acceleration support.
Right now I’ve got a Roku and a Google TV Chromecast, and I’ve been trying with various environments on an old Lenovo m910q so I can find my favorite fit of UI/distro. The Roku and Chromecast never stutter, and I don’t do transcoding for inside the home. Works with 4K HDR HEVC no problem.
Edit: Autocorrect annoyances.