Tuesday, 14 July 2015

DIY network media player

DIY network media player

A Raspberry Pi 2 is a cheap and easy way to build a powerful media player.

The launch of the original Raspberry Pi was a bit of a phenomenon. It was a super-cheap computer board that could be used to build a variety of devices. It could also be used to build a network media player, but it was sluggish and not really great for the task.


The Raspberry Pi 2 has changed that. You can now build your own network media player for less than $100 that’s every bit as capable (if not more so) than many commercial network media players. With the new processor in the Pi 2 it’s perfectly snappy and absolutely capable of 1080p media playback.

To go along with the board, we have a new OS to run on it: OSMC (osmc.tv). OSMC is essentially a cut down version of Debian Linux running Kodi as the interface. Kodi, if you’re not aware, is the app formerly known as XBMC, is quite likely the best free network media player app there is. It has incredible support for formats, devices and protocols, a plug-in architecture and it’s easy to use.

WHAT YOU’LL NEED


To build your own network media player you’ll need a few things. The Raspberry Pi 2 is available from a number of stores, usually for about $50. at only gets you the naked board, however; you don’t even get a power cable in the box. So you’ll need a few extra things to make it work:

- A Raspberry Pi case (typically $10-$25).
- A Micro SD card (8GB or larger), preferably class 10 speed ($10-$15).
- A micro USB cable (the same type used for charging mobile phones), which will be used for power. ($2 - $3).
- A standard HDMI cable.
- An SD card reader for your PC. Hopefully your PC has one built in, but if not you’ll need one to set up OSMC using this method.

There are a few optional extras you can get as well:

- A USB Wi-Fi adapter. The Raspberry Pi has wired networking built in, but no Wi-Fi. (Cheap 802.11n ones cost about $15).
- A Media Center Remote with USB IR receiver (about $15). More on this in a moment.

THE REMOTE


OSMC can be entirely controlled with a remote control. You don’t ever need to plug in a keyboard or mouse (though you can). What’s more, you may not even need to buy a remote.

Whether or not you need a new remote depends on whether your TV supports HDMI-CEC (consumer electronics control).

HDMI-CEC is also known by a variety of vendor brand names, like Panasonic Viera Link, Samsung Anynet+, Pioneer Kuro Link, Sharp Aquos Link, Sony Bravia Sync and so on. HDMI-CEC allows your TV to send device signals down the HDMI cable to attached devices to control them. Essentially, it will let you use your TV remote to control the Raspberry Pi.

Does your TV remote have media playback buttons on it? It’s likely that it supports HDMI-CEC. You can also go into your TV’s setup menu and see if you can locate it, either under the HDMI-CEC name header or on the particular vendor’s brand name.

If your TV does not support HDMI-CEC, then you’ll need a remote and USB IR receiver for the Pi. The cheapest and easiest way is to use a Windows Media Center Remote. OSMC works perfectly with Media Center Remotes, no setup required.

OSMC absolutely works with mobile phone remotes as well, like Kore on Android.

SETTING UP OSMC


Now let’s get down to the setup. It’s actually very easy with a Windows PC (which is why we went with OSMC over alternatives like OpenELEC):

01 Put the Micro SD card into the SD card reader on your PC.

02 Go to osmc.tv and download the Windows installer for Raspberry Pi 2.

03 Run the installer and step through the options: Choose your language and platform (Raspberry Pi 2); choose the latest version of OSMC to install; choose what type of device you’d like to install it on (SD card); whether you’ll be using wired or wireless. Finally, you’ll see a list of detected SD cards in your system.

04 The installer will then proceed to download an operating system image and install it onto the SD card. Once it’s done, you can close the installer and eject the card.

STARTING THE RASPBERRY PI


Now that we’ve installed OSMC on the SD card, let’s get it running on the Pi.

The first thing to do is put together your Raspberry Pi, which really means just installing it in the case. Put the SD card into the Micro SD card slot on the Raspberry Pi 2. Plug the HDMI cable in, and also the USB WiFi adapter or IR receiver if you have them.

Grab the micro USB cable and plug it into the Pi’s micro USB power port and any powered USB port. Much like many phones, the Pi is powered over USB — and it will need roughly 900mA to operate (so some ports might not provide enough juice). Most USB ports on TV sets will do the trick, but some will not. I have it running o the USB port on a Linksys router. You could also plug it into a powered USB hub or a USB wall socket as long as the socket provides 1A or more.

As soon as the power is plugged in OSMC should start to load. There’s a brief initial setup process and then you’re good to go.

SETTING UP THE REMOTE


If you’re using a Windows Media Center remote, OSMC should just work.

If you’re planning on using your TV remote through HDMI-CEC, you might have to go through an extra step. Go into your TV’s setup menu, and nd the HDMI-CEC/Anynet+/Viera Link/Aquos Link/Bravia Sync/whatever-it’scalled-on-this-model setup. Make sure it’s turned on, and you should see the OSMC device listed (you may have to go through device discovery process first). Select it.

Once you’ve done that, the arrow keys, select and media control keys should work for the Pi as long as they’re not being used by the TV set.

USING OSMC


OSMC works exactly like the desktop version of Kodi. You add sources and plugins the exact same way, and it supports most plugins and all the sources and formats that Kodi on Windows does. Although it runs on Linux, there’s no real Linux-ish stu to deal with: Kodi is the interface.

It defaults to the OSMC skin, which is a very basic looking skin, but you can change that by going into the settings and changing it to Con uence (the default skin for other Kodi versions) or another skin. You should be aware that if you do that, you’ll lose a special menu that only appears on the main page of the OSMC default skin: the My OSMC menu.

It’s no big deal, however: you can still access it by going to Programs and selecting the OSMC plug-in.

The special menu in question is the system control menu. It lets you control your Raspberry Pi 2 settings, con gure automatic updates and install new apps into the underlying Linux operating system from the App Store. You probably don’t ever need to access it, but you can experiment with it if you like.