Turning a $35 Raspberry Pi Into a Weekend Media Server

Turning a $35 Raspberry Pi Into a Weekend Media Server

Tutorials diy hardware home-server raspberry pi xbmc

I finally got around to setting up a Raspberry Pi as a media box this weekend, and I want to write down what actually worked while I still remember it, because half of what's out there for this project is either wrong or written for a slightly different board revision than the one you'll actually buy.

Quick background if you've somehow missed the Pi thing entirely: it's a full computer on a board about the size of a credit card, sells for $35 (the Model B, with 512MB of RAM and an Ethernet port), and a big chunk of the hobbyist internet has been buying them since last February to turn into tiny servers, retro game emulators, weather stations, whatever. Mine sat in a drawer for something like four months before I touched it, which tells you a lot about how "weekend project" time actually works once you've got a toddler in the house.

What I wanted was dead simple: something plugged into the TV that could play everything sitting on my old 1TB WD My Passport drive without me hauling a laptop into the living room every time. Raspbmc (basically XBMC built specifically for the Pi) seemed like the obvious answer, and mostly it was.

Setting it up

The install itself is almost insultingly easy compared to how much time I spent psyching myself up for it. Download the Raspbmc installer, point it at an 8GB SD card, and it pulls the OS down and writes it for you. Fifteen minutes, maybe less if your connection isn't garbage. Plug in Ethernet (I didn't bother with WiFi, figured a wired connection would be one less thing to troubleshoot), HDMI into the TV, power, and it just boots straight into XBMC.

Where it got annoying was the library. XBMC doesn't want a folder of files, it wants a proper library, which means it wants to scrape metadata for everything, which means it wants your file names to be reasonably sane. I've got a folder going back to college with names like "video_final_FINAL2.mp4" and XBMC just shrugs at those. Had to rename about forty files by hand before it would pull down real artwork and descriptions. Not a huge deal, just more tedious than I expected going in.

The power supply thing nobody warns you about

Here's the part that actually cost me an evening: the Pi is picky about its power supply in a way that isn't obvious from the box. I first tried an old phone charger I had lying around, a 5V 700mA one from some ancient Motorola. It "worked," except the Pi would randomly reboot itself every twenty minutes or so, right in the middle of a movie. Turns out the Pi wants closer to 700mA to 1A depending on what's plugged into the USB ports, and if it doesn't get enough it just quietly browns out and restarts. Swapped in an old iPad charger (2.1A, way more than it needs, but that's fine) and the reboots stopped completely. If you're setting one of these up, just spend the eight bucks on a proper microUSB charger rated for at least 1A and skip the guesswork I went through.

Total cost for the whole thing, not counting the drive I already owned: about $58. Thirty-five for the Pi itself, thirteen for a case because I didn't want it sitting on the shelf naked, and ten for the SD card. Compared to a $150 Roku, that's a pretty good deal for something that also doubles as a low-key Linux box I can SSH into whenever I feel like messing around.

Is it as polished as buying an actual set-top box? No, not really, and I wouldn't hand this to my parents and expect them to figure it out without a phone call first. But for anyone who likes fiddling with things on a Saturday afternoon, it's a genuinely fun way to spend $35, and now there's a little green board humming away behind the TV instead of a laptop balanced on top of the cable box, which is where things stood a week ago.

One more thing I'll mention since someone will ask in the comments: no, it doesn't handle 1080p everything flawlessly. Anything encoded in certain flavors of MKV chokes a bit and drops frames. For 90% of what I actually watch it's completely fine, but if you're building a serious home theater rig around this thing and not just a scrappy weekend project, temper your expectations accordingly.