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

ianc

MP Donator
  • Premium Supporter
  • December 29, 2007
    132
    1
    wicklow
    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
    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,475
    1,385
    Country flag
    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,475
    1,385
    Country flag
    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''
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    42
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Plugin: UPnP / DLNA Media Server

    It seems there are more problems with the USER-AGENT. I think I'll add an option to skip the error message if a user agent is found which is not correctly formatted.
     

    McGoober

    Retired Team Member
  • Premium Supporter
  • August 13, 2006
    122
    105
    Cambridge, UK
    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
    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,475
    1,385
    Country flag
    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 (Users: 0, Guests: 2)

    OP Similar threads Forum Replies Date
    morpheus_xx [Evaluate] Checking UPnP library for security vulnerabilities MediaPortal 2 7
    raffe How do I setup MP2 as an UPnP server? General 3
    morpheus_xx [Finished] Debugging dead locks in UPnP library MediaPortal 2 1
    Lehmden [WiP] [MP2-824] DLNA Server functionality MediaPortal 2 27
    S Kommerzielle HTPC´s mit "selbst entwickelter Media center Distribution auf Basis von Media Portal" MediaPortal Café 9
    F Media Port 1.16 to 1.25 Installation, configuration support 1
    RoChess Weird GPU crash -- possible cause: resizing media MediaPortal 1 Talk 8
    J Navigating media drive General 4
    J Will Media Portal meet my requirements? General Support 4
    C Imported media doesn't show up immediately? General 1
    J Show media item location Feature Requests 4
    HTPCSourcer Media Accessor is flooding logs with files from attached monitor MediaPortal 2 9
    N [fixed] [MP2-822] Folder View is not displaying individual media share elements Submit: Bug Reports 4
    A MP2.2.2, understanding movies/videos/tv and WTV recordings. General 16
    T I cannot get a basic media import-what is the best configuration? General 10
    Rob Hexenmeister [solved] Latest Media Handler - skinning buttons Fanart Handler 19
    J MediaPortal TV Server and Kodi media source issues General 9
    D media portal 2.2 have movies shown on genre not name General 6
    M How to Watch my videos from my Media Portal to My TV without TV Tuner Newcomers Forum 1
    D Media Portal wake schedule General Support 29
    R Media portal resumes with wrong screen resolution General Support 3
    Rob Hexenmeister Latest Media Handler - facade properties - itemcount General Support 3
    P WMC on Windows 7 migrating to Media Portal on Windows 10 Newcomers Forum 5
    Rob Hexenmeister [solved] Latest media handler - time reported as date Fanart Handler 18
    Rob Hexenmeister Video Buttons / Latest Media MediaPortal 1 Skins 7
    Similar threads

























    Top Bottom