UPnP Media Servers

By | April 13, 2009

After doing quite a bit of research on media players in 2007, I convinced Jessica to get me a D-Link DSM-520 for Christmas that year. Since then, I’ve made most of our DVD collection and all of our music “on-demand”. Well, sort of.

Things still have a long way to go in the whole “digital entertainment” arena. The focus of this post, however is the Media Servers that serve the content. Being geeks, we’ve acquired several media players in the house over the years. This includes my now aborted MP3 Box project as well as off the shelf products. We have a Netgear MP101, a MacSense HomePod and the aforementioned D-Link MediaLounge DSM-520. They each have their strengths and weaknesses.

The idea behind them all was to have a central location that we store our content. That I’ve got covered without a problem. Shortly after getting the MediaLounge, I put together a file server to hold all of our media. This includes all of my MP3’s, Jessica’s MP3’s and a big chunk of our DVD collection. Its a Centos 5.2 box with the content exported via NFS and CIFS/Samba. Being geeks, Jessica and I each have a Linux machine and a windows machine that we each use. For me, I use the Music Player Daemon on my Linux (Fedora 10) box to play my music, Jessica uses Amarok on hers (Fedora 7). All of our music is stored on the file server. Neither of us use Windows to play music. We do use Windows to play videos, but not very often, thats what the MediaLounge is for. The file server provides everything in a consistent way to us on both our Windows and Linux machines.

So far, so good, right? Not really. Amarok and MPD both store their playlists differently, so we can’t share playlists. Not a big deal. Until, that is, we want to hear music in the dining room, the entertainment room, or our bedroom. I still haven’t figured out a good way to do that.

That brings us to the topic of this post, UPnP Media Servers. The idea behind them a UPnP Media Server is brilliantly simple: Given a collection of media, listen for connections on the network from Media Renderers and serve them the content. The implementation, however, leaves much to be desired.

I’ve experimented with about half a dozen different media servers. They each have their pros and cons. What I would like to see is something that will only expose audio files (MP3’s mainly with a few OGG files thrown in for good measure) to the Netgear and Homepod and expose video (mostly XViD) and audio files to the MediaLounge. The containers that they expose should be consistent with the file system hierarchy I’ve setup on the file server.

Part of the reason for the MediaLounge is for playing TV shows. For example, show’s like Las Vegas are really annoying to play on the DVD player because the disks are double sided. After watching a show, I have to go and flip the disk, wait for the DVD player to read, go through all the annoying notices, etc, etc,. Some of the DVD’s take nearly 10 minutes from the time you put in the disk to the time you can actually watch the content. On the file server I’ve got the directory structure laid out in a tree like so (for example):

/SharedMedia

  • Movies (non-series movies are here)
    • Star Trek
  • TV
    • Las Vegas
      • Season 1
      • Season 2
      • etc.
    • Mash
      • Season 01
      • etc.
  • Music
    • Jessica
      • Celtic Women
      • tATu
    • Marc
      • Nevermore
      • Soilwork

(No our musical tastes don’t really match, which is another reason that we’ve both wanted this type of setup.) Within these directories are the actual video files or audio files. This makes it very easy with the MediaLounge to find a movie or TV show and watch whatever season/episode that we want.

So here is the list of pro’s and cons for each of the Media Servers I’ve tried:

uShare

This is the one that I’m currently using. It is very basic, though.

Pros:

  • Reliable – it has never crashed.
  • Easy to configure. The entire configuration consists of about 10 options.
  • Follows my container/directory layout.
    • If I tell it to add “/SharedMedia/TV”, then it will present “TV” to the MediaLoung as a top level menu, complete with all of the subdirectories. This is probably the biggest reason I stick with uShare.
  • Fast. It keeps its entire directory structure in memory, so it doesn’t have to scan the disk when a renderer is asking for the content.

Cons:

  • A little too basic at times. There is no way that I have discovered to server an Internet Radio Station (i.e. Shoutcast/Icecast) to the MP101 or the DSM-520. I can stream from MPD to Icecast, but I can’t get uShare to serve the URL in a way that either of these devices will recognize.
  • Adding or removing media requires either a restart or a “killall -HUP ushare” to get it to rescan. This also means that any connections to the server will reset. Since I add and remove media from it via Windows or a different Linux machine, it would be nice if it could automatically see the changes and not require me to login to the file server to issue additional commands to get it to recognize the changes.
  • Playlists don’t seem to be able to be seen by the MP101. Perhaps that is because the file system is different from either of the media players, but perhaps a “playlist transcoder” would help. Again, we would be talking about extra scripts or more commands each time a change was made to a playlist. Now that would be a pain.

GMediaServer

I’ve probably got the capitalization wrong on that, but it doesn’t matter. If I remember correctly, uShare is a fork of GMeidaServer. GMediaServer is almost the same as uShare, but it is unmaintained. I wouldn’t even bother with it at the moment. It did have one pro over uShare, in that it has an MP101 mode that gives the Netgear its “Artist”, “Genre”, “Playlist”, etc menus. Nice, but not necessary. I’m not even going to bother with a pro/con list for GMediaServer since the project seems dead.

MediaTomb

This one I keep coming back to ever few months and after fiddling with it for a couple hours end up going back to uShare.

Pros:

  • Stable. This is another one I haven’t had crash.
  • Easy to add files to share via the web interface.
  • Transcoding. MediaTomb claims to be able to transcode media. This would be great if I had a bunch of ogg files that I wanted to play on the Netgear, it could theoretically transcode them to MP3 on the fly. I’ve not tried it though.

Cons:

  • It has its own container structure when serving files. What was once “TV” on the root menu of the MediaLounge is now buried 3 layers deep and it exposes “SharedMedia” as well. That means I have to drill down at least 4 levels before I even get to the “TV” or “Movies” directory. Supposedly this can be changed, but the default display configuration is about 2000 lines of Javascript code and not something I want to mess with. It tries to organize things in a reasonable manner, but it seems very “music-centric” with meta-containers for artist, album, etc, that don’t work well for video files.
  • Slow. It takes hours for it to scan the 10,000 or so files I’ve got shared. This is the meta-data scanning, but its still slow.
  • Couldn’t get it to serve an “Internet Radio” item for my icecast server.

FUPPES

I just discovered FUPPES on Saturday, which is partially what prompted me to write this article. I would describe FUPPES as somewhere between MediaTomb and uShare. It supposedly can transcode (though I didn’t test it) and have virtual containers that can be laid out in the way that I want. The default presentation of the containers is exactly what I wanted though.

I can’t use FUPPES at this point though. First, when I tried compiling it from the latest subversion code, I had to go in and fix a typo in one of the functions before it would even build. Second, I had to manually configure the configure script to support the taglib for meta-data in audio files. These first two things didn’t bode well for it. The killer was that it kept segfaulting and crashing every time I did a database update or refresh. That was the deal breaker. I can’t and won’t run something thats not stable. The last thing I want to do is be sitting and watching Blazing Saddles and have the server die for no reason, get up, restart the server and then try to get the MediaLounge to fast forward or jump to where I left off. The 15 minutes that would take would kind of ruin my enjoyment of the movie.

Pros:

  • Quite configurable. More configurable than uShare or GMediaStreamer and much easier to configure than MediaTomb, though perhaps not quite as tweakable as MediaTomb. Since I don’t want to spend 40 hours configuring MediaTomb, this is a big plus.
  • “Virtual” folders. A bit tricky to setup, and not very well documented, but pretty cool. With just a bit of massaging, you can set up a virtual folder layout that will list music by Artist, Genre, etc.
  • Per-device Virtual folders. This is what really drew me to FUPPES. This would, in theory, allow me to present only the audio files to the Netgear MP101 and Homepod while still presenting all media to the MediaLounge. To make this work, I would have had to give the MP101 a static IP address on the network, and then have FUPPES use that to identify it, but thats a minor thing and really speaks more to limitations in the MP101 than it does to FUPPES.
  • Quick. By quick, I mean in comparison to MediaTomb. uShare and GMediaStreamer don’t pull the meta-data in so they are very fast. FUPPES loaded the 10,000 or so files in just about 10 minutes, which isn’t bad. You only need to do this scan once, so the speed is kind of a moot point, though.
  • Automatically rescans directories for new content.

Cons:

  • Crashes whenever a database update or rescan is started. I did a bit of debugging and a couple gdb backtraces on it to see if it was one file that it didn’t like, but it wasn’t reproducible. It just crahsed. This was my deal breaker for FUPPES.
  • Lost directories for no apparent reason. In my Music directory, I have three sub-directories, marc, jessica and playlists. Playlists dropped and I had to remove and re-add Music to get it back. It crashed when I did this, too.
  • Building FUPPES is not for the feint of heart. I didn’t have any trouble with it, but not everyone is going to be able to figure out subversion and fix typos in source files. The authors would go a long way by getting it added to the RPM Forge repositories for Fedora and Centos, or even Fedora Extras.
  • Couldn’t get it to serve an “Internet Radio” item for my icecast server.

TVersity

TVersity gets more of an honorable mention here. Mostly because it actually meets all of my requirements, save one: Its Windows only. I’m not the type of person that will run a Windows server. Say what you will, but you’ll never convince me otherwise, Windows is not well suited for being a server. I can’t NFS mount from a Windows machine without all kinds of extra (buggy or expensive) software, I can’t SSH in to manage it remotely, etc, etc.

Pros:

  • Easy to setup. Very easy, its a Windows program with a wizard.
  • Was able to add an Internet Radio feed to my Icecast server and feed it successfully to the MP101. The way that worked was I had my Music Player Daemon set to stream to the Icecast daemon on the file server. I setup the URL in TVersity and added it as an Internet Radio feed. On the MP101 I selected that from the list and it worked. None of the others seem to be able to do that. I don’t know if its a mime-type setting or what, but I haven’t been able to figure out how to make any of the others do that.
  • The folder heirarchy was for the most part preserved.
  • Has the ability to transcode.
  • Can pull RSS and other video feeds from places like YouTube and stream them to the MediaLounge.
  • TVersity is the only free Windows server I came across that was quite complete and good.

Cons:

  • Windows only. This is a deal breaker for me.

There are a few others that I haven’t tried, but they’re all similar in function to uShare, GMediaServer, MediaTomb or FUPPES. Most of them aren’t as mature as these four are. There is a pretty extensive list on Wikipedia but most of them are tied to other projects such as MythTV (uShare) and are not designed to be generic enough for my needs.

I’ve got high hopes for FUPPES, but development there seems stalled, too. Surely there are more people out there with a setup similar to mine, who don’t want all of the “active content” and just want to serve their files to their devices simply and easily.

I’m still looking for a playlist solution, but that seems elusive too without resorting to writing another program or some other scripts.

My search continues…

3 thoughts on “UPnP Media Servers

  1. Pingback: Who Shall Control My Media? Part 4 – Backend Storage | Marc's Mind

Leave a Reply

Your email address will not be published. Required fields are marked *