UPnP Media Server 1.0 is a protocol that removes the effort from getting a media-streaming device to access and play your content. If your NAS box stores movies, music and photos, a UPnP server running on this NAS will enable a PlayStation 3 or any other UPnP compatible player to access any player-supported formats from your storage box without any further configuration. JPG images, DIVX movies and MP3 audio will all appear according to sorting options and arrangements, and will all play automatically. Which formats will work and which won't depends on the capabilities of your player device. A PlayStation won't play MKV movie files or Ogg Vorbis music files, for instance, but a good UPnP server should also be able to convert one format to another in real time. This is known as transcoding, and it enables a player to receive transcoded formats as devices access them. One of the best UPnP servers you can install and configure is MediaTomb. The latest major update, from early 2010, was a year late, but added dozens of new features. It transcodes, checks for new files automatically, streams YouTube, supports thumbnails and animated previews of movies, and accommodates even the most awkward of media players

More:
Tutorial: Build a transcoding UPnP media server