![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbY18z7FpwkeLCVNMRWTqAeMi3cBoylSATGMNnqyXAzws-H-7T9mRCR5g7PYRdvBMoP2dT4nZiOt3onJRdwARfm2KKVDrgQRhqE9k0T6W4qm4wKzV8JvoW5wI68Eqy4ZTpFA5a-FGCaQ/s1600/clickplay.png)
You can use the Raspberry Pi to do all kinds of geeky things but one of the most interesting uses for the little device is that of a home theatre PC (or HTPC). The small size of the hardware and the fact that it runs silently make it a really good choice for building your own entertainment centre.
One of the best open source apps for turning any computer into a fully functional media centre PC is the recently rechristened Kodi media player, formerly known as XBMC. Kodi uses a 10-foot user interface, which is ideal for connecting to large-screen displays and projectors.
The interface has ergonomic display elements and can be easily navigated using a remote control. You can also control playback using your Android smartphone. Using Kodi you can view multimedia in virtually any format. Besides playing files from local and network storage devices, Kodi can also fetch files from online services, such as YouTube, Spotify, Pandora Radio and more.
While you can install Kodi on top of Raspbian (the operating system for Raspberry Pi), there are several projects that produce a dedicated media centre distro for the ARM-based device, including OpenELEC.
The OpenELEC project produces streamlined builds based on Kodi for various platforms, including the Raspberry Pi.
The advantage for with OpenELEC for many people is that you can use the distro without any knowledge of its base Linux OS.
Download OpenELEC
To start setting up your HTPC, grab the OpenELEC build for the Raspberry Pi. As with other projects, OpenELEC hosts different images for the older single-core Raspberry Pis and the newer quad-core ones.
Once you've downloaded the image, extract it and transfer it on to an SD card, either from Linux using the dd command, as follows:
sudo dd if=OpenELEC-RPi2.arm-5.0.8.img of=/dev/sdd
or from Windows using Win32 Disk Imager. Then you need to insert the card into the Raspberry Pi, hook it up to your TV via the HDMI port and power it on.
OpenELEC boots up pretty quickly and will take you straight into Kodi. If you've used the media player (or its predecessor XMBC) before on the desktop, you shouldn't have any issues navigating it on the Pi. However, you will need to spend some time configuring the media centre to take advantage of this specialised environment.
Use your keyboard to scroll through the Kodi menu and head to System > OpenELEC. This section lists settings and configuration options related to the distro under five different categories.
From the System category, you can change the hostname of this OpenELEC installation. This is handy for distinguishing multiple instances, in case you have more than one system on your network – one in the living room, say, and another in the bedroom or kitchen.
Also, by default, OpenELEC is set up to inform you when a new update is available. However, you can toggle the Automatic Updates option and ask the distro to fetch the update without asking for your approval.
For a better HTPC experience, you can use OpenELEC with a Raspberry Pi-compatible Wi-Fi adaptor. Once you've connected the adaptor, head to System > OpenELEC > Network, and toggle the Active option under the Wireless Networks section.
Then switch to the Connections section and select your Wi-Fi network from the list that appears there. Now you'll need to click 'Connect' and enter the relevant authentication details to connect to your home Wi-Fi network.
There are also a whole host of settings available in Kodi, which are listed under Settings > System. Using these settings you can configure such things as audio output, calibrate the monitor, set up remote controls and set up Kodi's built-in PVR etc.
To watch TV on your Raspberry Pi HTPC, head to Settings > System > Live TV, and toggle the Enabled option. You will then be asked to enable one of the supported PVR add-ons. Select your PVR from the list and click the 'Configure' button to enter the relevant configuration details, such as the IP address of the PVR host.
When you're done, click the Enable button to activate it. Then head back to the System > Live TV section to set up other options, such as altering the behaviour of the onscreen display, the length of the recording and parental controls etc.
Once you've set it up, it's time to add content to your HTPC. You can configure a bunch of media sources in Kodi, from where it can pull content. These media sources can be local media on the card, removable USB drives plugged into the Pi and even various file shares on the local network.
To define a media source, enter any of the Videos, Music or Pictures entries on the screen, and click Add Sources. Use the dialog box that pops up to browse to a source that contains some media. Adding media on the card or plugged-in USB drives is pretty simple and straightforward.
But if you wish to pull in content from another computer on the local network, you have to define the network shares first. Kodi supports several file-sharing protocols, including all the popular ones such as Samba, NFS, AFP, FTP and more.
To view media on a shared Samba drive, head to System > OpenELEC > Services, and toggle the Enable Samba option.
If the source requires authentication, toggle the Use Samba Password Authentication option and enter the username and password. When you've added a source, you can tell Kodi about the type of content it houses. In return, Kodi allows you to choose a scraper – a special plugin that fetches metadata about a media file from the internet.
If you've set up multiple OpenELEC HTPCs on the same network, they can also share libraries between them, using the UPnP protocol. On the HTPC that houses the content you wish to share with the other HTPC, head to Settings > Services > UPnP and toggle the 'Share Video and Music Libraries Through UPnP' option.
Now jump over to the other HTPC where you wish to view the content, and add a source (as described earlier). When you browse for a media source, select the 'UPnP Devices' option from the list of sources, which then displays the other HTPC that houses the content.
Remote playback control
Your HTPC will now enable you to watch content either on locally connected drives or on any other computer or HTPC on the network, and even from your DVR. To further enhance the experience, you can enable the web interface to remotely control playback.
Kodi includes a web server which allows you to control the player via a web browser. To enable it, head to Settings > Services > Webserver and toggle the 'Allow Control of Kodi Via HTTP' option. You can optionally lock access behind a password.
Once enabled, fire up a web browser on any computer on the network and navigate to the IP address of the HTPC to control playback. Kodi also produces official remote control apps for Android and iOS devices, and, shockingly enough, you can find several third-party ones for the Windows Phone as well.
Before you can use them, head to Settings > Services > Remote Control, and toggle the 'Allow Program on Other Systems to Control Kodi' option. Now head to your device's app store and grab a remote control app. The official app is called Kore on the Google Play Store.
Optimise playback
Although the Raspberry Pi 2 packs quite a punch, there are some tweaks you can do in OpenELEC that result in smoother playback.
For starters, you can turn down the video playback resolution to 720p, especially if your HTPC isn't connected to a Full HDTV. Head to Settings > System > Video Output, and change the Resolution option to 720p.
Another trick is to replace the default skin, which was designed for desktop computers, to a lightweight skin, such as Aeon Nox, which makes navigating the menus snappier. To change the skin, head to Settings > Skins. Also make sure that hardware acceleration is turned on.
Go to System > Video > Acceleration and check that the Decoding Method is set to 'Hardware' and not 'Software'. While you're here, also reduce the GUI updates when playing video to 5fps.
Another playback-related tweak involves matching the refresh rate of the screen to the video being watched, which results in smoother playback. You can enable it by going to Settings > System > Video > Playback, then toggle the 'Adjust Display Refresh Rate' to 'Match Video'.
Another way to smooth out playback is to use audio passthrough for encoded audio, such as Dolby. To enable the option, navigate to Settings > System > Audio Output and toggle the 'Enable Passthrough' option. Finally, if you are on a slow internet connection, you can cut down on the bandwidth usage by heading to Settings > Video > Library and disabling the 'Download Actor Thumbnails' option.
Back up your video library
Seeing as you've spent a considerable amount of time setting up your HTPC, it would be a shame to lose it all because of a corrupted card. To prevent this happening, you can back up all your customisations and information about your library.
Kodi includes a backup utility, but we'll use an add-on that enables us to back up files to a custom location, including Dropbox. Head to Programs > Get More and install the Backup add-on. Once installed, launch it from under Program > Backup.
The program asks you to select one of two modes – 'Backup' or 'Restore'. When you select 'Backup', it throws an error because we haven't configured it yet.
Click 'OK' to bring up the Settings window. If you wish to back up to Dropbox, use the Remote Path Type pull-down menu to select the 'Dropbox' option, and enter the authentication details for your Dropbox account.
Otherwise, click 'Browse Remote Path' and select the location where you wish to store the backup files. Optionally, select the 'Compress Archive' option to reduce the size of the backed-up files.
Then switch over to the File Selection tab and customise the list of files you want to back up. Finally, switch over to the Scheduling tab and enable the scheduler to back up automatically, as per your defined schedule.
Once you've set it up, create an initial backup copy by launching the Backup program. This time when you hit the 'Backup' button, the program saves the marked files to the specified destination.
To restore the files, simply launch the program and click the 'Restore' button. The program shows you a list of all the backups inside the configured backup location.
1. Select a repository
You can extend virtually every aspect of your HTPC by adding a number of plugins and extensions. To do this, head to System > Settings > Add-ons > Get Add-ons. This displays a list of repositories (repos), including the official OpenELEC and Kodi repo.
Select the repo you wish to install from. There's also the All Add-ons option, which displays plugins from both these repos.
2. Select category
Once you've selected a repo, you're shown a list of add-on categories. The Kodi repo includes a lot more categories than the OpenELEC one.
The OpenELEC repo mostly includes drivers for various devices, while the Kodi repo includes well over a dozen categories. The Programs Add-ons category is particularly interesting and houses plugins that turn your HTPC into a seed box.
3. Select the add-on
When you select a category, you're shown a list of related add-ons. For example, if you select the Music Add-ons category, you're shown plugins for various online radio stations. Similarly, the Video Add-ons category houses plugins for popular video streaming websites, including YouTube, Vimeo and TED Talks.
When you find a plugin you wish to use, select it and click the 'Install' button.
4. Configure the add-on
You're returned to the list of plugins while Kodi downloads the one you selected. Kodi also installs and enables the plugin with the default options. Some plugins have optional configurable elements.
To view these, click the 'Configure' button associated with the plugin. The installed plugin is accessible from under its category, eg video plugins install under Video on the main page.
Source from: http://www.techradar.com/
0 comments :
Post a Comment