Improved UPnP serving and client - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+---- Forum: GSoC 2012 Development (/forumdisplay.php?fid=161)
+---- Thread: Improved UPnP serving and client (/showthread.php?tid=127949)
Improved UPnP serving and client - alcoheca - 2012-04-06 12:20
Improved UPnP serving and client
Summary: Despite it’s age, UPnP-AV is still the de facto standard for multimedia sharing in the home. Hundreds of products throughout millions of homes support UPnP to varying degrees. This propagation of devices represent a largely untapped potential to increase the relevancy of XBMC. Currently, XBMC operates both as a UPnP ‘media server’ and a ‘media renderer/control point’ (client), however it does not fully utilize the protocol to provide as rich as user experience as possible, and some third-party devices are incapable of streaming the content from XBMC altogether. The aim of this project is to extend the existing UPnP handling within the application, enhancing both the underlying code for the ease of future development, increasing the support for existing devices, while making great improvements to the end user’s perceptions as a whole.
How will I achieve this: As it stands, there is already an existing approach to accessing one or more libraries across multiple XBMC clients - sharing the actual SQL database - however this approach has its flaws and is not likely to become a supported feature. In terms of UPnP, there are a number of areas where the existing handling can be improved:
My approach will be to initially tackle the easiest changes - metadata, automatic discovery, library integration, before moving onto the major part of developing client <-> server communication via UPnP protocol extensions. Real-time transcoding of media files can be achieved through proper management of DLNA profiles, and the actual work would be performed by third party applications such as FFmpeg or lame.
Supporting access restrictions over UPnP require further changes to the profile handling of the application which may not be feasible in the timeframe. While I will not be working on developing a separate server application, it’s worth pointing out that the changes to the server side will be easily transferable in the future.
Benefits: Increasing numbers of XBMC users rightly expect the application to take full advantage of today’s multi-device environments. With the advent of low cost NAS devices, frontends such as the RaspberryPi, and more generally the gradual diversification of technology in the home, XBMC has the opportunity to reassert itself as the principle sustainable & open media-center of the future. Users benefit from a richer experience overall, as well as the increasing utilization of existing UPnP devices in their homes, while developers benefit from the adoption of a stable framework for server/client communications.
Goals: The main goal is to bring UPnP fully into the forefront of XBMC, making use of those features to reduce setup times, allow greater control over multiple players, provide a richer user experience and increase the flexibility of the platform overall.
What does it touch in XBMC: The majority of the client-side changes will take place in the file system and library layers. There will also be some modifications to the user interface in order to enumerate connected devices more easily. For the server-side changes, my attention will be focussed on maximising portability and interoperability with other servers. Even though it’s likely that eventually an distinct XBMC server application will exist, it’s important that backwards compatibility with standard UPnP devices is maintained.
Requirements: The changes will take place exclusively in the application itself, so all that is required is knowledge of C++ and the source tree. Having access to other UPnP supporting devices, I will be well positioned to test their functionality during the development process, something that is crucial to the success of this project.
How long have you been writing software for work/fun? I’ve been writing software for over 10 years. Initially I worked on web development, before shifting to C++ during my first year at University. Since then I’ve worked with other languages, notably Java & Perl.
What is your primary development language/environment? C/C++ via GNU/Linux.
Is this your first GSOC? No, I participated in the Summer of Code of ‘08.
Have you contributed to XBMC or other FLOSS projects? For my first GSoC, I worked on the beginnings of the PVR branch. During that summer I became accustomed with the XBMC source tree and was also allowed the opportunity to meet many new colleagues at the inaugural developers convention in Amsterdam. I was asked to join as a permanent team member in the autumn of 2008. I was also instrumental in refactoring the Add-ons system in 2009.
RE: Improved UPnP serving and client - RockerC - 2012-04-06 17:44
Add an FFmpeg based on-the-fly transcoder and remuxer to that and it is a super idea!
Transcoder would enable you to playback audio and video formats not supported on some devices, or on devices that do not support high definition videos, as well as have place shifting capability to access your home library over a slower internet / WAN link from a friends house or on your mobile devices over 3G / 4G
Remuxer would solve the PS3 / Xbox 360 issue with them playing H264 but not supporting MKV containers.
RE: Improved UPnP serving and client - alcoheca - 2012-06-07 18:27
Little update - I'm upgraded the Platinum library to the latest version, and have a much better understanding of the workings now(!). If anyone is brave and has a working UPnP setup in their house, feel free to compile the upgrade-platinum branch from my fork on github and let me know of any problems in this thread - NOT the bug system! There shouldn't be any new features, but reports of bugs that have been fixed would be gratefully appreciated. No binaries will be available, so if you can't compile you'll need to wait I'm afraid.
I'm now looking at improving the sorting of files returned by the server, and how best to handle the 'quirks' database - i.e. the mappings of specific behaviour to certain (naughty) devices. UPnP is highly extensible, so our support for it should be the same.
RE: Improved UPnP serving and client - RockerC - 2012-06-08 12:42
Plex (blasphemy here I know) have also added some great UPnP / DLNA extensions features to their media server these past months
Might still be a good idea to steel or borrow some media server ideas even if they won't let you just copy their server side code
Plex Media Server is also using Plutinosoft UPnP / DLNA library so maybe some code will tricle upstream but don't count on it
RE: Improved UPnP serving and client - jmarshall - 2012-06-09 02:41
The server is closed, so I doubt any code would trickle anywhere.
RE: Improved UPnP serving and client - edrikk - 2012-06-13 21:36
This is so incredibly great to see!
As it happens, I just posted a Trac ticket which aligns with what you're trying to do here!
Great job, as DLNA is quite useful, and when done correctly, rather functional. As others mentioned on this thread, even though the Plex implementation is in its infancy, it is quite possibly the best implementation I've seen in my usecases yet in terms of meta-data etc (I've used PS3 Media Server, Twonky, XBMC DLNA, Serviio, Plex, Fuppes, MediaTomb, so I speak from experience).
Looking forward to seeing this!
PS. Say what you will about others (e.g. Plex), but you have to give a nod when something is done right.
PPS. I apprecaite greatly the fact that XBMC mods/forum doesn't censor out 'competition' names, allowing for proper discussion. +1 for that!
RE: Improved UPnP serving and client - alcoheca - 2012-06-16 15:52
Sorry for slow reply, I'm not receiving notifications on updates to this thread - will remedy that asap..
I've been having a good look at the Plex server, from a user perspective of course. I can't play with the client as I don't have a Mac or a windows machine.
UPnP/DLNA *is* very useful, and has been underused by XBMC up untill now. Hopefully during this summer we'll see some major improvements..
@Edrikk thanks I'm monitoring the upnp related trac tickets and will get round to updating it
RE: Improved UPnP serving and client - avjui - 2012-06-23 11:16
I think a nice feature would be the syncron playback of the current played media a on a upnp client. I think i have read that upnp is able to do that.
RE: Improved UPnP serving and client - Robotica - 2012-06-29 14:02
Great project Alcoheca!
Can you tell if picture streaming over UPNP is also part of your plans? Unlike video and audio, pictures aren't stored in a database but they (and their metadata) are cached, which has recently changed drasticly.
As far as I know picture streaming over UPNP in XBMC Eden/Frodo is fixed but needs some work also. But the release notes of XBMC 9 (Camelot) said "Ability to view pictures over UPnP in XBMC, also loads of fixes to the UPnP library"
RE: Improved UPnP serving and client - kricker - 2012-07-09 20:36
Nice. I just got pointed to this thread by JoetheFox. I didn't know anyone was working on transcoding features for XBMC. I toyed around with Plex a couple months ago to see how they did it. I didn't get very far into it before I gave up and pitched it. I've been using AirVideo for years for streaming to my iPod and it works so well. I've not found anything quite as easy to setup and use as that. I used Serviio, Mezzmo and PS3 Media Server for a short while trying to stream video to my Sony TVs and iPod/Android devices. Each worked pretty well, but still nothing as well as Airvideo. I'm looking forward to see what you do with this. If you need testing on the Windows side of things, I'd be happy to help. I can compile on my own. I'd love to see a server that can run on my unRaid box (Slackware linux variation) where all my media resides.