Difference between revisions of "UPnP"

From MythTV Official Wiki
Jump to: navigation, search
(Added another incompatible client - Elgato eyeHome)
m (Chagned second instance of TCP 6544 to 6543)
 
(98 intermediate revisions by 53 users not shown)
Line 1: Line 1:
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''') media sharing is an extremely easy method of sharing 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.
  
 +
== Introduction==
 +
Universal Plug and Play is a set of computer network protocols from the [http://www.upnp.org 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.
  
=Universal Plug and Play (UPnP)=
+
The UPnP architecture supports zero-configuration, which implies no need for manual configuration on the user's end. There are typically three types of UPnP AV (Audio/Video) device control protocols (also called profiles); "UPnP AV MediaServer" whose sole purpose is to share content, "UPnP AV MediaRenderer" which renders content and exposes an interface to control the playback, and a "UPnP AV MediaServer ControlPoint" which can detect/find "UPnP AV MediaServers" and browse them to read media from them. A DMP (Digital Media Player) typically only implements a UPnP AV MediaServer ControlPoint, to be able to play files from UPnP AV MediaServers.
  
== Introduction==
+
For a more detailed explanation see [[Developers Notes on UPnP]].
UPnP (short for "Universal Plug and Play") is a set of computer network protocols from the [http://www.upnp.org 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==
 
==UPnP in MythTV==
MythTV [[Release_Notes_-_0.20|version 0.20]] has 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.
+
MythTV [[Release_Notes_-_0.20|versions starting from 0.20]] have a built-in UPnP server (a so called "UPnP AV MediaServer" device). UPnP servers are 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 the UPnP client is not behind a firewall or you have opened the ports for UPnP in your firewall (1900 UDP and 6543 TCP). The 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:'''
 
* [http://www.snapstream.com/products/beyondtv/ SnapStream BTV/BeyondTV], a commercial Media Control/Renderer/Server and PVR for Windows.
 
* [http://www.nero.com 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).
 
* [http://www.cyberlink.com/multi/products/main_12_ENU.html Cyberlink PowerCinema], a commercial Media Control/Renderer/Server for Windows, (also features nice media organizing funcationlity).
 
* [http://sourceforge.net/projects/platinum/ Platinum UPnP SDK], a cross-platform dual license open source/commercial UPnP Media Control/Renderer/Server SDK for Windows, Linux, Mac. (This is what [http://www.xboxmediacenter.com XBMC] uses).
 
* [http://www.intel.com/technology/upnp/ Intel UPnP AV Test Tools], UPnP Media Control/Renderer/Server SDK, not quite open source but free for non-comercial applications.
 
* [http://djmount.sourceforge.net/ djmount], a free open source Linux client, which presents all MediaServers in a filesystem so that files can be played using any media player.
 
* [http://geexbox.org GeeXboX], a free embedded Linux LiveCD-based Media Player distribution which can be used on an x86 or PowerPC hardware.  GeeXboX can also be installed to a disk drive, USB disk, or CF flash.
 
 
 
'''UPnP-client hardware:'''
 
* [http://www.dlink.com/products/?sec=0&pid=438 D-Link DSM-520], MediaLounge Wireless HD Media Player.
 
* [http://usa.denon.com/ProductDetails/2243.asp Denon AVR-4306], 7.1 Home Theater MultiMedia A/V Receiver (music/audio only!), (stand-alone hardware player).
 
* [http://www.iodata.com/usa/products/products.php?cat=HNP&ts=2&tsc=&sc=AVEL I-O DATA LinkPlayer2], A High Def capable DVD player, supports WMV and DivX as well as MPEG2 formats.
 
* [http://buffalotech.com/products/multimedia/linktheater-dvd/linktheater-wireless-g-high-definition-network-media-player-with-progressive-scan-dvd/ Buffalo PC-P3LWG/DVD] Buffalo LinkTheater High-Definition Wireless Media Player.
 
 
 
'''UPnP-clients softwares/hardware have not yet been tested with MythTV:'''
 
* [http://www.xboxmediacenter.com XBMC ('''XB'''ox '''M'''edia '''C'''enter)], a free open source software media player for Microsoft's Xbox game-console, has a [http://xboxmediacenter.com/wiki/index.php?title=UPnP_Sharing built in UPnP-client (from the Platinum UPnP C++ SDK)].
 
* [http://www.slimdevices.com/su_downloads.html Slimserver]: a non-tested free open source UPnP-client (and server) from Slim Devices for Windows, Linux and Mac OSX.
 
* [http://gmrender.nongnu.org/ GMediaRender], a free open source UNIX/Linux media renderer.
 
* [http://www.jrmediacenter.com/ JRiver Media Center], a commercial Media Control/Renderer/Server for Windows.
 
* [http://en.wikipedia.org/wiki/Musicmatch_Jukebox Musicmatch Jukebox], a commercial MediaServer UPnP MediaServer and music-player for Windows.
 
* [http://www.nero.com/ Nero ShowTime], a commercial Media Control/Renderer/Server for Windows.
 
* [http://www.videolan.org/vlc/ VLC media player], a free open source cross-platform media player that has a UPnP-client (via the CyberLink UPnP plugin).
 
* [http://en.wikipedia.org/wiki/ WinAmp], a free closed source media player for Windows, using the commercial [http://www.on2share.com/ On2Share] UPnP plugin.
 
* [http://en.wikipedia.org/wiki/Windows_Media_Player Microsoft Windows Media Player (WMP)], a free closed source media player for Windows, using the commercial [http://www.on2share.com/ On2Share UPnP plugin].
 
* [http://www.dlink.com/products/?sec=0&pid=318 D-Link DSM-320], MediaLounge Wireless Media Player, (stand-alone hardware player).
 
* [http://www.dlink.com/products/?sec=0&pid=387 D-Link DSM-320RD], MediaLounge Wireless Media Player with DVD and Card Reader, (stand-alone hardware player).
 
* [http://www.pinnaclesys.com/PublicSite/uk/Products/Consumer+Products/Digital+Media+Adapters/Digital+Media+Player/ShowCenter+200 Pinnacle Showcenter 200] A wireless HD-capable media player, with some UPnP capability.
 
 
 
'''UPnP-clients server/hardware that are not (yet) compatible with MythTV:'''
 
* [http://www.sonos.com 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).
 
* Elgato eyeHome hardware is not a UPnP client. It seems to use the iRDMI (ShoutCast?) protocol, plus other proprietry stuff (ports 1055-1059)
 
 
 
==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 [http://cvs.mythtv.org/trac/changeset/10118 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 [http://www.upnp.org 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 [http://www.cybergarage.org/net/cmgate/cc/overview/ CyberMedia Gate for C++] reference code (that is in turn based on [http://www.cybergarage.org/net/upnp/cc/overview/ 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 [http://sourceforge.net/projects/platinum 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 [http://www.upnp.org UPnP™ Forum], also, other good links for developers can be found at the bottom of the [http://en.wikipedia.org/wiki/Upnp 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 [http://www.upnp.org 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 [http://www.upnp.org UPnP™ Forum] free.
 
  
Much information about comatibility can be found on the [http://www.dlna.org 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 [http://www.upnp.org 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.
+
==UPnP Clients==
 +
UPnP AV MediaServer ControlPoints (UPnP clients) are available for most operating systems and many hardware platforms. UPnP clients can be categorized as either software-based or hardware-based. Software-based UPnP clients can be run on PCs (personal computers), 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). For example, a DVD player with a ethernet interface to stream media files over the network.
  
PS! Feature request to any willing developers out there; "[http://www.upnp.org/standardizeddcps/remoteui.asp 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 "[http://www.upnp.org/standardizeddcps/remoteui.asp 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.)
+
See [[UPnP Client Info]] for information on specific clients.
  
 
==Troubleshooting==
 
==Troubleshooting==
 +
* 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 127.0.0.1 IP address.
 +
* Make sure you have a value for <b>MusicLocation</b> and/or <b>VideoStartupDir</b> set for your backend hostname if your frontend and backend are on different machines.
 +
* Make sure you have a route for 224.0.0.0/4 out your lan nic BEFORE mythbackend starts ('''ip route add 224.0.0.0/4 eth0''').  It seems it won't work if you add the route later.
 +
: (I got a cryptic response to this.    '''  ip route add 224.0.0.0/4 via 192.168.0.1  ''' worked for me in SL7, 0.28-pre)
 +
: Modern Linux already has multicast setup correctly; check ''' ip maddr show ''' and ''' ip route ''' get ''' 239.255.255.250 '''.
 +
* Make sure your firewall is disabled or UDP port 1900 and TCP port 6543 are open.  Opening TCP port 111 (for RPC) sometimes helps DLNA client discovery of MythTV.
 +
* The Playstation 3 can take a while to find the backend. Searching can help, but the PS3 (f/w 2.17) isn't actually sending the packet everytime you search. You can tcpdump for udp packets to 239.255.255.250 to watch for it. `tcpdump ether host {ps3 mac addr}` also works well.
 +
* If your UPnP client does not see your videos, and you are using a Storage Group for video, you must configure the frontend settings on your backend machine to point to the storage group path for videos. Go to Utilities/Setup->Setup->Media Settings->Video Settings->General. Change "Directories that hold videos" to point to the same directory as your video Storage Group.  This only applies to 0.24 and previous.  0.25 has been rewritten to use neither settings, and instead pull content from the existing content list populated by MythVideo, rather than populate its own list.
  
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 127.0.0.1 IP address.
+
==See Also==
 +
*[[Developers Notes on UPnP]]
 +
*[[UPnP Client Info]]
  
 
==External Links==
 
==External Links==
[http://en.wikipedia.org/wiki/UPnP Wikipedia: Universal Plug and Play (UPnP) article]
+
* [http://www.upnp.org UPnP Forum]
 +
* [[wikipedia:Universal_Plug_and_Play|Wikipedia Universal Plug and Play article]]
  
Pictures of Myth on a Avel LinkPlayer2 as 12/12/06<br>
+
[[Category:Glossary]]
[http://www.flickr.com/photos/81546799@N00/320819966/ LinkPlayer2 Main Menu]<br>
 
[http://www.flickr.com/photos/81546799@N00/320819969/ LinkPlayer2 MythTV Menu]<br>
 
[http://www.flickr.com/photos/81546799@N00/320819974/ LinkPlayer2 Recordings Menu]<br>
 
[http://www.flickr.com/photos/81546799@N00/320819975/ LinkPlayer2 All Recordings Menu]<br>
 

Latest revision as of 22:49, 2 August 2020

Universal Plug and Play (UPnP) media sharing is an extremely easy method of sharing 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.

Introduction

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 user's end. There are typically three types of UPnP AV (Audio/Video) device control protocols (also called profiles); "UPnP AV MediaServer" whose sole purpose is to share content, "UPnP AV MediaRenderer" which renders content and exposes an interface to control the playback, and a "UPnP AV MediaServer ControlPoint" which can detect/find "UPnP AV MediaServers" and browse them to read media from them. A DMP (Digital Media Player) typically only implements a UPnP AV MediaServer ControlPoint, to be able to play files from UPnP AV MediaServers.

For a more detailed explanation see Developers Notes on UPnP.

UPnP in MythTV

MythTV versions starting from 0.20 have a built-in UPnP server (a so called "UPnP AV MediaServer" device). UPnP servers are 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 the UPnP client is not behind a firewall or you have opened the ports for UPnP in your firewall (1900 UDP and 6543 TCP). The UPnP client can then play those media files if it supports those MythTV codecs/container formats.

UPnP Clients

UPnP AV MediaServer ControlPoints (UPnP clients) are available for most operating systems and many hardware platforms. UPnP clients can be categorized as either software-based or hardware-based. Software-based UPnP clients can be run on PCs (personal computers), 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). For example, a DVD player with a ethernet interface to stream media files over the network.

See UPnP Client Info for information on specific clients.

Troubleshooting

  • 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 127.0.0.1 IP address.
  • Make sure you have a value for MusicLocation and/or VideoStartupDir set for your backend hostname if your frontend and backend are on different machines.
  • Make sure you have a route for 224.0.0.0/4 out your lan nic BEFORE mythbackend starts (ip route add 224.0.0.0/4 eth0). It seems it won't work if you add the route later.
(I got a cryptic response to this. ip route add 224.0.0.0/4 via 192.168.0.1 worked for me in SL7, 0.28-pre)
Modern Linux already has multicast setup correctly; check ip maddr show and ip route get 239.255.255.250 .
  • Make sure your firewall is disabled or UDP port 1900 and TCP port 6543 are open. Opening TCP port 111 (for RPC) sometimes helps DLNA client discovery of MythTV.
  • The Playstation 3 can take a while to find the backend. Searching can help, but the PS3 (f/w 2.17) isn't actually sending the packet everytime you search. You can tcpdump for udp packets to 239.255.255.250 to watch for it. `tcpdump ether host {ps3 mac addr}` also works well.
  • If your UPnP client does not see your videos, and you are using a Storage Group for video, you must configure the frontend settings on your backend machine to point to the storage group path for videos. Go to Utilities/Setup->Setup->Media Settings->Video Settings->General. Change "Directories that hold videos" to point to the same directory as your video Storage Group. This only applies to 0.24 and previous. 0.25 has been rewritten to use neither settings, and instead pull content from the existing content list populated by MythVideo, rather than populate its own list.

See Also

External Links