Thursday, December 17, 2009

What is DLNA?

by AJ Peck (aka usacomp2k3)

What is DLNA? Many of you have probably heard the term before, but never fully understood what it is. Well let me do my best to break it down and help to bring some clarification to the quagmire.

All of us suffer from the lack of interoperability between devices on our home networks. There are connections for the raw feeds for audio or video between say a Blu-Ray player and a TV, but what about between the PC and the TV? If you have a video on your Home Server and you want to play it on your TV, you pretty much have to use an intermediary device such as an xbox to get that content from the server, and play it back over the TV & surround sound.

Founded in 2003, the Digital Living Network Alliance formed to try and resolve this breakdown in communication by coming up with a standard that all media-related Consumer Electronic devices can support that will let them talk to each other in a consistent and logical manner. The DLNA specification is divided into 3 groups. Home Network Devices, Mobile Handheld Devices, and Home Infrastructure Devices. This last group is basically a bridge between mobile and Home Network. I am going to focus specifically on the Home Network Devices.

The Home Network Devices are then further split up into different classes.  The classes are (paraphrasing from the dlna website):

  • Digital Media Server (DMS) – These devices store content and make it available to other devices (ex: PC, WHS, NAS)
  • Digital Media Controller (DMC) – These devices find content on the DMS and play it on a DMR. (ex: PDA, tablet)
  • Digital Media Renderer (DMR) – These devices play the actual content from a DMC. (ex: TV, receiver, wireless speakers)
  • Digital Media Player (DMP) – These devices find content on the DMS and provide playback and rendering capabilities (ex: TV, Stereo, game console)
  • Digital Media Printer (DMPr) – These devices are printers that receive content from a DMP or DMC and print it out (ex: a laser jet or ink jet printer)

As you can see, the DMP is basically a DMC and a DMR rolled into one. The role of a DMP is how most current devices function, albeit not in a standard mannerism. A Roku box can pull content from your WHS and play it on your TV, just like the xbox can. However, they don’t go about this the same way at all. If both devices DLNA devices, they would be using the same protocol to play the media file.

One interesting thing to note is that any given device can function as a single class, or can act in multiple roles. For example, you could have a cable DVR box that function as a DMP, a DMR, or also as a DMS. That’s pretty interesting. Another interesting example could be your Zune HD. If it were to completely embrace DLNA functionality (it doesn’t right now), it could play back content as a DMP or a DMR, it could control playback on other devices as a DMC, or it could send content to other devices by acting as a DMS.

All of this communication happens over IP. This means that you don’t need dedicated connections between the devices; as long as they have a network connection, they can talk to each other. Also, because it is IP based, the system doesn’t care whether you are on wired or wireless (other than bandwidth, which we will get to later), or even Bluetooth.

So great, I buy a DLNA certified (oh yeah, I haven’t yet mentioned that for devices to have the DLNA logo, they have to go through a certification process) DMP, does that mean that I will be able to play my mp4 video’s on it? Maybe. If we look at the DLNA supported formats, there are 3 classification of media. Basically pictures, audio, and video. Each device that is a DMP/DMR also has to support at least 1 of these subclasses. For each subclass that it supports, it then has to support the required formats for that subclass. This would be JPEG for pictures, LPCM (think of raw audio, like a .wav file) for audio, and MPEG2 for video. However, the devices can also support other optional formats. There are 11 optional formats that are recognized by DLNA these are: GIF, TIFF, & PNG for pictures; MP3, WMA9, AC-3, AAC, & ATRACT3plus for audio; and MPEG1, MPEG4, & WMV9 for video. To give an example, you can have a wireless picture frame that is a DMP supporting the pictures subclass. It would then have to be able to display JPEG’s stored on a DMS, but if it is capable, it might be able to display TIFF’s or GIF pictures as well.

Now the clever reader will be wondering more specifically about those formats. MPEG4 is awfully vague, as there are a multitude of different types of MPEG4 video and audio formats within that container. DLNA achieves this by specifying what they call Format Profiles”. From what I understand these primarily apply to video. Below is a chart of the formats that the Moxi Mate supports. It supports WMV, MPEG_PS & MPEG_TS (more info) as the video types and specificies both HD & SD versions of the TS stream in both European and North American standards. In the PS stream, it supports NTSC & PAL.

MoxiMate

So how does a DMC know what formats the DMS can send out or what formats the DMR can render? This gets into the slightly more technical, but for those that care, it is pretty impressive. Most readers have heard of UPnP, Universal Plug and Play. When the thinkers behind DLNA were coming up with the idea, they wanted to extend UPnP to include this media control and playback. However, for various reasons they weren’t able to. So they instead came up with a separate protocol that we know as DLNA. However, these aren’t complete strangers, they are more like cousins. The process by which DLNA devices get to know each other is very similar to the Simple Service Discovery Protocol built into UPNP. Basically, when you turn a device on, it broadcasts to the network “Hey, does anyone speak DLNA” and so any DLNA devices already on the network respond. Each device will then coordinate with each other and say what class of device they are and what formats they support, etc. That way, for example, each DMC will know what the DMS’ are on the network and so when it is asked by a user to start playing some media, it will go straight to the media that is hosted by the DMS and list those as available to the user.

The other important aspect that DLNA allows for defines the control aspects of a device. The DLNA specification states that the UPnP Audio/Video technology is the solution for media management and control. These break down into 4 different services that a DMS and a DMR can host (UPnP Lingo calls certain devices MediaServers and Media renderers, but these don’t necessarily correspond 1:1 with DLNA DMS’ & DMR’s): Content Directory Services (which lists what content is available to be played), Connection Manager Service (which determines how the content is actually transferred), AV Transport Service (which is the control aspect such as play/pause/stop/etc), & Rendering Control Service (which affects how the content is played such as volume/brightness/etc). For the control, if you look at the certificate for the HP MediaSmart Connect, it says that the device supports Play, Stop, & Pause for video and audio. These would be on the AV Transport Service side of things.

Many readers have probably already run into DLNA, whether they know it or not. Windows 7 includes what is called “play-to” which allows the PC to push content to a DMP. If you push  media to another device, Windows 7 will automatically will serve as a DMC for controlling the playback of that content (if the DMR allows it). If the media you are playing is stored on that PC, it will server as a DMS; if the media is stored on another PC that can serve as a DMS (whether it be another Win7 PC or a WHS with DMS software), it will send the content from there; if the other machine can’t, then the Win7 machine will function as both the DMC & DMS. For more information, see the link at the end for the article on the Engineering Windows 7 blog. One cool thing to point out is that even though the xbox isn’t a validated DLNA device, if you are using it in extender mode, it will show up and function as both a DMR & a DMP.

There are a couple other items I wanted to mention. The first being DRM. Can you have a protected file that is stored on the DMS and play it back on the DMR? Right now, this is still a little bit of a work-in progress. The DLNA spec talks a little about DRM. Basically, if DRM content is to be shared, the device has to support DTCP (which is the technology used for content protection over firewire). However, the device can additionally support MDRM-ND, which is a Windows Media DRM solution for network playback. The interesting thing here is that the DMS has to support the DRM spec, but on the other end, it is the DMC or DMP that does the decrypting, not the DMR. Either way, I don’t believe there is a functioning example of this connection yet, but I’m sure those will come soon (Zune Pass, please).

So what if you have an audio file on your DMS, say a .wma file, that you want to play on a DMP that does not support the playback of .wma files? One of the additional functionality of a DMS is the (optional) ability to transcode. Transcoding is basically taking a media file in one format and converting it to another format. This can be done one file at a time, in batches, or on-the-fly. TVersity, for example, is a DLNA DMS that has the ability to transcode.

As I understand it, a DMS has a specific list of format profiles that it can see, and a separate list of the format profiles it can output. The DMS tells the DMP it has all of the files that the DMS can see, regardless of whether that specific file is one that the DMS can output. The DMS will then look at the format profiles the DMP says it supports, and, if needed, will automatically trasncode the file to an output format the the DMP supports. For example, if the DMP doesn’t support .wma files, the DMS can automatically, on-the-fly, transcode the .wma file to an LPCM file that the DMP is sure to be able to support. The same can be done with video. If the DMP doesn’t support mpeg4, the DMS can convert an mpeg4 video to mpeg2 so that the DMP can play it. Some DMS software is smart enough to convert the media file to the closest available format (for example an AVC-HD to a mpeg4) which would minimize any loss of quality, instead of just converting all video the mandatorily supported MPEG2, audio to LPCM, and pictures to JPEG. The DMS can be configured to change some settings on the transcoding too, for example to only transcode to 640x480 for an SD source or low-powered DMS, while transcoding to 1920x1080 for an HD-capable DMP on a beefy DMS. (Transcoding can be hardware-accelerated by a SHED device, but I believe only Windows7 support that at this point, and anything beyond generalities are impossible to find).

So how does this relate to WHS? Well all that have read this far, will surely see how a Windows Home Server could function as a perfect DMS. It is always-on, network accessible, and is probably storing the media that you’d want to be playing anyway. It is a match made it heaven. There are numerous DMS software available for PC’s, and some can be directly integrated into WHS (Twonky comes to mind). I’m looking to do a follow-up article with some practical applications to this whole DLNA adventure, and test a myriad of supported DMS software solutions on my WHS.

So the last question is: who all is involved in this little operation? What companies have pledged to bring products to market or upgrade existing products to work with this specification? Let me throw some names out there and let me know if you have heard of them: Broadcom, Cisco, Comcast, DirecTV, HP, Intel, LG, Microsoft, Motorola, Nokia, Panasonic, Philips, Pioneer, Samsung, Sharp, Sony, & Toshiba. Those are some pretty big names that are on board with this. The future really is bright for this technology and it can only get more excited with what time will bring to us.

 

 

More reading/listening: