Rpi simply cannot handle live transcoding because it’s a computationally expensive process. Audio and video codec support is a confusing landscape. Some of it is hardware support, some software support, sometimes there are weird licensing quirks… I replaced my Chromecast with an Nvidia Shield and it mostly eliminated transcodes, though i still sometimes encounter issues. For maximum compatibility look for files that are MP4, x264 (or h264) and AAC.
https://trash-guides.info/Radarr/Radarr-collection-of-custom-formats/
There’s one for sonarr too.