How To: Turn Your Linux Rig into a Streaming Media Center
These days, most people have at least one computer and a large collection of media files. The conventional practice for most people has always been to have redundant copies of their media collection on their various computers. While this system technically works, it is highly inefficient and creates the unnecessary task of keeping the media collection on each computer synchronized and up-to-date with the others. A far better solution is to keep all the media on one computer and stream it as needed to the other machines over the network.
Streaming technology has been around for over a decade and is something that most people are at least a little familiar with. (Youtube uses streaming flash-based video to work) In the past, playing large files over the internet was usually pointless due to the fact that the software of the time required the whole file to download (often on slow connections) before the media could be played. With streaming media, the remainder of a file is fetched as the first part it is being played, so there is no need to wait to get the whole thing before watching it. The video quality on early streaming media was often quite bad, (a trade-off between quality and speed was necessary when most people were stuck on dial-up) but with the near-ubiquitous availability of broadband in most urban and suburb areas today, high-quality streaming media has finally become practical.
We have assembled this guide to help you set up a cross-platform media streaming service using a Linux computer as a server. With our guide, you will be able to stream media to any other computer you own. Other guides on the subject discuss how to set up a Samba-based solution, but we feel that our solution is simpler and easier since you only have to install and configure one program instead of several. For this purpose, we use GNUMP3d. GNUMP3d is a program that makes media available through a web-based interface. Instead of using the Samba protocol, GNUMP3d uses ordinary HTTP to get the job done.

Preparation
This guide assumes that you have a Linux-based computer available and are ready to begin the installation process immediately. If this is not the case, you should set up a Linux-based environment to use. It doesn't really matter which distro you are using, but for the sake of simplicity, we are going to use Ubuntu in this demonstration since Ubuntu has a large following and the needed software is already in the repositories. If your distro does not have a pre-compiled package of GNUMP3d available, you will need to compile it yourself.
What you will need:
1. A web browser
2. Root or superuser access to the Linux system that is to be the media server
3. Access to the Ubuntu repositories through apt-get (or the GNUMP3d source code and any necessary compile tools)
4. One or more media players that can handle streaming media (Videolan, Amarok, and Totem with Gstreamer are recommended)
5. Some music and/or video files to test with
Installation and configuration
Installation of GNUMP3d is fairly simple and involves only a few steps. In this guide, we are going to assume that your movies and music are stored in your Linux home directory with the folder names Movies and Music, respectively.
1. Open a terminal. (run xterm or your favorite terminal application)
2. Run sudo apt-get install gnump3d if you are using Ubuntu 8.04 or earlier. If you are using 8.10, you have to install the package manually. If you are building from source, head on to the next step.
3. Provide your sudo or root password and let the package manager install GNUMP3d. If you are building from source, download the source tarball from the GNUMP3d website, untar, and compile it.
4. The installation process will create a folder called music in the system's var folder. Navigate to that folder by running cd /var/music
5. The time has come to populate the music folder with your media library. Although you could copy your movies and music folders to /var/music, there is a far better way. Linux has the ability to create symbolic links (symlinks) to other folders. The system is able to seamlessly follow these links. By creating symlinks to the Music and Movie folders in your home directory, you can leave your media library where it is and still make it available for streaming.
Since you did not personally create the /var/music folder, you are not able to copy files to it with your own user account. For this reason, you have to use sudo to make the links. Run sudo ln -s ~/Movies Movies and sudo ln -s ~/Music Music to make shortcuts to your music and movie folders. From that point on, anytime you add a file to your media collection, the file will automatically be made available for streaming.