LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Articles > Jeremy's Magazine Articles
User Name
Password

Notices


By jeremy at 2007-09-07 15:39
Serve Media with MediaTomb
Linux Magazine

The "Tech Support" column is usually all about work: system administration, optimization, security, and so on. But it's summer, time to sit back, relax and have some fun - like building a Linux media center for your home.

One approach is a UPnP media server. The UPnP architecture offers pervasive and seamless peer-to-peer connectivity of intelligent appliances, wireless devices, and PCs of all form factors within a certain proximity. Based on TCP/IP and the Web, UPnP is media-, device-, and platform-independent, so any client can connect to any server. (More information is available at http://www.upnp.org/ .) This is a refreshing change, as many "media center"-like implementations leave Linux out in the cold.

Here, let's use Linux as the operating system and MediaTomb as the UPnP server. MediaTomb is open source and sports a Web-based user interface. It allows you to stream digital media through your home network and listen to or watch it on a variety of UPnP compatible devices. For example, a Nokia N800 with the Canola media player ( http://openbossa.indt.org/canola/ ) was used to test the configuration; many NAS devices, media devices, home A/V receivers, game consoles and more now support UPnP.

The easiest way to install MediaTomb is to use one of the provided binaries. Pre-built packages are available for Ubuntu (via apt), Fedora (via yum), FreeBSD, and OS X. If you aren’t running a supported distribution or simply prefer to compile your applications, the full source is also available. If you choose to compile the source, it’s the standard ./configure&& make&& sudo make install.

After the installation is complete, start mediatomb. The first launch creates a ~/.mediatomb directory and writes a default config.xml file. The configuration file controls all aspects of MediaTomb. (While the defaults will likely provide you with a usable system, the online documentation covers each option in depth and is worth a comprehensive read after installation.) Unfortunately, unlike some other UPnP servers, no web configuration utility is yet available for MediaTomb, so customization remains a manual process. (If you don't mind paying for a closed source server that is a little easier to setup, look into something like TwonkyMedia. Or, since MediaTomb is open source, consider adding a Web "control panel" and giving it back to the community.) Once you’re happy with your MediaTomb configuration, edit your init scripts to launch the server at boot time.

Now it's time to add your media to the MediaTomb database. You can add content via the software's Web interface, which is automatically started on port 49152, or you can add content via the command-line using the -a switch. Once loaded, you should be able to access all of your content, from movies, to music, on any certified UPnP client.

A nice feature of MediaTomb is its configurable content catalog. Using virtual containers and virtual items, you can control how your media is organized and displayed. You can separate content via type or genre, display pictures in different folders based on which digital camera you took them with, or create different views of your content based on some arbitrary aspect. If you're interested in extending your MediaTomb installation in this way, read the MediaTomb Scripting Documentation. This manual walks you through the concepts and provides a few clear examples.

Using MediaTomb and any UPnP compliant client, you can stream music, videos, and other media anywhere you’d like. Enjoy.


  



All times are GMT -5. The time now is 05:46 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration