Wednesday 7 August 2013

My Raspberry Pi media centre project - Part II


23/07/2013 - ordering

Ordered everything:

  • Raspberry Pi + power supply from RS Components. This takes a whopping 28 business days to arrive, but I'm busy enough ripping everything
  • HDD + DVD Drive from megabuy.com.au, my favorite reseller with PCCasegear.


29/07 - installation of the ripping station
Received the stuff from Megabuy.

Installed the DVD Drive (too easy). I need a region-free drive since half my DVDs are Region 2. It appears this drive (LG GH24NS90) uses a MediaTek chipset for which no RPC1 firmware exists. In short for those who don't patch their DVD firmware, a RPC1 firmware is an unofficial/hacked firmware upgrade that makes your DVD drive region-free. More information on RPC1.org, it's worth browsing.

I thought I might have to buy a second drive, to keep one Region 4 and one Region 2, but this wasn't needed, you'll see why.

I rip DVDs in 2 stages (on Windows):

  1. DVD Decrypter does a full rip and removes the DVD protection (hey, I bought those movies, I do what I want with them, no?). It creates an .ISO file.
  2. Handbrake reads the ISO, locates where the main movie is, extracts it and creates a video file, either mp4 or h264. I prefer h264 since the Pi can decode this format in hardware.

The accidental beauty of this is (in full humility) that it takes about as much time to rip with DVD Decrypter than to encode with Handbrake (on a quad core Sandy Bridge i5), so I can encode a DVD while ripping the next at the same time

DVD Decrypter is a fairly low-level program, which completely bypasses the DVD Drive region limitation. I'm not sure how it does, it just says it does a brute force attack on the key, which is supposed to take longer but I couldn't see any difference.

07/08  ripping
OK, to this day I've now ripped more than 100 DVDs. I don't dare counting how many are remaining.

Doing about 6-7 per night, the routine is:

  1. stack DVDs next to the PC
  2. feed them to DVD Decrypter once in a while
  3. if I'm not in front of the PC, just enqueue all ISOs in Handbrake before going to bed, and let the PC churn data at night.


The Pi will not arrive before a couple of weeks, so I must rip as much as possible. DVD Decrypter is so easy to use that the whole family helps. Isn't that beautiful?

Stay tuned for Part III, when the Raspberry arrives. I hope it arrives...


My Raspberry Pi media centre project - Part I

So, after years of having my collection of movies & music split across CDs, DVDs, a few hard drives (a lot of duplicates-but-not-quite, so go figure where you put stuff), I decided to rationalise things, by setting up a media centre.

The main advantages will be:

  • free up the cupboards of the 400+ DVDs, CDs, etc
  • have everything available from a central location
  • make backups easier
  • no better opportunity to tinker with a Raspberry Pi!

For those who lived in a cave, the Raspberry Pi is a $35 credit-card sized computer that consumes almost nothing, got plenty of connectivity and runs Linux.

I'll try here to document the whole process, from day 1 to a glorious go-live (hopefully...), so this will probably span over several posts.

Our current setup

Our current video setup is a recent (2012) wifi-enabled Samsung Smart TV, and a desktop PC with all movies stored over several internal or external HDD, loosely backed up.

Since the TV is DLNA compliant, we can stream movies to it from the PC, either directly (with Windows Media Player), or with the TV remote with Samsung dismal interface, or from any Android DLNA app, like the excellent BubbleUpnP.

The drawback is that it requires to power on the desktop, and to use a phone as the remote. Also, Window Media Player library management is .... well, unpredictable at times, and won't play all formats natively (mkv for example).

We also have a hacked Wii, with WiiMC, that accesses video as a SMB share from the PC. Neat solution, unfortunately the Wii is severely underpowered and the image quality quite bad.

The plan

Our geeky solution for media domination is:
  • a big external HDD (2TB, WD Elements)
  • a Raspberry Pi running RaspBMC, which is the Raspberry version of the well known XBMC media player
  • the TV. La television in French.
What makes the Pi ideally suited for the task?
  1. hardware video decoding, so even if its CPU it not powerful, it should play Full HD without any problem
  2. HDMI output, perfect.
  3. Supports TV remotes via the HDMI backchannel thanks to the CEC standard. Great.
  4. Free Software!

Oh, also the HDD will be plugged directly to the Pi, where it can probably (didn't dig that yet) be shared so we can add movies to it from the PC. 

Now, the stuff

Here's the stuff I had to order and the associated cost, including the Australian rip-off tax (tm).

  • Raspberry Pi w/ power supply : USD54.00 from RS Components
  • External WD Element 2TB HDD : AUD89.00 from MegaBuy
  • HDMI cable : haven't bought one, will scavenge it
  • SD Card : not bought yet

You can use a mobile phone charger as a Pi power supply, but it's a bit hit-and-miss apparently, since the Pi needs a stable voltage/amp, and phone chargers are just made to, well, charge a phone, not power a device 24/7. So I opted for the more expensive but official power supply. YMMV.

I also had to order an internal DVD drive to rip my DVD collection. I had only an external, USB one, which would take ages to rip anything. At $18 the drive, there's no hesitation.

And music?

Yes, I mentioned music before. I've got a good Yamaha audio amp but it's just audio, and pretty old, so no digital/HDMI input.

On the other hand the Pi has an analog output but it's supposedly low quality (11 bit sampling, etc). A solution could be to use a HDMI splitter (like this), to extract audio from the HDMI output and redirect it to the amp, but I'll probably rather shell out a few bucks for a decent USB DAC, which should have a better quality.

RaspBMC's latest version (Frodo) supposedly now supports USB sound output, so the USB DAC option seems safe.

Anyway, I'll deal with video first, then Music at a later stage of the project.

Now we know what we want to do, stay tuned for Part II, where the actually work begins