Monday, May 23, 2011

Installing XBMC Media Center for a Home Theater PC

Some of you may have blu-ray players, HDMI out, music, pictures, and videos on your computers that you would like to watch on your TV (or monitor). That's where XBMC comes in. It's a browser that is capable of displaying the weather, downloading a vast array of plugins and scripts (such as youtube and engadget videos), combining the contents of a group of folders (e.g. E:\Movies1, ~/Movies2/, and smb://networkcomputer/movies3/) that would be displayed alphabetically as a folder listed as Movies in within XBMC, an easy download subtitle script, and more.

XBMC is a very nice program for people interested in organizing their media. I've been using it for a few years now. I bought a $20 infrared remote off Newegg.com. This is not necessary - you can still use a physical or wireless keyboard and mouse but having a remote with a pause button on it adds to the experience.

Installing XBMC is currently very easy. We'll be using the unstable Team XBMC repository because as of writing this, there is no stable version released for Natty Narwhal (Linux Mint 11 is based on Ubuntu 11.04 and can use all of their repositories and their own as well.) If you'd like to check for a stable release before doing anything, you can just try typing xbmc in the Software Manager and see if anything comes up. If not, lets continue on with installing the unstable repository and XBMC Media Center. Open terminal and type the following (3) commands:

sudo add-apt-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get install xbmc

Once it is installed, close terminal and you will find XBMC installed at Menu -> Sound & Video -> XBMC Media Center.



This is the main screen and the default skin for XBMC. First, lets configure the ability to download subtitles at the touch of a finger from multiple services. Start by clicking on Programs -> Get More -> Subtitles -> XBMC Subtitles -> Install



Now you want to configure the subtitles. Pick your primary, secondary, and tertiary languages from the list. Set all 3 languages the same if you can only read one language:



Under Services, check Sublight.si and any extra subtitle services that may apply to you. In the advanced options section, you may want to check the option "Search next available service if no results are found" so that it will look through other subtitle services.

Hit OK and then escape a few times until you are back at the main XBMC Media Center screen. Now go to System -> Skin -> Add-On (Shortcuts) and scroll down to Video OSD at the bottom. Click on Subtitle Add-On.



This will bring up the next window that allows you to enable the XBMC Subtitles add-on by selecting it.



You will now have an on-screen display available to download subtitles if you would like from any movie or TV show that you would like. I will touch more on this again later.

While we're in the settings, let's set up the weather. Back out to the Settings menu and click on Weather.



The weather setup is pretty generous with how you can set it up. Click on the first location that you want to change and type an area code, a city/state, or a city/country combination and you should get a screen like the one below:



If you get multiple listings, select the appropriate one (e.g. you may have an airport listing as well) and then exit out of the weather one when you are satisfied with that. Go back to the main XBMC and check that the weather option works and is reporting correctly and looks like this:



If for some reason your regional settings for temperature are not correct, or you want to just change between Fahrenheit and Celsius all you need to do is go from the XBMC main menu to System -> Appearance -> International.



On this screen you will want to change your region, for example UK (24h) and UK (12h) will both give you Celsius while only changing the format of the clock from the USA regional format.

Next, for Android users there is a free application on the market called Official XBMC Remote that can be set up to control XBMC remotely (http or LAN). If you'd like you can go ahead and download the application on your phone while we configure the XBMC settings for the remote.

In XBMC go to Settings -> Network



These are the settings we want to change for the phone. We want to check "Allow control of XBMC via HTTP." You can leave the Port as 8080. Username can either stay as xbmc or be changed to something more secure. Password should also probably be changed to something more secure than being blank. You want to ensure that no one is able to just see your media that wanders by.

Now we need to find out the IP address of your computer. If you know what it is already (e.g. looking through your router) then you can skip this step. Otherwise, open terminal and type:

ifconfig

You'll see a long block of text, look for "inet addr:" followed by an ip address. Mine is 192.168.1.7 and that will be going into my phone in XBMC Remote. Now open up XBMC Remote. You should be greeted by a message that says:

No hosts detected

Click on "settings" or use the menu in order to add an XBMC host or IP address to your configuration."

So click settings, you'll be greeted by another error message asking you to press the menu key. Do so now, you'll now see an "Add Host" key. Tap that. Your setup should look similar the one below (things marked in red depend on you):

Name of this instance: HTPC
Host or IP address: 192.168.1.7
HTTP API port: 8080
Username: xbmc
Password: xbmcpassword
EventServer port:9777
WiFi only: checked
Access Point:
Mac Address: This should be filled in automatically when you type in your Host IP address
Socket read timeout in milliseconds: 5000
Wait after WOL in seconds: 40
WOL Port: 9

Now we can back out of the settings. But we still don't have any way to test the settings because we haven't added anything to the library yet. We'll get back to this one later too.

Before we get into adding actual movies or TV shows into XBMC, I want to cover how to add video Add-Ons. This is fairly straight forward and easy to do. from the main menu just select Videos -> Video Add-ons -> Get More...



This will give you access to a wide range of clips and videos from various networks including your playlists and favorites on YouTube once you have set your account up with the plugin.

Now to set up video libraries. We'll use TV shows for an example. First you want to click on Add Videos... click Browse and navigate to the first location of your TV shows. Now if you have multiple locations, click Add and then hit Browse again. If a hard drive doesn't show up, you may have to search for it in by selecting "Root filesystem" then going to "media." If all goes well, you should have something that looks like this:



Enter a name for the media source and hit OK. Mine will be TV Shows. Now this next part is optional, but you might want to choose a scraper that will go through all your TV shows, music, and movies and provide album covers, artwork, and posters.



There are three choices for scrapers: The TVDB for TV Shows, MTV for Music videos, and The MovieDB for movies. If you have a mix, you are able to add multiple scrapers.

Once you hit okay, you have the option of letting the scraper download information. It takes a little bit, but worth it. Once it is done downloading. click on the folder you just made, move your mouse to the left side of the screen to pull out the menu and if you'd like change the view to show more detail, or just icons.

Finally, let's say the scraper got the wrong show. It happens. Right click on the show, go to TV Show Information. Click "Refresh." Now select the show that corresponds to the original language and release date of the show that you want the actual poster for.

Now that we've got some files in our library, we can either select them with the keyboard and mouse or with the Android application that we downloaded earlier. In the bottom right corner of the XBMC application, click on the bubble that says something like "XBMC Pre-11.0 Git: Unknown" and it will give you a pop-up asking you which server you'd like to connect to. Select the HTPC one that we made earlier. Now to try watching a TV show. Select "Watch your TV Shows." If everything went well, you should see all of your album art on your phone now too. Select a show to try out and then hit play. Now, using your phone or the keyboard, if you would like to activate subtitles navigate to this button and click on it:



That will bring up a screen allowing you to pick from all the available subtitles for your language for that particular file. If you notice the file doesn't match the audio at all you can either go into the audio settings (two buttons to the right from the above picture) and adjust the delay of the subtitle file -or- download a new subtitle file if you noticed that you one got was too far broken to match at all (or completely wrong). The download screen will look like this though:



Once done downloading, the movie will resume playing and you are free to enjoy! This concludes the XBMC Media Center tutorial.

1 comment: