There are a variety of problems with each different dlna/upnp media server option. It's simply a matter of choosing which compromise works best for you. On a workstation type system, where you're running Unity or GNOME, and logged in all the time, and want to run a media server as the user you're logged in as, I would highly recommend
rygel, as it works quite well, supports a wide variety of formats, uses standard infrastructure such as GStreamer and tracker, and can transcode on the fly. I have been using it for several years now.
However, it does require a DBus session bus, and X11 display, which presents a bit of a problem when running on a headless server system. I recently migrated all my Music and Video files over to my local server, which has a huge RAID setup, and runs Ubuntu Server 12.04 LTS, and is of course, headless. Unfortunately,
rygel wasn't usable there, so I had to find something else. I am running
minidlna as the media server there, and it is working quite well. It is maintained (there's a newer version in 13.04), but not without its own set of flaws. I would recommend it for a headless server, though. It's very simple to set up, and even runs as a system service, just like
dnsmasq. Just remember to make sure all the files and directories you're pointing it at, are readable by the
minidlna user, or everyone, before you start it. It doesn't take too long for it to scan the files, and it's very easy to blow away the database cache it creates, and restart the service, to force a rescan.