UPnP / DLNA Media Server for MediaPortal 2 (5 Viewers)

ianc

MP Donator
  • Premium Supporter
  • December 29, 2007
    132
    1
    wicklow
    Home Country
    Ireland Ireland
    Re: Plugin: UPnP / DLNA Media Server

    Hey - this is exactly what I'm looking for (almost) :)

    McGoober
    If I'm reading the descriptions correctly, you've managerd to "publish" the content in MP and other devices (iPhone etc) can access and play it.
    Do you have any plans for allowing MP hosted content to be pushed to other mediaplayers but controlled from within MP?

    Reason I'm asking is - My home sound system is based on DLNA mediaplayers which can receive and play but not control.
    So I'm thinking of a "simple" system where instead of just pressing "Play" I can "Play to" a predefined list of DLNA clients.

    At the moment I manage by using DLNA SW on my W7 phone or old Proximis NetRemote software. Not the easiest to explain to the Boss.

    EDIT - And I've also just noticed this is for MediaPortal 2 rather than MP1 :-(
     

    McGoober

    Retired Team Member
  • Premium Supporter
  • August 13, 2006
    122
    105
    Cambridge, UK
    Home Country
    United Kingdom United Kingdom
    Re: Plugin: UPnP / DLNA Media Server

    Ah, yes. You are talking about a Media Controller. To allow content to be "played" there is a system of three components. A Media Server (this is the part that allows content to be accessed), A Media Renderer (This is the part that plays the content) and a Media Controller (the part that links the two together). Most DLNA Renderers (TV's, mobile phones) are actually a combination of a Media Renderer and a Media Controller. In your case you have a Renderer without a controller. Now, with the MediaConnect iPhone app you can use it solely as a Controller and link Media Portal (with my plugin) to a Renderer (your sound system), of course that doesn't really help you much if you don't have a smart phone. You can use other software, for example UPnP developer tools. These are a set of UPnP tools, one of which is called "AV Media Controller" and is a rudimentary GUI for playing content on renderers from servers, and I'm sure there is more out there.

    As far as my plugin goes, I wasn't going to make it a Media Controller. It's solely a Media Server. However, a Media Controller plugin for MP2 Client would be a great idea. :)
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Re: Plugin: UPnP / DLNA Media Server

    Hi McGoober,

    it took some time, but as promised, I just did some further testing.

    What i did is:
    1. Start MP2-Server
    2. Use my iPad2 with the current free version of mediaConnect app.
    3. Browse to Shares and my music collection. It tells me there are over 800 entries (artists), which may be true. Then it takes a very long time (some minnutes) until the artists are shown.
    4. I selected the first artist in the list, which only has one album, but nevertheless it takes again some minutes until this single album is shown as folder.
    5. I selected that folder and within that folder there should be the mp3-files.

    But instead of the mp3 files, I get an error on my iPad saying "Error - Error code = 501 - UPnP Error: Action failed". I can only chose "dismiss" and that's it.

    There's noting in the MP2-Server error log. The regular MP2-server log is attached, but I can't see anythin unusual in it besides the shutdown, but I think this doesn't have to do anything with my problem above.
    This behaviour is in so far reproducible as I always get the error as soon as I open a directory, in which there are not only subfolders, but actual mp3-files.

    Don't know how to debug this further - maybe you can add some more logging to your code?

    Nevertheless, an awsome start. Keep it up!

    Michael
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Re: Plugin: UPnP / DLNA Media Server

    --------------------

    Just tried to use the app "AcePlayer lite" instead. There I see the MP2 server, but as soon as I try to open it, it says "browse failed".
    The logs only show many lines of:

    [DEBUG] - SSDPServerController: Problem parsing incoming packet at IP endpoint '192.168.2.30'. Error message: 'Unsupported USER-AGENT header entry 'Neptune/1.0.2''
     

    dyamant

    Portal Pro
    July 31, 2007
    401
    36
    59
    Castrop-Rauxel
    Home Country
    Germany Germany
    AW: Plugin: UPnP / DLNA Media Server

    Can anyone tell me what i can do.
    i get this error (see picture)
     

    Attachments

    • ScreenShot 123139.jpg
      ScreenShot 123139.jpg
      17.8 KB

    McGoober

    Retired Team Member
  • Premium Supporter
  • August 13, 2006
    122
    105
    Cambridge, UK
    Home Country
    United Kingdom United Kingdom
    I've just posted v1.03 of the plugin. There isn't much in the way of new stuff. However the search grammer seems to be working, so you should see some messages in the log about parsing if you try to use MS MediaPlayer (which I would love to see btw, PM anything interesting). Also some extra debugging for MJGraf. Please re-run your test and let me have the log again.

    I've also updated the Title of the post so that people don't get confused as to the version of MediaPortal it's for. Which is MediaPortal 2 btw... thats MediaPortal *2* for those that didn't catch that... Did I mention that this is for MediaPortal 2... no? well it's for MediaPortal 2

    :D
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Hi McGoober,

    I just tried again you plugin, and I have the feeling some notifications are missing : if I start WMP before MediaPortal 2 Server, I can't see the device, but if I start WMP after MP2 Server is fully started, then it's correctly discovered.

    Also when I close MP2 Server, it's still displayed in WMP.

    I also think if it could be a part of my problem with my ISP "box"...

    About extra logs, I have some, but not sure it's very interesting.

    [COLLAPSE]
    Code:
    [2012-02-08 01:08:26,965] [20638  ] [14       ] [DEBUG] - MediaServer - Parsed: "upnp:class derivedfrom "object.container.playlistContainer" and @refID exists false" to make "<?xml version="1.0" encoding="utf-8"?><searchCrit match="upnp:class derivedfrom &quot;object.container.playlistContainer&quot; and @refID exists false"><boolean_expression match="upnp:class derivedfrom &quot;object.container.playlistContainer&quot; and @refID exists false"><conditional_and_expression match="upnp:class derivedfrom &quot;object.container.playlistContainer&quot; and @refID exists false"><string_expression match="upnp:class derivedfrom &quot;object.container.playlistContainer&quot; "><property match="upnp:class " /><Node match="derivedfrom" /><string_literal match="&quot;object.container.playlistContainer&quot;" /></string_expression><existance_expression match="@refID exists false"><property match="@refID " /><Node match="exists" /><boolean_literal match="false" /></existance_expression></conditional_and_expression></boolean_expression></searchCrit>"
    [2012-02-08 01:08:27,074] [20748  ] [27       ] [DEBUG] - MediaServer - Parsed: "upnp:class derivedfrom "object.item.audioItem" and @refID exists false" to make "<?xml version="1.0" encoding="utf-8"?><searchCrit match="upnp:class derivedfrom &quot;object.item.audioItem&quot; and @refID exists false"><boolean_expression match="upnp:class derivedfrom &quot;object.item.audioItem&quot; and @refID exists false"><conditional_and_expression match="upnp:class derivedfrom &quot;object.item.audioItem&quot; and @refID exists false"><string_expression match="upnp:class derivedfrom &quot;object.item.audioItem&quot; "><property match="upnp:class " /><Node match="derivedfrom" /><string_literal match="&quot;object.item.audioItem&quot;" /></string_expression><existance_expression match="@refID exists false"><property match="@refID " /><Node match="exists" /><boolean_literal match="false" /></existance_expression></conditional_and_expression></boolean_expression></searchCrit>"
    [2012-02-08 01:08:27,137] [20810  ] [27       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:27,168] [20841  ] [27       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:28,041] [21715  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:28,057] [21730  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:28,712] [22386  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:28,728] [22401  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:29,243] [22916  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:29,258] [22932  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:29,742] [23415  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:29,757] [23431  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:30,288] [23961  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:30,303] [23977  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [2012-02-08 01:08:31,005] [24679  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0",browseFlag="BrowseDirectChildren",filter="*",startingIndex="0",requestedCount="200",sortCriteria="")
    [2012-02-08 01:08:31,005] [24679  ] [29       ] [DEBUG] - MediaServer - OnBrowse(objectId="0"...) = (numberReturned="4",totalMatches="4",containerUpdateId="0") <?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container childCount="0" id="A" parentID="0" restricted="true" searchable="false"><dc:title>Audio</dc:title><upnp:class>object.container</upnp:class></container><container childCount="0" id="P" parentID="0" restricted="true" searchable="false"><dc:title>Picture</dc:title><upnp:class>object.container</upnp:class></container><container childCount="1" id="V" parentID="0" restricted="true" searchable="false"><dc:title>Video</dc:title><upnp:class>object.container</upnp:class></container><container childCount="4" id="S" parentID="0" restricted="true" searchable="false"><dc:title>Shares</dc:title><upnp:class>object.container</upnp:class></container></DIDL-Lite>
    [/COLLAPSE]

    Cheers.

    Smeulf.

    [Edit] Btw, your plugin doesn't works with MP1, is that normal ? Ok, I get out :D :sorry: [/Edit]
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Hi McGoober,

    sorry, still haven't enough time to test your plugin as intensively as I would like to... Nevertheless, I tried with WMP this time. It finds the server, shows that I may chose Music, Videos, etc. but as soon as I select e.g. Music, it says that the connection was refused by the server. Logs attached, server-error-log is empty.

    Will test with other clients as well and report back.

    cheers,
    Michael
     

    Users who are viewing this thread

    Top Bottom