rPi media server woes reddit / selfhosted ---------------------------------------------------------------------- somanythingsimean · 2023-12-15 18:29 rPi 4 media server woes Hey yall, So I have my raspberry pi 4 set up with the typical media server stuff within docker- qbittorrent, jellyfin, sonarr, radarr, prowler, jellyseerr. Everything runs fine except for media playback for obvious reasons (transcoding). Without buying something like a zimaboard, I tried overclocking the Pi and enabling hardware acceleration with no real improvement in playback. I'm wondering if there's something I can do or add to my setup to be able to playback these videos. Suggestions from anyone with a similar setup would be great! I was thinking maybe there's a way to use the Pi for downloading the media (and set up home assistant eventually), then send that media to something else for playback. The videos I've downloaded are all mp4, so I'm not entirely sure why the playback is the way it is. I tried also playing the files on VLC rather than the Jellyfin web player and got the same results. I'm running ubuntu server with Ubuntu desktop - could I be missing plug- ins, codecs, or something? In the interest of low power consumption I got the Pi, and now I don't want it to go to waste. Really I'm open to any ideas, but I know my best bet is to abandon the Pi entirely. ---------------------------------------------------------------------- LifeLeg5 · 2023-12-15 18:46 >then send that media to something else for playback. "send" here sounds like you want to make a local copy, and that will likely work but if you want streaming with transcode, you'll need a better cpu with quicksync, at least an n100 this is the exact path I took after a few years of 24/7 RPi4 as a media server, it just reached its limit with AV1s and 4K content slowly being the standard release. ---------------------------------------------------------------------- somanythingsimean · 2023-12-15 19:20 Well I'm just trying to play the videos right on the device currently, and its not even able to do tjay. Not sure what's different between my setup and others who claim they've been using pis as media server for years, because all I get is stuttering no matter the video file. Can't even play simple mp4 files on an absolutely minimal setup. Moving on to streaming eventually but for now I'd just like to play them locally. ---------------------------------------------------------------------- onthenerdyside · 2023-12-15 19:37 There's an old saying in the Plex community that applies to Jellyfin as well: the best transcoding is none at all. AFAIK, you can't hardware accelerated transcoding on the Pi 4, and it's really not powerful enough to transcode. That's why I moved from my Pi 4 to a Beelink N5095 mini pc when I added a couple of friends that may need transcoding occasionally. There are numerous moving parts to why your media is transcoding. Rather than repeat myself, check out this post I made on r/Plex a couple of weeks ago: [https://www.reddit.com/r/PleX/comments/186sitx/c omment/kbarx4y/?utm\_source=reddit&utm\_medium=web2x&context=3](https: //www.reddit.com/r/PleX/comments/186sitx/comment/kbarx4y/?utm_source=r eddit&utm_medium=web2x&context=3) You said you tried playing files on VLC. Was that on the Pi itself or off an SMB share on another computer? If it's another computer, it makes me think you have a network speed issue that wouldn't be solved by upgrading your client devices (tv box, etc.). You don't mention what resolution or bitrate your videos are in, but if you've only tried high bitrate 4K videos, [try some smaller files](https://www.larmoire.info/jellyfish/) and [different codecs](https://kodi.wiki/view/Samples). One other possibility is you have your external hard drive plugged into one of the USB2 ports instead of one of the USB 3 ports. I suppose there could also be an issue with the SD card you're using not being fast enough, too. ---------------------------------------------------------------------- somanythingsimean · 2023-12-15 19:43 The files are all 1080p mp4s. Also the vlc playing is on the Pi, not in docker or virtualized.the files are stored on a permanently mounted ssd. I could try switching the port but even moving the files to another ssd in another port or to the SD card itself doesn't solve the problem. I'm leaning more into the issue being something with my OS install. When I go into the video properties of any video, it says my Gstream is missing a plugin and doesn't show any of the details. I can live without transcoding, and even with transcoding off in jellyfin these issues persist. In short, I get audio but it skips, and video is either stuttering and choppy or completely frozen. ---------------------------------------------------------------------- austozi · 2023-12-15 21:28 Turn off transcoding. The pi simply isn't beefy enough to transcode videos on the fly. There's nothing you can change about that. I used to run the pi 4 as a media server. It ran well as long as it didn't need to transcoded anything. All my videos were h.264/aac encoded, which are supported natively by modern browsers. Your mp4 files are probably encoded in a format that's unsupported by the browser. If you turn off transcoding in Jellyfin, it should display a notification about unsupported media format instead of trying to transcode the media. ---------------------------------------------------------------------- somanythingsimean · 2023-12-15 22:06 Transcoding is already off. The problem persists in any video player, whether that's in docker via the browser or on the Pi itself. I don't get the same problem playing videos on YouTube, however. Not sure where to go from here. The files are all 264/aac 1080p videos. Something else is amiss :/ ---------------------------------------------------------------------- Trixster82 · 2023-12-16 15:20 Soooo... Here's another option to add to the million... You could set up tdarr and have it offline transcode your files down to 480p (or whatever you want) stereo only MP4. If you set it not to delete originals and output to a mirrored folder prefixed as 480, then you can ask Jellyfish to look at multiple media folders and have a "Original XYZ" folder containing the ones you'd watch on the LAN... And then a "480 XYZ" folder you can access when on anything crappy. Then disable any video transcoding for all users. Pros: 1. Two selectable video profiles available on you pi (original or 480). 2. You can delete the original and still keep a small backup (if you need to re-watch or catch up on something later) Cons: 1. The "watched" status won't transfer between the two libraries. 2. Reason for Con 1 - Tdarr doesn't seem to follow the quality renaming parameters you use for Jellyfin and can be complicated to control working with source file in source directories. Not bashing it, it's more likely an unintended use case or lack of adequate knowledge. Transcoding on Pi4: It's not possible live, but offline (pre) transcoding as long as it's all H.264 (and 720p or lower resolutions) is totally achievable on that PI4 CPU... Just don't expect speed (expect anywhere between 4-8x the play time to complete)... With Tdarr there is also a server/node concept, meaning you can have a second (faster transcoding) device running Tdarr node container and you just turn it on when extra help is needed with multiple files (like your laptop/pc/etc). The Pi4 will happily trundle along, doing it's own thing 24/7. I have no experience of HEVC (h.265, x265, etc) on Pi but can almost immediately conclude you'll fail to achieve anything satisfactory AND this is a less compatible set of codecs with older/cheaper/low powered devices which even at low Res will kill the pi if asking for a live transcode to h.264 to take place.