Tuesday 26 June 2012

Using XML to Control LCD Output in XBMC

About XBMC

XML can be used to control LCD display options within the open source media player XBMC (initially known as Xbox Media Center), which was originally used within Xbox gaming consoles. XBMC is now available as a general media player on many different types of device, including both TVs and computers, and can be run on most of the major operating systems.

XBMC can be used to watch TV on computer, as well as listen to the radio and view Electronic Program Guides (EPGs). Aside from the main version of XBMC, there are also many derivative programs including Boxee, iConsole, MediaPortal, Voddler and Plex.

Controlling LCD Output

Using XML to control the LCD output within an XBMC system requires editing a file named "LCD.xml" to reflect the settings you want enforced. Once you have the file located, editing it is not typically difficult, but you do need to work out what settings you want. The easiest way to find what XML LCD settings are possible is to refer to the list in the official XBMC Wiki Manual.

Find the LCD XML file

Locate the LCD XML file for your XBMC installation. The file should be located within your "UserData" folder. Where the "UserData" folder is depends on which operating system you are using.

If you're using Windows XP, look in "Documents and Settings," your username, "Application Data," "XBMC." For Windows 7 and Vista, look in "Users," your username, "AppData," "Roaming," "XBMC."

If you're using a Mac, look in "Users," your username, "Library," "Application Support," "XBMC," "userdata."

If you're using Linux, look in your home folder, ".xbmc," "userdata." If you can't find the file, try searching your entire system for "LCD.xml" or "lcd.xml."

Have a look around

Open the file and look at the contents in a text editor. If you are unfamiliar with the XML format you may need to acquaint yourself with the syntax. It helps if you have a text editor that can highlight XML code (such as Notepad++ or Gedit) or even an XML viewer, many of which are free to download.

XML files use a tree structure, with tags enclosing sections of data as in this example:


33
Jim


Don't worry if you are not accustomed to reading code, XML is an easy markup language to work with. Save a copy of your LCD XML file somewhere else on your computer before making any changes to it.

Find what you're looking for

Find the part of your LCD XML file containing the section you want to change. There are five main sections you can make changes to: Navigation, Music, Video, General and Xbelaunch (for displaying game and application labels). Locate the section relevant to the display property you want to change, for example the display during music playback, which is surrounded by "<music>" tags, and contains "<line>" elements.

Make Adjustments

Make adjustments to the appropriate function sections of your LCD XML file according to what settings you want the display to reflect. To do this, you need to include "InfoLabel" variables, examples of which you should see within your existing file. These labels will cause the LCD display to output certain types of information about whatever media is playing. For example, you can display the title of the current song using the following syntax within the "<music>" section:

$INFO[MusicPlayer.Title]

Browse through the list of available labels on the XBMC Online Manual and choose from these to suit your display preferences.

Additional options

Choose special labels to suit your preferred display options. As well as choosing from the standard list, you can choose additional settings such as turning the LCD display off when playback of music is ongoing:

music

Additionally, there are labels specific to the LCD output for various settings, such as displaying a progress bar for the media item that is currently playing:

LCD.ProgressBar

Notes

  • In some cases you may need to rename the LCD XML file to "lcd.xml" changing from upper to lower case for your changes to take effect.
  • Changing the LCD XML settings is really only for advanced users, so be careful and make sure you keep a copy of the file in its original state.

Links

1 comment:

  1. But how do I connect the LCD to PC? Just plug-in the LCD module on USB or COM port?

    ReplyDelete