Making a smart TV with XBMC and a Raspberry Pi

Lead Image © Dietmar Hoepfl,

Media Master

For just a small amount of money, you can turn any television set into a multi-use, smart TV by adding a Raspberry Pi and XBMC. In this article, we will help you start out with the XBMC media center.

The Raspberry Pi can take on a wide range of tasks, but one of the favorite applications is using the Raspberry Pi as a media center.

Adding a Raspberry Pi to a plain old boring television set lets you play clips from YouTube and online media libraries, and you can even stream video to the TV from a data storage device or an external hard drive. Getting started on creating these capabilities is easy when you use distributions like Raspbmc [1] or OpenELEC [2] together with XBMC media center software, which is in the process of changing its name to the Kodi media player [3].

XBMC-based Rasp Pi distributions like Raspbmc and OpenELEC only install the media center system as it is. (See the box titled "Installing Raspbmc and OpenELEC.") The user is responsible for adapting XBMC after the first start, and tailoring XBMC to your own environment is often more difficult than it looks. This article offers some helpful tips on operating XBMC. (Also see the "Raspbmc or OpenELEC?" box.)

Raspbmc or OpenELEC?

Raspbmc and OpenELEC are both XBMC distributions for the Raspberry Pi. Raspbmc is based on Raspian and therefore the ARM branch of Debian. This Debian heritage makes it possible to install DEB packets intended for Raspian in Raspbmc. In contrast, OpenELEC uses its own build system, which, in turn, makes it easier to adapt OpenElec to the limited resources of the Rasp Pi. As a result, Raspbmc works better as a kind of all-round media center, whereas OpenELEC is a fairly static, if somewhat faster system.

Installing Raspbmc and OpenELEC

The installation process for Raspbmc and OpenELEC is the same as the process for other RaspPi Linux distros. All you will have to do is load the image file from the Internet and write it on a memory card that has at least 4GB storage space using the dd utility or Win32 Disk Imager for Windows. Both Raspbmc, and OpenELEC contain integrated update routines that regularly update the Linux media center. You won't have to worry about future manual updates.

Setting Up XBMC

After installing an XBMC-based distribution, start the system. XBMC works best when you connect a mouse and keyboard to the Raspberry Pi. A mouse and keyboard make it easier to do things like specify paths and access data.

At a later phase in the project, when the television set is able to transmit control commands from the TV remote control via CEC to the media center software, you won't need the keyboard and mouse. (See the box titled "CEC.")


Consumer Electronics Control, or CEC [4], is the official standard for control functions that allow the user to command and control more than one entertainment electronics device through just one control. Most of the newer television sets support CEC. Depending on the brand, CEC is known under various names. For example, Philips calls it EasyLink, LG refers to it as Simplink, Samsung has Anynet+, and Sony has Bravia Sync. What actually happens is that the television transmits a push of the button on the TV remote control via the HDMI cable to the Rasp Pi. The LibCEC software [5] then captures this input and forwards it to the media player.

Using either a mouse or the arrow keys on the keyboard, navigate from the main menu to the menu options: Pictures, Videos, Music, Programs, System. The Down arrow key takes you into the submenus, and the Up arrow key takes you back. You can return to the main menu at any time by pressing the Esc key. Once in the menus, navigate step by step backwards using the Backspace key. The C key takes you to the context menus, which you can open with a right mouse click.

Table 1 describes some important XBMC settings. You will find all these menu options under System | Settings. Note that the news ticker that sometimes appears in the main menu is not absolutely necessary and, in fact, slows down the menu build perceptibly. You can deactivate the ticker under System | Appearance | Skin | Show RSS News Feeds.

Table 1

Important XBMC Settings




Skin | Show RSS news feeds

The Newsticker with XBMC news slows the main menu down perceptibly.


Language, region, and character set settings. If you have set the language incorrectly in the set-up assistant, you can correct the problem here.


Library | Update library on startup

Tells XBMC to review all sources for changes and include new media in its database.

File lists | Extract thumbnails and video information

XBMC generates preview images from new videos when the database is updated. This process takes too much time on a Raspberry Pi.


UPnP | Share video and music libraries through UPnP

This option lets you stream apps like BubbleUPnP for Android and multimedia content directly from mobile devices to XBMC.

UPnP | Allow control of XBMC via UPnP

You will need to activate this option to control an XBMC Rasp Pi via UPnP.

Remote control | Allow programs on other systems to control XBMC

This function is absolutely necessary for classic XBMC remotes like Yatse for Android.


Video output | Resolution | 1280x720p

A lower resolution increases the build speed of the menus. The resolution for videos is not affected.

Video output | Video calibration

This function corrects alignment if the the Raspberry Pi image does not fit cleanly on the TV screen.

Input devices | Peripherals | CEC adapter

Televisions use CEC to transmit the input from the remote control to XBMC. This menu offers numerous options for optimizing the interaction.

Both XBMC distributions have a configuration tool. Raspbmc integrates the Raspbmc Settings into the Programs menu. The settings entry for OpenELEC appears in the System menu. Be sure to set up network access. The Raspbmc tool (Figure 1) offers the added option of connecting other hardware like external sound cards, webcams, and infrared receivers. The Raspbmc tool also makes it possible to install nightly builds.

Figure 1: Configure the network, or even increase the clock speed, in the Raspbmc settings.

Adding Media

The media center doesn't have much use unless it also has content. XBMC will not search for media files on its own, so you will need to let the program know where it should look for what. XBMC uses this information to fill a database that will have to be updated. By way of example, you can direct XBMC to look for films or TV series. But don't insert all of your media collection in one dump. Categorizing media into movies, TV series, images, and music is very important when building the database.

To categorize your files, follow the menus to Videos | Files | Add videos and, in the Add video source dialog, select the find option. A window will open, from which you can incorporate network filesystem access via Network file system (NFS) or Windows Network (SMB). You can also browse via UPnP Devices on UPnP and DLNA servers. The [Right Arrow] key followed by OK finishes the input. As a final step, the user has the option of naming the media source. For instance, you might choose movies on the Server or TV Shows on NAS.

XBMC displays the content of the media database with the filename. It can also load and display a DVD or CD cover, as well as a significant amount of information from the Internet, such as plots, actors, or IMDb chart rankings. If you want to take advantage of this feature, you need to tell XBMC what kind of content is on the newly created media source. You can select either Musicvideos, TV-Series, or movies under this folder contains. XBMC then loads a suitable scraper program that extracts desired information like the artist or cast, as well as additional images from the website.

Storage devices connected via USB automatically appear as separate entries under Videos | Files. You should select one with the arrow key on the keyboard and open the context menu Define content with the C key. You can open the menu with the mouse by right-clicking on the corresponding entry of the storage device. When there is more than one kind of media (e.g., music, TV series, movies, or images) saved on the device, you need to go further to the folder that contains just one type of media.

Repeat these steps for all of the media and memory locations. It will not matter that some media content is on a hard drive connected to the Rasp Pi and other content requires network access for a network server. XBMC incorporates all the content for one type of media into the corresponding category.

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content