After trying for a few weeks to build anything useful off the amlogic-based AndroidTV boxes all I can say is avoid them like the plague.
The only decent experience I had was a Chinese SBC manufacturer called Khadas, who have some fairly well supported products (avoid the vim1 though!)
The Rpi4 has probably the best mainline linux support you'll find anywhere. I have high hopes for the new Rockchip flagship, but Rockchip are still very behind on getting things into good shape. "real" hardware decoder support for the older line of their CPU's only really landed in 6.1 RC1 and as for encoders? well they have JPEG encoding working.. that's about it.
If you want to run a NAS you could look at Odroid boxes, they do have advantages in coming with an M2 slot and a SATA port. But honestly for a NAS just do what chewitt said, and buy one. Or if you hate yourself buy a 4U chassis off of ebay, spend thousands on hard drives and learn how to use gluster, ceph, proxmox, or if you're truly diabolical truenas or something similar. Then be prepared to kick yourself when you lose all your data. Big, steep learning curve there.