With the cost of SSD’S dropping I’m looking to retire my bulky, moving-parts server, which is in a mid sized computer tower with several multi terabyte HDD’s.
It has been a little over 10 years since I did that build and it has served me well. It’s on 24/7 and two of the drives precede the Thailand floods. All three drives lived in /storage and I used LVM to make them look like one giant disk to the rest of the OS/software (on Debian). >!Don’t need redundancy and backup is isolated elsewhere, so I’d love to preserve the same storage structure so my configs can transfer over with fewer migration issues.!<
- What are the limitations of using my spare RPi3B, at least in terms of storage capacity and number of drives?
- Should I/can I use internal ssd’s with USB adapters, in case I want to upgrade the board later and preserve the storage?
- Will I be able to transcode on the fly via Plex/Jellyfin to stream videos away from home i.e. can the CPU handle that?
Keep in mind that this Pi would be headless, as is my current big box setup. Curious what the community’s thoughts might be and if anyone uses their pi’s in a similar setup!
Limits on capacity and number of drives is primarily going to be IO. IIRC, the USB bus is shared with the network, and they’ll content for bandwidth. Not sure how else you expect to connect the disks, so yeah use USB adapters.
You absolutely won’t be able to transcode on the fly. Not a chance. You can decode up to about 1080p @60fps but trying to transcode in realtime won’t work, even if you compile for the VideoCore GPU and use hardware, it’s just not enough.
I use a Raspberry Pi 3B as a Jellyfin server, and people are correct… it’s not very suited to the task. Transcoding must be turned off in the settings as the the little Pi has no hardware decoding currently available, so I re-encode all my stuff to h264/aac before upload. Last I heard there were attempts to get some hardware decoding enabled, but I see very little progress. rpi-ffmpeg
I currently have 8 SSDs attached (which is probably too many), and I get about 12MBps throughput on USB 2.0. I have two powered USB hubs attached so that the SSDs don’t undervolt the RPi, which is really easy to do. As people already mentioned, part of my speed issue is the ethernet being on the same internal hub as the USB ports. I recall that WiFi is not tied like ethernet so you may increase throughput by connecting to your network via 802.11. These rules change when you get an RPi4 though.
The media itself takes some time to scan in, and if you’re booting from an SD card you’ll want to mount all jellyfin directories on dedicated LVs to avoid tearing up your SD card. Also doesn’t hurt to enable log2ram to reduce SD card wear, though you’ll need to modify your system journal to flush more frequently so you don’t fill it to 100% accidentally. log2ram
But yeah, after all that stuff it works more or less like I’d expect. The interface can take a second or two to load thumbnails, but I can watch 1080p content without buffering from inside the network… though content will always be exactly what you upload with no changes to resolution, encoding, or container. If you want different resolutions or encodings you have to upload multiple copies in the same folder (with specific naming) so they show up as options in the Jellyfin client. I even got some VLC installs to play the media by enabling DLNA.
What I love about your comment is that you are using more or less the same methods that were around when the RPi3 came out.
I didn’t consider weighing the storage penalty vs the cost of processor upgrades when keeping an SD or 720p version of files around. I know some people run two instances of radarr/sonarr/jellyfin for this reason. Like many, my connection is asymmetric, meaning the best I can probably serve is 1080p over WAN at maximum luck, or a few simultaneous streams mixed between 720p and 480p.
Example: Asteroid City is 18.5 GiB in 4k and 3.5 GiB in Web 720p, a roughly 5x’s file size difference. If we estimate SSD cost is ~$50/TB, 5TB of 4k content costs an extra $50 to keep 720p around for WAN streaming.
That to me justifies not upgrading processing, using instead an RPi3 for low power storage maxxing, and eating the cost in file duplication. I simply won’t be able to get on-the-fly hardware transcoding capability anywhere close to this price point.
Ngl, I was pretty bummed about the realities the previous commenters enlightened me to in this post I’m very grateful to their wisdom. But, you have given me so much new hope!
Yeah, it’s an install that’s getting long in the tooth. I’ve been hunting for a RPi4 for two years now, as USB3.0 would allow some basic LVM RAID5. I finally got one a week ago and have been waiting for RPiOS Bookworm to come out before making the painful transition… then RPi5 gets announced. Just my luck. haha
Do you keep your files in multiple formats (hevc and h264) or only h264? I am ripping mine to hevc but due to transcoding limitations I am thinking about re-encoding to h264/mp4 as well, so from mobile it would stream the lower quality and the TVs would stream higher quality, but not sure if that works…
I guess that depends on how much storage you have to spare. In Jellyfin you can designate different formats by appending the label after the name, as long as both files are in the same parent directory. For example I’m subscribed to a movie maker on Patreon, and he allows his movies to be downloaded at their native resolution in an mp4 with h264 encoding. Not ideal for running on an old CRT with a Roku1 attached, haha. So I scale them and put the resolution as the label, then I use the drop-down inside the app to choose the appropriate version. It’s worth the storage penalty for me. Other stuff like GamesDoneQuick archives I downloaded are not multi-format since I don’t feel like keeping weeks worth of streaming media in redundant files. So those are left in webm with VP9.
├── Skull Forest (2012)
│ ├── folder.jpg
│ ├── Skull Forest (2012) - 480p.mp4
│ └── Skull Forest (2012) - 1080p.mp4
Ok that makes a lot of sense, thanks!
I really would advise against a raspberry. Even a Pi 4 is too slow for transcoding and storage over usb is just too unreliable. I would go with a motherboard with integrated CPU. There is a really good one from Topton with a Celeron N5105 that supports hardware transcoding. I did a build with that recently and I’m really happy with it so far. Power consumption is around 35W with two 18TB sata drives. If you only use one and have it go to standby when not in use you could go even lower.
If you want something prebuilt there is a NAS from terramaster with the same cpu. It uses a an internal USB for OS storage that’s easily replaced. It’s called F2-423.
I concur with the first comment, RPi is not well suited for a media server, where you need solid storage and good performance for transcoding on the fly. However, RPis are fantastic media players
I have jellyfin on a Pi 4 streaming from a NAS and transcoding. It can do a single 1080p transcode with buffer delays or comfortably do two 480p transcodes simultaneously. It depends on the source resolutions and the destination for transcoding. It is capable if your source material is 480 or 720p. Anything more and it’s a bit of a pain.
I see. And if the Ethernet competes with USB for bandwidth this is probably doubly not great, even if I’m just serving files straight up over samba. Indeed, this same Pi was used as a front end (kodi) to my current server before I got a smart tv and it worked great for that. I have a smart tv now so this pi needs new use, and I want a server more compact.
I know now that my question diverges from the Pi community, but do you have any good sites that have different NAS builds using boards similar to what you posted, or communities of this kind? I think I’d like to geek out a bit creating different builds. As mentioned, it’s been some time since my last build
You going to be most interested in learning the video decode and encode capabilities of mini-PCs:
- https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video
- https://en.wikipedia.org/wiki/Unified_Video_Decoder
- https://en.wikipedia.org/wiki/Video_Core_Next
I don’t know any specific community or how-to about this, but most people seem to run Plex and it just works.