Define proper CurrentURIMetaData and HTTP

May 18, 2012 at 9:42 PM


I'm relatively new to upnp/dlna stuff and I have some general questions before going into detail:

Referring to this discussion:

I've been able to make my Samsung D7000 TV play a video in a very similar way.

I used a media controller application before. Debugging the application code I found the correct URI and CurrentURIMetaData parameters.

My media server is Serviio 0.6.2.

Then I tried to play the same video from a local http server (with the same CurrentURIMetaData) but I was not able to make it work.

Questions are:

1. Can it work with a simple http server or do I need a media server?

2. How to define a proper CurrentURIMetaData/DIDL-lite string? Is there a tool? Is there a standard number of fields to pass? Can I generate it by my own with MediaInfo for example?

My final goal is to create an application that plays a local video on a TV with minimum number of dependencies (i.e. you don't have to install http server or media server).

Thank a lot

May 18, 2012 at 11:05 PM
Edited May 18, 2012 at 11:07 PM

Hi Mbat,

This is a little out of my jurisdiction here because I havnt really dealt a lot with DLNA, only the UPnP protocol itself, however, I will try not to steer you in the wrong direction. From what I understand DLNA is a protocol that is built on top of UPnP, using UPnP as the connection and general communication protocol, so from what I also understand, DLNA works like this:

1) The UPnP Discovery protocols are used to search for compatible DLNA servers (as UPnP Servers - EndPoints)

2) The client detects the server (and possible the user selects the server) and uses UPnP calls to get the listing of "items" to play

3) The client sends a request to the server requesting the streaming URL for an item and other details with that item

4) The server sends back the HTTP URI to use for streaming (im not sure of the streaming protocol used, probably just HTTP i would say)

5) The client starts streaming from that URI and play the item


So, in answer to your question No 1.: A HTTP probably wont  do,  what makes a "media server" a media server will also be required, and those things include the ability to respond to all the UPnP requests (acting as UPnP device and service), and the ability to provide a URI which can be used to stream the data from, so if that is a "media server" then yes, you would need a media server, but you could design a cut down one maybe which only supplies a single file. Also the compatibility of your media server depends on whether or not it can transcode files on the fly to match the requirements of the client, this is where a lot of the incompatibilities come in with DLNA media servers.

As for question No 2., I dont really have any experience with generating the DIDL strings, you would need to check out the DLNA protocol specification to find out exactly how they are generated, I would dare say it should be on this site somewhere:

Unfortunately I know the UPnP protocol in quite a lot of detail from writing this library and from what I have learnt by reading the UPnP specifications in my not yet completed quest (I have been so busy lately unfortunately) to write my own UPnP server and clients from scratch, but, I dont have much knowledge about the DLNA protocol except for some of the UPnP calls.

But all the information you require should be able to be found at the link for DLNA-for-Industry i posted above.

As for your final goal, I think you are going to find out that the term "minimum number of dependencies" will not be as few as you are hoping, this is because different devices support different video formats, some have resolution dependencies, container dependencies, and codec dependencies, and the devices dont usually send much information about them (which is why a lot of the DLNA servers have a built in database of settings for each device). Couple this with the fact that your server will need to implement (from the bottom up) these protocols: HTTP, HTTP Streaming, UPnP, DLNA, along with the ability for the server to Transcode, and suddenly you realise why programs like Serviio, PS3 Media Server, and TwonkyMedia Server have to be so complicated and heavy.

Do let me know how you go but, I would love to see an end result! :D

May 19, 2012 at 1:39 PM

Thank you very much for long and detailed answer.

At this point it is clear that I have to understand DLNA itself better to know what kind of negotiation is need between server and render.

Then I will be able to determine the "minimum number of dependencies" :-)


thanks a lot again.