Quick start – media files and XBMC

Exclusive offer: get 50% off this eBook here
Instant XBMC [Instant]

Instant XBMC [Instant] — Save 50%

Build your very own entertainment system in XBMC with this quick and easy-to-follow guide with this book and ebook

$9.99    $5.00
by Charles McColm | August 2013 | Open Source

This article by Charles McColm, the author of Instant XBMC , covers the quick start of XMBC. XBMC can be set up to look up the metadata for movies, television shows, music videos, and music; but before lookups are possible, XBMC needs a way to recognize what to look up. For movies, music, and television shows XBMC uses the filename and date as a basis for the lookup. Music needs to be tagged properly with a tag editor for XBMC to be able to understand what to look up. You also need a way to get your media files from your computer to your XBMCbuntu system. We'll be sending files over a network using FileZilla, an FTP/SFTP program, and by using Samba (drag-and-drop) shares. Lastly, we'll add your copied data to your movie, TV show, or music library.

(For more resources related to this topic, see here.)

Step 1 – naming or tagging media correctly

Before you dive into adding your movies, television shows, and music, it's important to have properly formatted media. XBMC can automatically download (scrape) information about movies, television shows, and music videos, but it needs to have a consistent way of figuring out what the name of the movie or TV show is. Movies and television shows need to be named in a particular way and music needs to be tagged with a proper ID tag, in order for XBMC's scrapers to correctly identify each media.

Naming movies

Movies should be named with their name, followed by parenthesis containing the year when each movie was released. For example:

  • \Movies\The Odessa File (1974).mp4
  • \Movies\The Day of the Jackal (1973).mp4
  • \Movies\Shrek (2001).mp4

Naming TV shows

Television shows are normally kept in subfolders and each show is named with its name, the season, and the episode number. The format is Directory\Showname.s##.e##.file extension . For example:

  • \TV\Futurama\Futurama.s03e01.mp4
  • \TV\Futurama\Futurama.s03e02.mp4
  • \TV\Futurama\Futurama.s03e03.mp4

Tagging music

In order for XBMC to correctly scrape information about a song, the song needs a proper ID tag. ID tags are metadata about the song information, such as the artist, album title, song title, and song number. Programs like iTunes, Winamp, or EasyTAG (shown in the following screenshot) can be used to tag songs before they're uploaded/added to your XBMC library.

Step 2 – getting the files to your XBMC computer

If you've installed XBMC on a computer you use on a regular basis for ripping your music and video collection, you can skip to the Step 3 – adding files to your movie, TV show, or music library section. If you've installed XBMCbuntu to a separate computer, you need a way to get files from your desktop computer to your XBMCbuntu Media Center. Remember the computer name, username, and password you used during the XBMCbuntu installation? We're about to use that information. Because XBMCbuntu is based on Linux, there are several ways we can transfer files to our media server: NFS, Samba, SFTP, FTP, and a host of different services. For simplicity, we'll concentrate on SFTP and Samba.

Name resolution

You can see what IP address your XBMC media center is using by selecting System | System Info | Summary. Using your IP address you can send files to your XBMCbuntu via SFTP using a program like FileZilla or WS_FTP. But if you use DHCP, this gets a bit tedious when your IP address changes. Normally, you want to just use your XBMCbuntu computer name for SSH/ SFTP and file sharing activities. Setting up DNS is beyond the scope of this Instant guide, but there are a couple of things you can do to help with name resolution. Most routers have an option to assign a name to a system with a particular MAC address (which you can see on XBMC by navigating to System | System info and Network). In the following screenshot, I've added a static DHCP reservation for my XBMCbuntu machine called xbmc.  I found the MAC address by checking my router's Device list menu. If you're comfortable with the Linux command line, you can also obtain the MAC address of your network card by typing ifconfig (on Windows machines you can do the same at the command prompt by typing ipconfig). A router's menus and options vary depending on the router you use, but many have a section where you can assign DHCP reservations to a particular computer so it always gets the same address.

You can make Windows computers see your XBMCbuntu system with one simple modification to your XBMC system. Edit the file /etc/nsswitch.conf and on the line that begins with hosts, add the word wins.

Sending files via FileZilla

FileZilla is a cross-platform, multiprotocol client for sending and receiving files from servers. Other clients exist, but FileZilla is licensed under the GPL license and available for Windows, Linux, and Mac OS X. Download FileZilla from https://filezilla-project.org/ , or if you're using a Debian-based flavor of Linux, just type in the following command in the console:

sudo apt-get install filezilla

Once FileZilla is installed, navigate to File | Site Manager (or just click on the Site Manager icon, the first icon). Enter the hostname you gave your XBMCbuntu machine in the Host section. Select SFTP SSH File Transfer Protocol| from the Protocol section. Select Normal from Login Type. In the User field enter the username you used when setting up XBMCbuntu. In thePassword field enter the password. Click on Connect.

Once connected, local files default on the left-hand side of the screen and remote files on the right. Navigate to the files and folders you want on each side. To send a file, simply right-click the file and select Upload. You can upload multiple files using Ctrl and clicking on the filenames, and then right-clicking and selecting Upload.

Configuring and sending files via Samba

One of the reasons to use XBMCbuntu is that it sets up movies, music, TV shows, downloads, and system folders in your home directory and adds them to the Samba smb.conf configuration file. Samba is a suite of tools for interoperating with Windows systems. Samba is not a part of a normal Linux install, so if you're setting up XBMC manually under Linux, you'll need to install Samba, create a Samba password for your account, and set up each Samba share for movies, television shows, and music. This is one of the things that comes preconfigured on XBMCbuntu. XBMCbuntu saves you the steps of having to download Samba, create accounts, and configure shares. Linux understands Samba too; you can open a nautilus or nemo session, hold down Ctrl and press L, and type smb://yourservername/ to open a session. If you cannot see your XBMCbuntu Samba shares from your Windows system, make sure you've added WINS to the /etc/nsswitch.conf file; check to see that the NETBIOS name is the name you gave your XBMCbuntu system, and that the workgroups are the same on your Windows and XBMCbuntu machine.

To send a file to the XBMCbuntu system from a Windows 7 machine, perform the following steps:

  1. Click on the Libraries icon in the taskbar.
  2. Under the Network section of the window that opens, click on the NETBIOS name of your XBMCbuntu server and choose the folder you want to copy to.
  3. Drag files from where you have them stored to the XBMCbuntu network folder you just opened.

Depending on how much data you're copying, the process may take from a few seconds to several hours.

Step 3 – adding files to your movie, TV show, or music library

Once your music, movies and shows have been copied to your entertainment system, you need to tell XBMC what type of content you've added, and where to look for it.. XBMC's 10 foot interface makes adding content simple.

For pictures and music, perform the following steps:

  1. Click on either Pictures or Music from the main menu, and then click on Add Source.
  2. In the Add Pictures / Music Source dialog box, click on Browse to browse to the directory where you've stored your pictures or music. (You'll notice blue and red icons; blue icons are local sources, red icons are network sources). Once you've found the directory you stored your media in, click on OK.
  3. Next give the source a name. You can add as many sources as you want, so it's a good idea to name them differently to stay organized.

For television shows and movies, perform the following steps:

  1. Click on Videos from the main menu, click on Files from the submenu, and then click on Add Videos.
  2. In the Add Video Source dialog box, click on Browse to browse to the directory where you've stored your movies, television shows, or music videos, and then click onOK.
  3. Give the source a name. Again it's a good idea to give the source a name that reflects the content, movies on laptop share, for example.
  4. Next the Set content type dialog box appears showing three panels. Choose the type of video from the top-left dropdown. You can choose None, Music, Videos, TV shows, or Movies. As you choose the content type, the Choose a scraper panel on the right-hand side also changes. There is a default scraper for each video type, but you can also select Get more to get other scrapers for that type of content (sometimes desirable, if you're adding anime or content in another language). Select OK when you're done.

XBMC now attempts to add the content to its video library. If the content is correctly named, XBMC will add it to the library.

Summary

This article covered the quick start of media files and XBMC in a very systematics and stepwise mode. The media files that we used here were the movie files, TV shows and music libraries.

Resources for Article :


Further resources on this subject:


Instant XBMC [Instant] Build your very own entertainment system in XBMC with this quick and easy-to-follow guide with this book and ebook
Published: July 2013
eBook Price: $9.99
See more
Select your format and quantity:

About the Author :


Charles McColm

Charles McColm is the leader of a community-based computer refurbishing project. He got his start in computing, like many of his generation, on the Commodore 64. In 1983, Charles joined The Barrie User's Group, a Commodore computer club. Club members were open with their projects and code, something that would later inspire him to be a part of the free and open source movement.

Charles first started using Linux when his brother brought home a Slackware 96 CD. Initially, it was the large collection of communication software on the CD that attracted Charles' attention. Later, the free software philosophy and community were what influenced him the most.

Charles met Marcel Gagne, author of several Linux books, at the Kitchener Waterloo Linux User Group and later went on to review a couple of chapters of Marcel's Moving to Free Software before it went to press. Instant XBMC is Charles' first book.

Charles became interested in XBMC when he needed to find a better solution to the mass of CDs and DVDs spread throughout several rooms. His wife and son are much happier for it. They stream music and video to the TV connected server and use XBMC to entertain from time to time.

Books From Packt


Sony Vegas Pro 11 Beginner's Guide
Sony Vegas Pro 11 Beginner's Guide

LMMS: A Complete Guide to Dance Music Production
LMMS: A Complete Guide to Dance Music Production

Kinect in Motion – Audio and Visual Tracking by Example
Kinect in Motion – Audio and Visual Tracking by Example

Avid Media Composer 6.x Cookbook
Avid Media Composer 6.x Cookbook

Raspberry Pi Media Center
Raspberry Pi Media Center

Unity 3.x Game Development Essentials
Unity 3.x Game Development Essentials

Getting started with Audacity 1.3
Getting started with Audacity 1.3

Drupal Multimedia
Drupal Multimedia


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software