Archive:UPnP/Media source: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Hussein
mNo edit summary
 
(122 intermediate revisions by 35 users not shown)
Line 1: Line 1:
UPnP 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.
Kodi can use UPnP as a media sources from any device that has a UPnP server. UPnP media servers are available for most operating systems and many hardware platforms. Kodi itself can be a UPnP server.


Currently, due to technical limitations (dynamic file paths) UPnP file sources can't be scanned into the local library. However, since many UPnP servers can provide metadata as well as the files themselves, then this may not be an issue.


== Setting up UPnP file sources in Kodi ==
UPnP file sources can be used in videos, music, and pictures. Configuring UPnP file sources in Kodi is as easy as setting up any other type of file source, such as SMB or NFS.


==UPnP introduction==
<b>Before you begin...</b> you need to enable UPnP support for your client. Go into Settings > Services > UPnP/DLNA and turn on the switch for "Enable UPnP Support". After that's done, follow the steps below to add each UPnP source.
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, without the need for manual configuration on the users end. For a more detailed explaination please read the "Developers notes on UPnP" at the bottom of this page. 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 XBMC typically only implements a UPnP AV MediaServer ControlPoint.


 
<gallery widths=500px heights=313px>
==UPnP in XBMC==
File:Share-upnp-library.jpg|'''Step 1:''' Go into ether Videos, Music, or Picture file views, depending on the content you want to add, and use the "Add" button to bring up this window.<br />'''Step 2:''' Then click on the "Browse" button on the right hand side.
XBMC has (since the 10 of July 2006) a built-in UPnP-client (a so called "UPnP AV MediaServer ControlPoint" device) which can auto-detect any UPnP-server (a so called "UPnP AV MediaServer" device) on your local-network, as long as that UPnP-server is not behind a firewall or you have opened the ports for UPnP in your firewall. You can very simply add one or more UPnP shares via the "'''Add Source'''" function with the context-menu (white-button on your controller) in XBMC under each of the the My Pictures/My Videos/My Music sections.
File:Share-upnp-library2.png|'''Step 3:''' This new window will pop up. Scroll down and select "UPnP Devices"
 
File:Share-upnp-library3.png|'''Step 4:''' All available UPnP servers on your network should show up here. If a source/server doesn't show up, it might be blocked by one of the other UPnP servers due to a misconfiguration. Select the source you wish to add.
 
File:Share-upnp-library4.png|'''Step 5:''' At this window please select the kind of content you want to add. In that case, we choose "Video Library".
==Compatible UPnP MediaServers (UPnP-servers)==
File:Share-upnp-library5.png|'''Step 6:''' This window will let you select if you would like to add "Files", "Movies", "Playlists" or "TV shows". Please choose what you want to add. In our case here, we select "Movies".
UPnP AV MediaServers is where you store and share your media (pictures/videos/audio/music) from, and there are UPnP MediaServers available for most operating-systems and many hardware-platforms. UPnP AV MediaServers can be either be categorized as software-based or hardware-based. Software-based MediaServer can be run on PC (personal-computer), mainly on Win32, Linux, BSD, Unix or Mac platform. And, hardware-based MediaServers may run on any [[NAS (Network Attached Storage)]] or any specific hardware for delivering media future, like for example a PVR (Personal Video Recorder). Currently, there are more software-based MediaServers than hardware-based, but chances are that will change in the future.  
File:Share-upnp-library6.png|'''Step 7:''' Now please select "Title". You can of course select something else according to what you want to add. It's easily possible to only add a specific genre via UPnP in that way for example.
 
File:Share-upnp-library7.png|'''Step 8:''' The next window looks a bit confusing. Don't worry if you don't see any files. That's normal. Please select "OK"
===UPnP MediaServer software===
File:Share-upnp-library8.png|'''Step 9:''' At this window you are able to give the source a specific name if you want (yellow square). If you choose to do so, select "OK" after you are done.
====Free UPnP MediaServers====
File:Share-upnp-library9.jpg|'''Step 10:''' Now, we're done and you will see the source added under the "Videos" location from the Kodi main menu. You should now be able to see the same video which are shown on the UPnP server.
* [http://www.microsoft.com/windows/windowsmedia/devices/wmconnect/default.aspx Windows Media Connect], Microsoft's free closed source UPnP MediaServer for Windows.
</gallery>
* [http://www.tversity.com TVersity], a free closed source UPnP AV Media Server for Windows, (also features nice on-the-fly transcoding funcationlity and can share internet audio/video contents too).
* [http://www.allegrosoft.com/ams.html Allegro Media Server (AMS)], a free closed source UPnP MediaServer for Windows and Macintosh, (can interface with the third-party application iTunes, and work as plugin to give iTunes a UPnP-server).
* [http://www.streamium.philips.com Philips Media Manager (Streamium)], a free closed source UPnP MediaServer for Windows and Macintosh.
* [http://ushare.geexbox.org GeeXboX ushare], a free open source UPnP MediaServer for Linux and [http://en.wikipedia.org/wiki/NSLU2 NSLU2].
* [http://www.nongnu.org/gmediaserver/ GMediaServer], a free open source UPnP MediaServer for Linux.
* [http://mediatomb.sf.net/ mediatomb], a free open source UPnP MediaServer for Linux.
* [http://www.cybergarage.org/net/index.html CyberMediaGate], a free open source UPnP MediaServer for Windows/Macintosh/Linux/UNIX, (reference implementation of UPnP MediaServer integrates into [http://www.mythtv.org MythTV] PVR for Linux)
* [http://resnet.uoregon.edu/~gurney_j/jmpc/pymeds.html PyMedS], a free open source Python UPnP MediaServer for Windows/Macintosh/Linux/UNIX.
* [http://www.cidero.com/radioServer.html Cidero Internet Radio Server], a free open source Java UPnP MediaServer for Windows/Macintosh/Linux/UNIX (Internet Radio Server only, SHOUTcast by default).
* [http://sourceforge.net/projects/platinum/ Platinum UPnP SDK], a dual license open source/commercial UPnP Media Control/Renderer/Server SDK for Windows, Linux, Mac. This is what XBMC uses.
 
====Commercial UPnP MediaServers====
* [http://www.twonkyvision.com TwonkyMedia], by TwonkyVision, a commercial UPnP Media Server for Windows and Linux, (can interface with the third-party applications iTunes, WinAmp, and Adobe Photoshop Album,, and work as plugin to give those applications UPnP-server function), it can even run as a background service on Windows.
* [http://www.on2share.com On2Share], a commercial UPnP MediaServer plugin for MCE (Microsoft XP Windows Media Center Edition).
* [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://www.musicmatch.com/ MusicMatch], a commercial MediaServer UPnP MediaServer (and music-player) for Windows, (also features nice media organizing funcationlity).
* [http://www.digital5.com Digital5 Media Server], a commercial UPnP MediaServer for Windows, (also features nice media organizing funcationlity).
* [http://elgato.com/index.php?file=products_eyeconnect Elgato AV Media Streaming Server], a commercial UPnP MediaServer plugin for EyeTV (Elgato PVR software for Macintosh), (also features nice media organizing funcationlity).
* [http://www.awox.com/ AwoX], provides a family of commercial UPnP products and solutions.
 
===UPnP MediaServer hardware===
* [http://en.wikipedia.org/wiki/NSLU2 NSLU2], a hacked/modded version running [http://ushare.geexbox.org/ ushare] (a free open source UPnP MediaServer for Linux), (connect USB 2.0 drives to the NSLU2 and share).
* [http://www.dlink.com/products/?pid=277 D-Link DSM-G600 wireless storage enclosure], (connect USB 2.0 drives to the NSLU2 and share).
* [http://www.maxtor.com/portal/site/Maxtor/menuitem.6adb6b8313633595062e6be791346068/?channelpath=/en_us/Products/Network%20Storage/Maxtor%20Shared%20Storage%20Family Maxtor Shared Storage Family].
* [http://www.dlink.com/products/?pid=277 D-Link DSM-602H 20GB Central Home Drive].
* [http://www.mediabolic.com/press/item.php?id=343 Buffalo Media Server].
* [http://www.infrant.com/products_ReadyNAS600.htm Infrant ReadyNAS X6/600], (features room for four internal IDE/ATA-drives, supports RAID-0/1/5)
 
===UPnP MediaServer software and hardware not compatible with XBMC===
* [http://www.sonos.com Sonos Zone Player], Sonus Zone Player is a UPnP MediaServer which can't play it's content on any non-sonos device, (it uses some propritory protocol to stream audio).
* [http://www.rhapsody.com Rhapsody], by [http://www.real.com/rhapsody RealNetworks], a commercial UPnP MediaServer for Win/Mac, (Rhapsody uses a proprietary encrypted secure connection).
* [http://www.slimdevices.com/su_downloads.html Slimserver]: a free open source MediaServer from Slim Devices for Windows, Linux and Mac OSX. Can see UPnP servers, but is not one itself.
 
==Installing and Configuring Windows Media Connect on your PC==
This step-by-step tutorial will walk you through the installation and setup of Windows Media Connect, a free UPnP MediaServer for Windows. In order to use this option, you need to have the following:
*An XBMC build newer than 10 July 2006
*Windows Media Connect from Microsoft, available [http://www.microsoft.com/windows/windowsmedia/devices/wmconnect/default.aspx here] or [http://www.softpedia.com/get/Internet/File-Sharing/Windows-Media-Connect.shtml here].
 
The first step is to download and install Windows Media Connect on your computer. This easy-to-use software allows you to share media (pictures, videos, music/audio) on your PC using the UPnP protocol, which is also supported by many stand-alone network players.
{|
|
After installing Windows Media Connect, simply run the included setup utility included with it. The first screen that appears should look something like the one to the right. For now, simply choose '''Next'''.
|
[[image:wmc1.jpg|300px]]
|}
{|
|
[[image:wmc2.jpg|300px]]
|
The next step is to choose which folders are going to be shared with XBMC. It offers you the option of using the default folders. In this case, we are going to choose which folders to share.<br><br>Also, be sure to select ''Automatically start folder sharing when Windows starts.''
|}
{|
|
Next, choose the folders that you would like to share, by selecting '''Add''' and choosing as many folders as you like. You can share entire drives or just individual folders. In this example, I have shared my Music folder.<br><br>After you are done, select '''Finish'''. You should now see a Windows Media Connect icon in your tray, indicating that the server is running.
|
[[image:wmc3.jpg|300px]]
|}
 
==Setting up UPnP Shares in XBMC==
Configuring UPnP Shares in XBMC is as easy as setting up any other type of share. In this example, we are going to add the Music folder shared above to My Music, although you can use the exact same procedure to add a share to My Videos or My Pictures.
{|
|
First, open My Music. Your screen should look something like the one displayed to the right, although your shares may be different.
|
[[image:wmc4.jpg|300px]]
|}
{|
|
[[image:wmc5.jpg|300px]]
|
Then, open the context menu by pressing the White button on your controller and select '''Add Source'''.
|}
{|
|
Then choose '''Browse''' and then '''Add Network Location'''. Choose Windows Media Connect as the Protocol and then Browse for the Server Address. Select the UPnP:// option and then you should see your computer's name. Select your computer and at this time, a help balloon should appear in the tray on your computer advising you that a new device has been connected.  
|
[[image:wmc6.jpg|300px]]
|}
{|
|
[[image:wmc7.jpg|300px]]
|
You should see Unknown Device appear, as is displayed to the left. Select the device and choose '''Allow'''.<br><br>Back on your Xbox, you may have to press back (the B button) and reselect your computer name in order to make the shares appear. Then, select the share that appears and name it. At this point, the share whould appear in My Music.
|}
 
 
==Developers notes on UPnP==
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 program-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) like XBMC typically only implements a UPnP MediaServer ControlPoint.
 
If you are a C/C++ programmer and like to make a UPnP MediaServer (or even add new UPnP features to XBMC) then we recommend you checkout the [http://sourceforge.net/projects/platinum Platinum UPnP SDK], available on SourceForge.net. Platinum UPnP SDK is a free and open source software development kit that lets you easily create a UPnP MediaServer, MediaRenderer or Contol Point, it also happens to be that it is from this SDK that XBMC got its UPnP-client code from, (XBMC's UPnP MediaServer Control Point was also firstly implemented into XBMC by the author of the Platinum UPnP SDK, [http://www.plutinosoft.com/blog/category/platinum/ Sylvain a.k.a. c0diq]). You should also visit the official [http://www.upnp.org UPnP™ Forum]. Other good links for developers can be found at the bottom of the [http://en.wikipedia.org/wiki/Upnp UPnP article on Wikipedia].
 
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 almost 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.
 
PS! Feature request to any willing developers out there; "[http://www.upnp.org/standardizeddcps/remoteui.asp UPnP Remote User Interface Client]" support in XBMC, so that XBMC could control UPnP MediaServers which also has a "[http://www.upnp.org/standardizeddcps/remoteui.asp UPnP Remote User Interface Server]" 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.)

Latest revision as of 07:29, 14 November 2020

Kodi can use UPnP as a media sources from any device that has a UPnP server. UPnP media servers are available for most operating systems and many hardware platforms. Kodi itself can be a UPnP server.

Currently, due to technical limitations (dynamic file paths) UPnP file sources can't be scanned into the local library. However, since many UPnP servers can provide metadata as well as the files themselves, then this may not be an issue.

Setting up UPnP file sources in Kodi

UPnP file sources can be used in videos, music, and pictures. Configuring UPnP file sources in Kodi is as easy as setting up any other type of file source, such as SMB or NFS.

Before you begin... you need to enable UPnP support for your client. Go into Settings > Services > UPnP/DLNA and turn on the switch for "Enable UPnP Support". After that's done, follow the steps below to add each UPnP source.