(Updated September 2007)
I’m going to take a brief departure from my normal Sharepoint ramblings and give a brief overview of a weekend project to put together a machine to serve audio, video, and pictures to UPNP Media Clients, such as the DSM-320/520, and the XBOX 360.
First, I’ll mention that there are indeed off-the-shelf NAS solutions that do this, such as the DNS-323. I’ve had pretty bad experience with these, and in my case i’m actually replacing my DNS-323 becuase I was just tired of the constant lock-ups/failures/etc.
I’ve definitely not completed this project yet, and have alot of scripts and some web-interfaces to build before everything works the way I’d like, but I’m going to go ahead and throw out the basics for anyone else thinking of setting a similar system up.
What it does:
- Serve Audio and Video to UPNP AV devices such as xbox, dsm-320, Roku, etc.
- A network file-server for your home
- A web-based torrent client
Other things you could add:
- Control your home lighting using X10 and a web interface
- Automatically rip DVD’s inserted into the box and put files on the network
- Be a WINS server for your network
- Many many more!
These parts were all picked to stick to the low price point while providing reasonable quality and performance. I’ve linked most of the parts to newegg or amazon, which seems to have a competitive price. You may find them cheaper elsewhere.
The shuttle SS21T is a nice low-cost barebones solution, with a reasonable form-factor. I wasn’t too worried about the looks, as the device will live in a closet, but this is a pretty nice looking case and is amazingly well prepared inside, with all cables tie-wrapped, labeled, etc.
This processor seems to have plenty of power to serve the media and even do some format transcoding on the fly, but if you want to spend a few extra dollars you can bump up to the dual core versions for alot more power. Keep in mind that the bigger the CPU you use, the more noise you’ll need to generate to keep it cool.
The deskstar is a great value, and fast enough to serve a few concurrent streams. In my case I also added in a raid 0 set from my retired DNS-323, which required an $18 sata card to add to the 2 onboard sata ports the shuttle already provides.
Kingston ValueRAM 1GB – $30
The only thing special about this ram is the price, but it’s hard to complain about 1GB of ram for $30. The stuff works fine, runs cool, and in most cases it’s not worth blowing extra cash on something more expensive for this sort of project.
The Shuttle can actually utilize 800mhz ram, and this ram is only 667mhz, so if you wanted to spend a bit more for higher-performance ram, go for it.
Lite-On CD-ROM– $19
A CD-Rom is definitely not a requirement. You’ll need some way to install Ubuntu, so it’s easiest if you can find an old cd-rom laying around, or steal one from another machine for use in the install atleast. Keep in mind that the shuttle has only 2 sata ports, so if you bought 2 hard drives make sure you get an IDE cd-rom. Also a usb cd-rom would work fine. Also, don’t worry about finding a black cd-rom, as it will be hidden behind the black ‘flap’ on the case.
Ubuntu Install Disk – Free!
Ubuntu can be downloaded in a 700mb cd image from the Ubuntu site, ordered (for free), or downloaded as a torrent (which is probably the quickest way). You want version 7.04 (or better) Standard or 64bit.
Everything should go together pretty easily. Cut the tie-wraps holding the cables to the case, and remove the front of the case, which snaps off. Take out the hard drive bay holder too.
Insert the CPU first, and get the fan mounted carefully. Then insert the Ram, hook up your CPU fan, and get the drives in. You can probably also pull out the floppy drive cable to clean things up inside.
If your looking for a silent and more reliable fan than AMD ships with the CPU, check out this Zalman fan, which is a fantastic, very quiet, fan.
Get everything put together, plug in the power, and see if the machine starts and your drives show up on the post screen.
So the plan is to boot into the Ubuntu Live CD, install Ubuntu, and then install our media server.
First, insert your ubuntu CD (or whatever other method you chose to install) and let the machine boot into Ubuntu. You should successfully enter into Ubuntu, although don’t be surprised if the graphics are a bit of a mess, as the Shuttle’s video chipset is not well supported. Hopefully your graphics look good enough to allow you to run the installer (the install icon should be on the desktop) and get Ubuntu setup.
I won’t go into detail on how you should configure your drives, you can decide for yourself what is best. There are software raid options if you want to read up on ‘MDADM’ which is available via apt (sudo apt-get install mdadm)
Get Ubuntu installed, it should be painless, plug in a lan cable, and reboot. (Don’t forget to remove the cd).
If your having icky-looking-video problems, try to open up a terminal window and reconfigure the x-server.
sudo dpkg-reconfigure xserver-xorg
Hopefully your booted into your Ubuntu install now. Ubuntu has probably given you a laundry list of updates it wants to run, if not, lets do them ourselves
sudo apt-get update (update the apt package sources lists)
sudo apt-get upgrade (upgrade all packages to the newest version)
You may opt to reboot once the upgrades finish.
Enough messing around now though, lets stream some media, we will use a package called Mediatomb. There is a nice debian package for this, so we just need to add a source to apt so we can install it easily.
We’ll need to add the following line to our /etc/apt/sources.list file.
<em><font color="#800040"><code>deb http://apt.mediatomb.cc/ feisty main</code></font></em>
Go to ‘System->Administration->Software Sources’
Under ‘Third-Party Software’ click Add, and add the line. You can also edit the sources.list file yourself (sudo nano /etc/apt/sources.list)
Now lets update apt again, to include the new source:
sudo apt-get update
and install MediaTomb:
sudo apt-get install mediatomb
Cool, we are almost ready to try to stream some media. Now is the time you might want to visit the administration menu in ubuntu, and use the shared-folders control panel to enable samba on your disk. That way you can copy some media files over from your windows machine. Don’t forget that after you enable samba, and your users are listed in the control panel there, you’ll still need to run this command on your user for a windows machine to authenticate.
sudo smbpasswd -a myusername (supply password when prompted)
Ok ok so you have some files on your drive, so lets stream them, assuming your plugged into the single ethernet port on the shuttle, we can use the simplest case mediatomb command to launch the server:
MediaTomb should start up, and leave you with a URL where you can browse to configure your server.
You can visit this site, and add files and folders you want mediatomb to share.
MediaTomb will let you do lots of customization on how files are represented to your UPNP devices.
Mediatomb should have added a file into your /etc/init.d directory to start automatically in the future on-boot.
That’s all for now! Later I’ll post with some of the scripts I use to manage my Media box while it sits in the closet!