How to build a media centre PC with XBMC
We show you how to make your TV smarter with a tiny quiet PC and the free XBMC media centre application
Tiny, fast PCs based on Intel’s NUC design are great for the living room. You can even buy NUCs in kit form so you can add your own components and install whichever operating system you like. Whether you build or buy, a NUC is an excellent basis for a media centre PC, allowing you to stream video from your NAS, music from your phone or MP3 player, watch live TV through the internet and control everything via a smartphone or tablet app.
To keep the overall cost down, we’re going to use the Linux Mint operating system, which comes preloaded with every media codec you’re likely to need, and the free XBMC media centre application. When you download choose the 64-bit Cinnamon version and then a UK download source, which is likely to give the fastest downloads.
The NUC doesn’t have an optical drive, so it’s easiest to install Mint from a USB flash drive. You’ll need at least a 2GB drive, with nothing you need on it. Download the Pendrivelinux installer and run it. Select Linux Mint from the first drop-down menu, browse to select the Linux Mint image file you downloaded, then select your USB flash drive from the final box. Double-check the drive letter is definitely your flash drive, then click Create. Once the process has finished, unplug the flash drive and plug it into your NUC.
NUCS AND BOLTS
While XBMC (and Linux Mint) will run on most PCs, we’re focusing on using an Intel NUC PC for this guide. We’ve tested Linux Mint and XBMC with the current-generation “Haswell” Core i3 NUC, which we think is the best value to make a media centre PC. There’s also a Core i5 NUC, but this is overkill for our purposes.
There are two Core i3 NUCs: the D34010WYK and the D34010WYKH. The latter is taller (perhaps the H stands for “high”) and has room for a 2.5in hard disk rather than an mSATA SSD. This means you’ll be able to fit a larger, slower disk, but as we’re planning to use our NUC to stream files from elsewhere, even a 30GB SSD is big enough. Once you’ve factored in a WiFi card and 4GB of RAM, a highly capable media PC will cost well under £350. The prices below are from Scan and were correct at the time of publication.
Hardware | ||
NUC | D34010WYK | D34010WYKH |
Storage | 30GB Kingston SSDNow | 320GB Seagate ST320LM001 |
Memory | 4GB Corsair PC3-10666 | |
WiFi | Intel Centrino Advanced-N 6235 | |
PRICE> | £312 | £323 |
You may also want to use an infrared remote control with a USB receiver; Maplin sells a Windows Media Center Remote Control for £20. You can also control XBMC with a smartphone or tablet app, as we’ll explain later.
BIT OF NUC-Y
The NUC should boot from the USB drive automatically, but if it doesn’t you might need to open the case and change the position of the BIOS Security jumper. It’s clearly labelled, but consult the manual if you’re unsure. You may also need to press F2 at boot to go into the BIOS and change the boot order so the flash drive is selected.
Once you’ve booted from the USB drive choose the top-most option of the text menu: Start Linux Mint 16 Cinnamon 64-bit. You’ll be dropped into the Mint desktop, but you’ll need to double-click the Install Linux Mint icon to actually install the operating system on your hard disk. The installation wizard asks for some details, such as your time zone, as well as a username and password for the media centre PC. As you’ll most likely be using the media centre without a keyboard, set the OS to log in automatically without requiring a password. When the installation is complete, a dialog box will ask you whether you want to continue trialling Mint or restart, so choose restart and you’ll soon be asked to remove the installation media (the USB drive) and press Enter to reboot your PC.
You can use Mint’s Update Manager (the blue shield in the taskbar at the bottom-right) and Software Manager (from the main Menu at the bottom-left) to update and install software, but it’s easier to use the Terminal. Open a Terminal window by pressing Ctrl+Alt+T and type sudo apt-get update followed by sudo apt-get -y upgrade to install all the available updates for your operating system.
Next you’ll need to download some tools to set up a PPA (Personal Package Archive, an additional source for installing new software) to install the very latest version of XBMC. Type the following:
sudo apt-get install –y python-software-properties pkg-config
sudo apt-get install –y software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get –y update
sudo apt-get install –y xbmc
You will now have the latest version of XBMC installed. Before launching XBMC, there are a few more jobs to perform before leaving the Linux Mint desktop.
NETWORK SHARES
We want to be able to copy files to the NUC over our network, so open the Home folder and right-click on the Videos folder, for example. Click Sharing Options to open the sharing dialog box, and then tick the Share this folder box; tick the other two boxes too and then click Create Share. Nemo (Mint’s file manager) asks if it can set the appropriate permissions – allow it to do so, and then repeat the process for the other folders you’d like to share on your network.
^Setting up shared folders is simple, and you’ll even get a helping hand from Linux Mint’s Nemo file manager
Next, ensure that the power button will make the NUC go into hibernate mode rather than turn off, so that Wake on LAN will work from a smartphone or tablet app. Head into the Menu and select System Settings from the left-hand column. Open Power Management and select Hibernate from the drop-down menu before clicking Close.
^If you set your NUC to hibernate rather than shut down, you can wake it up from your smartphone or tablet
Finally we want to have XBMC start automatically when the NUC boots, so head to System Settings and open Start-up Applications. Click Add and name the new task XBMC. For the Command enter xbmc -fs –standalone (with one double-hyphen). This will launch XBMC in full-screen mode when you start your PC. Click Save. We’re now ready to set up XBMC.
^Set XBMC to start automatically to make your NUC a proper standalone media centre
Launch XBMC from the Menu; it lives under the Sound and Video category in the middle column. If you want to use XBMC with an IR remote, check whether all the buttons work. If they don’t, put XBMC back into a window by pressing backslash, and then minimise it. Then open the Terminal and type sudo apt-get install -y lirc to download the remote control configuration tool. A text menu will ask you what kind of remote you use. Unless your remote is specifically listed, select the generic Windows Media Center Transceivers/Remotes (all) option and press Enter. The next screen asks which IR transmitters you use; most people will leave this as None, and press Enter again. Maximise XBMC and your remote should now work; press backslash to resume full-screen mode.
There are quite a few things to set up in XBMC, so the first place to head is the System section. Scroll down to the Settings section and work your way through each part. In the Audio output section change Audio output from Analog to HDMI and both the Audio output device and Passthrough input device options to something like HDA Intel MID,
^Ensure that the HDMI output of your NUC carries audio as well as video, and that your TV or amplifier is set as the audio recipient
Go back one level and you can enter the Services section – enable everything unless you know you don’t want it. Enable the webserver to allow Wake on LAN from smartphone or tablet apps, allow programs on other systems to control XBMC, and enable AirPlay if you have an iOS device; unfortunately, AirPlay Mirroring isn’t yet supported, and video AirPlay from iOS devices is currently broken, but should be fixed in the next XBMC update.
With the necessary settings in place, you can start adding sources for XBMC to stream media files from. We’ll use video as our example. From the main menu of XBMC, press down from Video to open its sub-menu. Click Files and you’ll see a mostly empty menu. In the new menu, click Files and Add Videos…, then use the Browse button to open the sources pane. We have a UPnP NAS, so we selected UPnP from this list, and then our Synology DiskStation. If your NAS doesn’t appear here, check it supports UPnP media streaming, and make sure this is enabled in your NAS’s settings. You can also stream files from a PC running XBMC – just install it on the computer where your media is stored, and make sure you turn on Share video and music libraries through UPnP in Services – Settings.
Once your source is selected, XBMC will set up the weird UPnP address and give the location a friendly name, which you can change if you like. You can add further sources to this view; for example, if your videos are stored in different folders such as Action and Comedy, you can add each folder as a separate source, making it easier to view the videos you want in XBMC.
^Setting up a streaming source is fiddly, but it’s easy once you get the hang of it
XBMC will try to attach poster art, film blurb and so on to your files if you tell it what kind of media to expect from this source (in our case, Movies) using its default “scraper” service. Click OK and then agree to the next dialog box. You can now repeat the process for the Music section.
APPY-NESS
There are various Add-ons available which can enhance XBMC’s capabilities, such as letting it connect to streaming services such as BBC iPlayer and YouTube.
You can download and install XBMC Add-ons by selecting the Add-ons menu under Videos or Music, and selecting Get More. This will let you install viewers for services such as YouTube and Vimeo, for example.
However, you need to add iPlayer from an unofficial repository. Minimise XBMC and open Firefox and download the latest zip file. Maximise XBMC and head to the Add-ons menu again. Select the option to Install from zip file… , then navigate to the downloaded zip file (it should be in Home Folder, Downloads) and click on the iPlayer zip file. XBMC will notify you that iPlayer has installed, and you’ll now be able to access it from XBMC’s Videos – Add-ons menu.
^There are some strange and wonderful Add-ons for XBMC
SMARTPHONE CONTROL
If you’re striving for a minimalist living room, you’ll want to hide the NUC from view and just use a smartphone app to control it. If you own an iOS device, there’s no point choosing anything but the official XBMC app – it’s free and the alternatives only offer slightly adjusted layouts. While the app could discover our XBMC-running NUC and automatically enter its IP address, we were a little annoyed at having to enter the whole MAC address manually (you can find this in the System Info, Network menu of XBMC).
We were more annoyed that the Android version of the official XBMC app couldn’t connect to our NUC at all. However, we loved the simplicity of Yatse Remote, as it found the NUC automatically and even entered the MAC address – all we had to provide was the user name and password. To use the Wake on LAN function to wake the NUC from sleep, you have to tap and hold on the XBMC device name at the top of the screen. Windows Phone users don’t even have an official app, so should use XBMC Remote instead. All these apps are free.
If you have a Synology DiskStation NAS, you can also use the Synology smartphone and tablet apps to stream audio and video straight from your NAS to your XBMC media centre, to play on your TV. Make sure Audio Station and Video Station are installed and enabled in your NAS, install the DS Audio and DS Video apps on your mobile device and log into your NAS. In the app’s Settings menu, select your XBMC media centre as the UPnP or AirPlay playback device, and your audio and video will now stream from your NAS to your media centre, all controlled from your mobile device.
^Hide the NUC from sight, wake it remotely and control everything with an app