Sunday, 25 November 2012

More Pi Adventures - Icing on the cake

Navigating the XBMC menus

So by now, I have Raspbmc installed and working, and hopefully know the limits on what it can and cannot play. Now to customise/configure the xbmc install to how I want it (to match other installations on xbmc that I have through the house).

One thing that was bugging me, was the fact I needed to have a keyboard attached to actually use it. That in itself is no big deal, but im currently using the RaspPi in the bedroom, and having to use a keyboard whilst in bed gets to be a chore after a while.

So, I began to investigate what 3rd party remote controls I could purchase to use in it place. Remotes like the Harmony's apparently work great, but I don't have one, and I don't really want to spend £70+ on a remote control - even if it can control upto 15 devices.. as I say, im using this in the bedroom, so I've only got the Pi, amp, and TV..  seems a little overkill to me.

That's when I discovered that the latest version of Raspbmc also includes HDMI-CEC (Consumer Electronics Control). This essentially means that you can control multiple devices connected via HDMI with ONE remote control. I'd heard of CEC before, back when XBMC announced a year or so ago, that it was supporting CEC via an external 3rd-party attachment. Now, as it turns out, the R-Pi can also function as a CEC client out of the box, and the Raspbmc flavor of xbmc has support for CEC built-in.

Most of you with newer flat-screen TV's may already have CEC-enabled sets, the different manufactures call it by different names, Sony, for example call it 'Bravialink', and Samsung calls it 'Anynet+'

The TV that the Pi is attached to is a Toshiba, which has its own version, called 'Regza-Link'. On the remote control for the tv, there is a switch to turn it to 'Regza-link'. so, flicking the switch, I started pressing buttongs to see what would happen. Low and behold, things started to happen!

Flicking to Regza-link, I can use the D-Pad, and center button to control the Pi - No need to purchase and use another remote control, I can simply use my existing TV remote control to navigate the XBMC menus! now that is cool!

XBMC Plug-ins

On previous installs of XBMC, I've installed the BBC iPlayer add-on, and had some (mostly good) success with it. I can browse all of the iPlayer content, and stream directly onto the TV without having to hook up another machine with a web-browser to access the content.

I came across a blog post on djb31st.co.uk, that detailed what you need to do/install to get it up and running.

Following these step-by-step instructions, I had the BBC iPlayer, ITV Player, 4od and Demand 5 catchup services running in no time, with no issues!

And, by using the HDMI-CEC above, I have effectivley got one of the newer swanky 'Smart-TVs', with just a £25 computer.

More Pi adventures - streaming videos

More adventures with the Raspberry Pi

So, in my previous post, I showed how to get XBMC media center installed onto the SD Card for your Raspberry Pi.

Now comes my thoughts, after using it for a short while.

Non-x264 encoded files

I only have xvid-encoded video files to test with, so i'm not sure how other encoded files will perform.
Streaming xvid-encoded files over the network provided rather pleasing results.. for the most part, I can play these files just fine.

I did have a couple of files that would buffer every few seconds, effectivly making watching the show impossible. However, I couldn't be sure if it was a) an issue with the Pi, b) an issue with that particular file, or c) network-related issues. - more investigation is required at a later date.

Generally speaking, playing xvid files is nigh on perfect.

Verdict: Awesome!

x264 encoded files

So onto x264 encoded files. If the file has been encoded with the x264 codec, then the Pi can use its hardware-accelerated GPU to do all of the decoding (which is good), leaving the rather weak CPU to do other things. I have a few different files that have been encoded this way, namely:

  • 256-400mb TV shows (contained within the Matroska format)
  • 5-8GB bluray rips (again, contained within the Matroska format)
  • 15-40GB .m2ts files, ripped straight from a bluray disc.
The TV Show files all played without issue, with hardly a burp from the Pi. So far so good!

The bluray rips also played without issue, which was a suprise. I was expecting these to either fall over, or start buffering left,right and center.. but no, they were all good.

The only issue comes with the full-fat Mpeg streams taken directly off a bluray disc, with no re-coding or converting. My other HTPC plays these fine over a wired network.. wireless is a different matter (but thats for another post).
Most, if not all exhibited some form of stuttering, showing itself as buffering every few seconds. Now, at this point I'm not sure if its network related issues, or the Pi just can't cope with the rather large bit-rates found in these epicly big files.
At some point, i'm going to try copying a file to the SD Card, and running from there, to see what happens.

Verdict: For the most part, Awesome! - .m2ts files don't work too well, but I wasn't expecting it all to work on such a low powered device.

Rich's adventures with the Raspberry Pi

Rich's Adventures with the Raspberry Pi

For the un-initiated, the Raspberry Pi is a small, credit-card sized computer designed for low-cost entry for children/students to get the ball rolling with computer programming.

The Raspberry Pi contains:

  • HDMI socket
  • RJ45 (Ethernet) port
  • Micro-USB socket
  • Composite video output
  • 2x USB sockets
  • SD card socket
  • 256MB Ram (newer models now contain 512MB) 
  • 700Mhz CPU
  • 3.5mm Headphone jack for audio-out


The best thing about the Pi, is that it also contains a hardware-accellerated GPU, so that the playing of x264-encoded video files will play absolutly fine (even 1080p ones!)

With no internal storage, all software is installed and executed from the SD card, so a card of at least 4GB is recommended.

XBMC

This leads me on to the reason I purchased one. A small, cheap, media center.
It was never my intention to start coding on it (I do enough coding as it is, as part of my day job ;)
If you've not come across XBMC before, then its well worth a look. XBMC is an open-sourced media center application that has installers for Windows, Mac, iOS (iPhone, iPad, Apple TV/Apple TV2), Linux, and now, ARM-based processors.

I've been using XBMC for years, ever since it first started on the original Xbox 1, way back when it was called 'Xbox Media Player'. The original Xbox has now been dropped, but losing a 10+ year old console has enabled them to branch out, and add more and more features.

Installing XBMC

Doing a little research beforehand, I discovered Raspbmc, a small Debian-based linux package that has most of the the un-needed elements removed, and the XBMC code added.

Installing XBMC to the SD Card is simple enough.. download the installer from the download section of Raspbmc. Once downloaded, just run the installer. (if your installing from windows, and you have UAC active, then you should run it as Administrator)

Execute the installer, and you should end up with a screen like below:

http://www.raspbmc.com/wp-content/uploads/2012/06/rwin32.png

Your SD card should be the only item displayed on the list, so go ahead and select it, and hit 'Install'.

This will download the installer files, and create a bootable image directly on the SD Card.
Once this is done, bop over to your Pi, pop in the SD Card, and boot up.

One thing to note, is that a network connection is required for this install, so make sure that your network cable is plugged in prior to powering on.

The installer should then start running. What it does here, is connect to the Raspbmc site and download the latest version of XBMC (which at the time of writing, is v12 [frodo] beta).

This will take a few minutes, so like the installer says, go grab a coffee ;)

Just leave it to do its thing, and all being well, when you return XBMC will be all correctly installed and ready to go.

Simples!