From MythTV Official Wiki
Revision as of 02:04, 5 October 2006 by Kkuphal (talk | contribs) (Introduction)

Jump to: navigation, search

UPnP (Universal Plug and Play) media sharing is an extremely easy method of sharing your media (pictures/video/audio) on your network as it features automatic-discovery and does not require any configuration. As with most things which are very convenient, the security of any given implementation is an issue to which careful attention should be paid.

Universal Plug and Play (UPnP)


UPnP (short for "Universal Plug and Play") is a set of computer network protocols from the UPnP Forum. The goals of UPnP are to allow UPnP devices on a network to detect each other and connect seamlessly, and to simplify the implementation of networks in the home (data sharing, communications, and entertainment) and corporate environments. The UPnP architecture supports zero-configuration, which implies no need for manual configuration on the users end. There are typically three types of UPnP AV (Audio/Video) device control protocols (also called profiles); "UPnP AV MediaServer" which sole purpose is to share content, "UPnP AV MediaRenderer" which render content to exposes an interface to control the playback, and a "UPnP AV MediaServer ControlPoint" which can detect/find "UPnP AV MediaServer" and browse them to read media from them. A DMP (Digital Media Player) like typically only implements a UPnP AV MediaServer ControlPoint, to be able to play files from UPnP AV MediaServers. For a more detailed explaination please read the "Developers notes on UPnP" at the bottom of this page.

UPnP in MythTV

MythTV has version 0.20 a built-in UPnP-server (a so called "UPnP AV MediaServer" device), UPnP AV MediaServers is where you store and share your media (pictures/videos/audio/music) from. So you can share MythTV media files to any UPnP-client (a so called "UPnP AV MediaServer ControlPoint" device) on your local-network, as long as that UPnP-client is not behind a firewall or you have opened the ports for UPnP in your firewall. That UPnP-client can then play those media files if it supports those MythTV codecs/container formats.

Compatible UPnP AV MediaServer ControlPoints (UPnP-clients)

There are UPnP AV MediaServer ControlPoints (UPnP-clients) available for most operating-systems and many hardware-platforms. UPnP AV MediaServer ControlPoints can be either be categorized as software-based or hardware-based. Software-based UPnP-clients can be run on PC (personal-computer), mainly on Win32, Linux, BSD, Unix or Mac platform. Hardware-based UPnP-clients may run on a stand-alone (or any specific hardware) DMP (Digital Media Player), like for example a DVD-player with built-in network-controller to stream media files over the network. Currently, there are more software-based UPnP-clients than hardware-based ones, but chances are that will change in the future.

UPnP-client software:

  • SnapStream BTV/BeyondTV, a commercial Media Control/Renderer/Server and PVR for Windows.
  • Nero MediaHome (part of Nero Premium), a commercial Media Control/Renderer/Server for Windows, (also features nice on-the-fly transcoding funcationlity and media organizing).
  • Cyberlink PowerCinema, a commercial Media Control/Renderer/Server for Windows, (also features nice media organizing funcationlity).
  • Platinum UPnP SDK, a cross-platform dual license open source/commercial UPnP Media Control/Renderer/Server SDK for Windows, Linux, Mac. (This is what XBMC uses).
  • Intel UPnP AV Test Tools, UPnP Media Control/Renderer/Server SDK, not quite open source but free for non-comercial applications.
  • djmount, a free open source Linux client, which presents all MediaServers in a filesystem so that files can be played using any media player.

UPnP-client hardware:

  • D-Link DSM-520, MediaLounge Wireless HD Media Player.
  • Denon AVR-4306, 7.1 Home Theater MultiMedia A/V Receiver (music/audio only!), (stand-alone hardware player).
  • I-O DATA LinkPlayer2, A High Def capable DVD player, supports WMV and DivX as well as MPEG2 formats.

UPnP-clients softwares/hardware have not yet been tested with MythTV:

UPnP-clients server/hardware that are not (yet) compatible with MythTV:

  • Sonos Zone Player, Sonus Zone Player is a UPnP-client which can't play it's content on any non-sonos device (it uses some propritory protocol to stream audio).

Developers notes on UPnP

A v1.0 compliant UPnP AV MediaServer was implemented in MythTV CVS on the 6th of June 2006 by dblain, (for more specific MythTV code information see Changeset 10118). UPnP in MythTV is still a work in progress, there is a lot of work left to get a totally compliant implementation, and as there are so many aspects (and potential) to UPnP feel free to help out in adding new UPnP features, (or improve the existing functions, like make the UPnP AV MediaServer in MythTV UPnP AV v2.0 compliant by the new UPnP AV v2 specifications, see upnp.org). Note that once nice thing about the UPnP standards it is extendable by design, meaning each UPnP product can have value-added services layered on top of the basic device architecture by the individual manufacturers.

UPnP (Universal Plug and Play) is a set of royalty-free computer network protocols from the UPnP Forum. UPnP is built upon open, internet-based communication standards such as SSDP, HTTP, XML, SOAP, etc. (which means that any developer/programmer can make a device or software for any operating-system/platform in any programing-language by following the UPnP standards and it should automaticly be compatible with all other UPnP devices). UPnP achieves this by defining and publishing UPnP device control protocols (also called profiles). One profile called UPnP Gateway is what routers implements to let computers automatically discover them or even control them by opening/closing ports on a firewall for example. Another profile which is not to be confused with the previous one is UPnP AV (for audio/video) which defines a set of functionalities to share/control and render content on a local network. There are typically three types of devices in UPnP AV (Audio/Video); a MediaServer which is a 'slave' device which sole purpose is to share content, a MediaRenderer which is a 'slave' device that can render content, and a UPnP MediaServer ControlPoint which is the 'master' that can detect/find UPnP MediaServers and control them (browse). UPnP MediaServers ControlPoint is not an actual UPnP device as it cannot be detected by other UPnP devices. A UPnP MediaRenderer ControlPoint is the 'master' that can detect/find and control UPnP MediaRenderers. A DMP (Digital Media Player) only implements a UPnP MediaServer ControlPoint. The UPnP architecture supports zero-configuration, invisible networking and automatic discovery for a breadth of device categories from a wide range of vendors, whereby a device can dynamically join a network, obtain an IP address, announce its name, convey its capabilities upon request, and learn about the presence and capabilities of other devices. DHCP and DNS servers are optional and are only used if they are available on the network. A device can leave a network smoothly and automatically without leaving any unwanted state information behind.

MythTV current UPnP AV MediaServer implementation is based on the CyberMedia Gate for C++ reference code (that is in turn based on CyberLink for C++) which is licenced under BSD open source licence. If you are a C/C++ programmer and like to add a UPnP MediaServer ControlPoint / UPnP-client (or other UPnP features) to MythTV then you should also checkout an GPL licenced alternative; the Platinum UPnP SDK, available on SourceForge.net is a free and open source software development kit (under the GPL licence) that lets you easily create a UPnP MediaServer, MediaRenderer or Contol Point. You should also visit the official UPnP™ Forum, also, other good links for developers can be found at the bottom of the UPnP article on Wikipedia.

  • The UPnP AV (UPnP = Universal Plug and Play Protocol, and AV = Audio/Video) standard is a collection of connectivity and communication protocols, a few of which would suit MythTV:
    • UPnP MediaServer DCP - which is the UPnP-server (a 'slave' device) that share/stream media-data (like audio/video/picture/files) to UPnP-clients on the network).
    • UPnP MediaServer ControlPoint - which is the UPnP-client (a 'master' device) that can auto-detect UPnP-servers on the network to browse and stream media/data-files from them.
    • UPnP Remote User Interface (RUI) client/server - which sends/recieves control-commands beween the UPnP-client and UPnP-server over network, (like record, schedule, play, pause, stop, etc.).
    • UPnP MediaRenderer DCP - which is a 'slave' device that can render content.
    • UPnP RenderingControl DCP - control MediaRenderer settings; volume, brightness, RGB, sharpness...).

UPnP is the future of networked entertainment and are leading the way to an interconnected lifestyle. The UPnP™ Forum currently consists of over 800 members (which consists of vendors, industry leaders in consumer electronics, computing, home automation, home security, appliances, printing, photography, computer networking, and mobile products), including companies such as; Microsoft, Intel, AMD, Adobe, Belkin, Cisco, LinkSys, D-Link, 3com, Fujitsu, IBM, NEC, RealNetworks, ReplayTV, ...and many, many more huge coperations. Membership of the UPnP™ Forum free.

Much information about comatibility can be found on the Digital Living Network Alliance (DLNA) website. DLNA is a specification that allows the sharing of music, photo, and video files over the home network, between different consumer electronics and PC products.. The DLNA like the UPnP™ Forum made from consists of vendors, industry leaders in consumer electronics, etc. Their goal make sure different UPnP devices work together without problem, they feature a "DLNA CERTIFIED™" certificate for products that have passed their interoperability testing standards, that includes guidelines which should be followed when making a UPnP device. Membership of DLNA free.

PS! Feature request to any willing developers out there; "UPnP Remote User Interface Client (UPnP RUI)" support in both MythTV back-end and front-end, so that both the MythTV front-end and other UPnP-clients which also support the "UPnP Remote User Interface Server (UPnP RUI)" protocol could use it to fully control MythTV back-end using the same standard, such as HTPC applications like SnapStream BeyondTV (and possible MediaPortal in the future) and other PVR softwares/devices, (control functions and commands such as record, schedule, play, pay, stop, fast-forward, etc.)


Make sure you set the proper external IP in mythtv-setup, otherwise you will be able to see your server via UPnP, but the file location urls will contain the default IP address.

External Links

Wikipedia: Universal Plug and Play (UPnP) article