First you might ask, what’s Rasplex? It’s a port of the Plex Home Theater media player that’s made to work on the Raspberry Pi. It looks like the picture above, pretty cool!
Ok, so what’s a Raspberry Pi, you might ask. It’s an amazing small and cheap computer that can be used for a multitude of things, such as learning programming, creating multi-node clustered supercomputers, MAME-gaming and media playing. It looks like this:
I bought my Raspberry Pi a few months ago, playing around with it for a week getting different distributions running, playing some games on and then forgetting about it for a while. But last weekend I thought “Hey, why not install Plex on this thing for our old TV?”. So let’s get started with how I did it.
First, to install anything on a Pi you need an SD card. I bought an 8GB SDHC card (class 10), you don’t really need a card that big but I thought I might use it for other purposes later so why not. To get Rasplex onto the SD card, you can use the installers available at the Rasplex website or just use “dd” or a similar command to write the content of the downloaded image to the card. Here’s how I did it on my Mac using the very fast “raw disk” or “rdisk” method. Of course, use your own disk numbering here.
- Open Disk Utility, choose your SD card and erase it. You’ll see a new partition called “UNTITLED” created.
- List the partitions of your Mac to see the disk ID of the SD card using the commandline tool diskutil: “diskutil list“
- Unmount the “UNTITLED” partition without unmounting the entire disk: “diskutil umount /dev/disk2s1“
- Now that we have the raw disk but no partitions mounted we can access the raw disk and write the Rasplex image to the SD card very quickly using the following command: “sudo dd if=rasplex-0.2.1.img of=/dev/rdisk2 bs=1m“
Done! You now have Rasplex on your card and we’re getting ready to set up the hardware.
The TV I wanted to hook the Raspberry Pi up to was an old “fat” TV, with nothing but SCART inputs for devices like VHS and DVD players. The Pi has an RCA output for video and a 3.5mm jack for audio. So how to connect these to my TV?
Ah, the joy of shopping at the local electronics shop. I bought an RCA-to-RCA cable for video, a 3.5mm-to-2xRCA cable for audio and an RCA-to-SCART converter. I connected them all together and plugged it into the Pi and to the TV. Let’s boot it up!
Unfortunately, I got no picture, just a blank screen saying I have no signal. Luckily I found out that the Rasplex install forces HDMI out, even if there’s no HDMI connected, and this can be changed.
So plug in your SD card into your computer again, and open the file “config.txt” on the card. You should find two line like this:
Comment them out or remove them completely, and add the following into the file (choose from your own standard, PAL/NTSC/etc):
sdtv_mode defines the TV standard for composite output (default=0) sdtv_mode=0 Normal NTSC sdtv_mode=1 Japanese version of NTSC – no pedestal sdtv_mode=2 Normal PAL sdtv_mode=3 Brazilian version of PAL – 525/60 rather than 625/50, different subcarrier sdtv_aspect defines the aspect ratio for composite output (default=1) sdtv_aspect=1 4:3 sdtv_aspect=2 14:9 sdtv_aspect=3 16:9
As the TV I was installing Rasplex for was a PAL 4:3 TV, I put in these lines:
Now when I booted it up again it worked! I got picture and sound, and streaming media worked like a charm. After a while we wanted to try it out on another TV that was using HDMI, and to get it working with HDMI all I needed to do was to revert the changes I made to the config.txt file, and it was up and running again.
All in all, the Raspberry Pi is definitely a worthy component in a modern home theater setup, it’s incredibly easy to use and very powerful even if it’s tiny. Try it out!
For those wondering about the other gear that was used in building this, of course there’s also a media center remote, a power supply and a wireless D-Link DWA-121 adapter that works great with the Raspberry Pi.
There are a few tweaks I’d like to add to this post as well, that has helped me in streaming different quality media across multiple rooms with sometimes spotty wifi.
First, overclocking the Pi. When overclocking it the Rasplex GUI runs smoother and media streaming works better. Of course, overclocking should always be done in moderation, and you can find out more about overclocking here. And here’s my overclocking settings that have proven to be very stable:
arm_freq=900 core_freq=333 sdram_freq=450 over_voltage=2
Secondly, I’d recommend increasing the cache on Rasplex. It’s set at default to 5%, but I’ve increased it to 30% (one of the benefits of a larger and faster SD card). You can find the cache setting at Preferences->System->Cache. If you’re having issues (like I had) with your remote not working properly when using up/down/right/left arrows, try enabling “Remote control sends keyboard presses” in Preferences->System->Input Devices.
Now go buy yourself a Raspberry Pi and get to it 🙂