Wednesday, August 5, 2009

DLNA Media Server for Smart Phones

Most of my recent blogs are focusing on what you could do with Mobile OSGi. Today I deliver a real practical example for OSGi - in my opinion a pretty exciting case. My colleague Gábor Pécsy has written a first prototype of a DLNA (Digital Living Network Alliance) Media Server that runs on OSGi on various mobile platforms such as Android and Windows Mobile.

For those who are less familiar with DLNA, let me give you a short intro. DLNA is an industry alliance that developed a number of specifications purposed to standardize the interplay of media devices. There are several types of media devices defined such as Digital Media Server, Digital Media Player, Digital Media Controller, etc. As you can imagine, a Media Server is a network instances that serves media content like pictures, videos or music. Likewise, Media Players are devices capable of playing back media content served from Media Servers. The nice thing about DLNA is that devices automatically find each other in the network without the user to be bothered with configuration issues, setting IP addresses, etc. It's a true hot plugging architecture (which is because DLNA is build over UPnP). If you have a Media Player, like a Sony Playstation 3, a Microsoft Xbox, DLNA enabled TV sets, etc. and put a media server to the network, the players will find the server without further doing.

What we did is implementing parts of the DLNA Digital Media Server specification that runs on mobile phones. The use case is that you generate content while you're on the go (i.e. taking pictures or videos) and play that content back on your bigger home screens like the TV or picture frame. Watch this video to get a live demo on how the Sony Playstation and a picture frame plays back your pictures from your phone:

The current version of the Media Server is entirely headless, that's why you don't see any UI on the phone. Future versions of this app will contain a UI on which you can set the server name, your content sharing policies, etc.

Let's zoom into technology. An interesting aspect about this solution is portability. The media server is implemented in Java and on OSGi, thus it is portable over all handsets that support OSGi. Moreover, it leverages the UPnP Service defined in the OSGi Compendium Specification giving it a clean a lean design. Here's a little diagram about the internals of the server:

The Media Server is both network and device agnostic and thus easily portable. It pulls media content though the Media Manager Service. This service we created to abstract media access. The Media Manager Implementation is platform specific. In case of Windows Mobile or Brew the MM Implementation fetches Media Content from the local file system. The target folders are configurable through the OSGi Configuration Admin API which makes this implementation portable. I.e. on Brew the target folders are different and all it takes to port the implementation is to reconfigure the folder strings. On Android another implementation is required that pulls media content through the respective Android APIs. Support for media content types can be plugged into the Media Server by means of meta-data plugins.

A key enabler for this solution is UPnP. The Media Server registers itself as a UPnP device and Service with the OSGi UPnP Service. The UPnP stack then broadcasts the availability of the media server into the Wifi network. Other UPnP enabled devices will pick up the broadcast messages and learn about the presence of the Media Server, it's physical network address and where to find the respective services. As demoed in the video, the Playstation contains this functionality, find the media server and is capable of playing back the picture content it offers.

The implementation is functional already but we will keep working on it. It'll get an end user UI and support for additional content types. Moreover, the UPnP implementation needs enhancements for better handling network drops (in the interest of battery savings smart phones tend to switch off their Wifi modules whenever they think it makes sense...). It should be ready by the time Sprint launches the first OSGi handsets...


BeDoig said...

Very cool. Is this capability currently available in Sprint's Titan platform, or do we have to wait for future implementations?

Jo Ritter said...

Sprint's Titan platform is prepared to host the media server. In fact, what you saw in the video ran on Sprint Titan. What we plan to do is to provide a package (a so called DP, DeploymentPackage) which contains the media server, the media manager and also the UPnP bundle, which currently is not baked into the Titan stack for Win Mobile.

BeDoig said...

Any idea on a time frame?

It's so great to see DLNA's promise of hassle free media sharing finally gaining some widespread acceptance.

Jo Ritter said...

The current plan is to have a more sophisticated Media Server available by October. FYI, Sprint will host a larger developer conference end of Oct on which various OSGi based applications will be demoed (check out if you're interested). By then the public will also get to know more about concrete OSGi based phones that they launch...

zgadgeter said...

This does sound very interesting. I was wondering if a beta or something is already available?

Jo Ritter said...

As soon as we're ready to provide a beta I'll post it here.

24mobile Handyshop mit Handyblog said...

Wow, interesting article. I will post some short article about dlna on Friday (in my German cellphone blog).
Most people don't even know what DLNA is all about... though it's a very nice technology!

Cell Phone Jammer said...

Gone are the days of carrying a heavy bag full of your laptop, still digital camera, HD video recorder, speakers, cell phone and tangled up cables to connect all the devices together. One of the newest phones on the market, the Samsung Acme i8910, puts all of these devices together into one, slim cell phone.

mtnwing - Living IVMTB strong said...

has a beta been posted for this demo of a DLNA server?

Jo Ritter said...

Sorry, beta not available yet. Meanwhile we have it running on Android and with additional consumer devices. Hoping to be able to provide a beta early Dec.

DreamKu said...

Would the beta released in early Dec support the Windows Mobile or Andorid only ?

Jo Ritter said...

We'll release a beta version on Android Market before Christmas, will place a comment here in blog once that is out. For Win Mobile it remains a demo for the time being - we have no concrete productization plans for it right now (might change if serious interest becomes visible).

DreamKu said...

May I have the chance to test your Windows Mobile demo version or not ? said...

Hey Jo,

I was very impressed by your YouTube presentation on OSGi. Not only was the platform impressive but I also think you articulate it very well. I just bought my wife a Droid cell phone and was wondering if your platform might be availabe for Droid users anytime soon. Also, if this works for cell phones, why not laptops and other devices? Keep up the good work! said...

Hey Jo,
After typing my comments, I noticed that you said that a beta version is available for Android. Does this mean that it could be used on the Droid? How could we get our hands on your platform? Is there any risk to the phone in using a beta version?

Jo Ritter said...

@TedTimmis: We wanted to ship the MediaServer app on the Android Market Place just before Christmas but ran into some last minute issues which prevented to launch. Hope to be able to make it available Mid Jan.

Appologies to all of you who are interested and waiting.

GPS Tracking Systems said...

I'd like to say it is just a little mistake from your side but you can continue the process from other online agencies too. One of among them is Think Tracking, a leading name in providing Vehicle tracking systems, GPS Tracking, Vehicle Tracking Devices, Vehicle Tracking UK.
You can go there & have system activated.

Jo Ritter said...

We just released the first public version of MediaServer for Android on the Android Market. Check it out.

Anonymous said...

hi Jo,

I have some query for mobile media streaming server

Mobile Media server -> Technical requirement - we are working on a smartphone project and we need to use a mobile - media streaming server for this which can adapt the capabilities of mobile device and can serve audio/video/images accordingly.

Required Mobile Platforms - All smartphones - iPhone, Android, Symbain, PalmPre and WM.

So basically we want the media server which can server content (type of content - audio/video/images) to any of above smartphones and be able to handle device capability based on request from that device(or through what ever logic media server can handle it.)

We know that streaming server can server video streaming on 3GPP (H.263 and H.264 etc.), RTSP, HTTP, MMS but can you please let us know if your product(mobile media streaming server) can serve below requirements/questions for our streaming content (video/audio/images)?
Q- 1> How many kind of video/audio serving protocol (like 3GPP) your product(streaming server) support and for which smartphones(from given list above) ?
Q - 2> Will your media server can provide configure to user so that they can handle/manage and can set rules to manage rendering of media content on different smart phones?
Q - 3> Above requirement can be handled by streaming server or we need to manage it customizely(by our own).
Q- 4> Is the functionality required above - by default provided by any mobile media streaming server?
Q-5> Will same streaming server can handle streaming for both video/audio for all smartphones?
Q-6> Is it possible to support common handling for all smartphones through a single mobile media server?

Please let us know your answers on above queries with respect to your media server software (mobile media server) - and based on that we can move further to implement this DLNA media server for smart phones as the primary media server for our smartphone media streaming project.

Any immediate help on this would be appreciated.


Team Lead ( .NET )

Jo Ritter said...

@Dipak: Thanks for your interest in MediaServer. I'm sure we can help you with your project. Let let us continue the dialog on email, please send me an email to Thanks.

Rakesh Gondaliya said...

I am new to the DLNA concept, i learned a week ago only. Now i am making application in which i need to port any one of DLNA api into my andoid platform, In short i need to port any one of DLNA api to my android device , so that i can go ahead making an application to develop plugin to shift media.

Any idea that could be helpful to me..

Jo Ritter said...


I haven't fully understood what you intend to do but am sure we can have an interesting chat. Pls contact me on j.ritter [at]