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

henso

Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    Pushed some minor fixes
    In the DLNA XML file you need to remove lines between </Profile> and </Profiles>. It's part of some test profile that edited out wrong.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    it would probably be best solved during the OWIN / Katana / vNext migration.
    Yep - that's the way. Our httpserver does AFAIK not support multithreading :(
    But I didn't want to use Owin/Katana (as it is no longer developed), but directly ASP.Net 5 (aka vNext). Unfortunately, this will give us a lot of headaches (see this thread and my posts in it).
    In short: If we want to use ASP.Net 5 we have two options:
    • We can use the "hacked" version of mkosieradzki from the thread linked before. Not a good idea, because it is not (at least yet) supported by MS.
    • Or we need to convert at least our main server project from a CSProj to a XProj (which then requires lots of additional changes. E.g. installing the MP2 Server Service is completely different (see link in my first post in the thread linked before), we need a DNX runtime environment installed (technically not a big deal, but no idea how to do that in WiX), etc.).
    In medium term, I suppose there is no other option than going the second route because my guess is, MS will drop support for CSProj projects in the not too far future. But this is certainly nothing to be done in an hour or two...
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @MJGraf
    I don't know whats on your to do list right now and how much time you have.
    But would you be willing to create a branch and try to do this conversion? I mean we have to do that in the long run and you seem to know what is needed.

    I would have interest to create a web interface in the long run :)

    In the DLNA XML file you need to remove lines between </Profile> and </Profiles>. It's part of some test profile that edited out wrong.
    Thank you!
    Will do the changes ;)
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    I don't know whats on your to do list right now and how much time you have.
    You hit the nail - time is currently the issue.
    But I will certainly try to do this. I'm just still in the process of learning, because there are some things very different for xproj projects.
    What I e.g. didn't understand in the beginning is that NET451 is a completely different profile from DNX451. Both are targeting .Net 4.5.1. But NET451 is what Dawid Fowler in the linked thread calls "vanilla .net", whereas DNX451 is the xproj version of that, which means it uses the "Dot Net eXecution environment" to get access to .net 4.5.1.
    Then for xproj projects you cannot create exe files anymore. There are only DLLs. And to start them you need DNX.exe - which is the DNX runtime. Once you realize that, this makes a lot of sense. Because on Linux or Apple, the DNX.exe is obviously different, but the DLL generated from your project remains the same. That way, the binaries generated from your project are platform independent. Of course this doesn't really make sense when you only target DNX451, because .Net 4.5.1 is not available for Linux or Apple. But they obviously didn't make a difference between projects targeting DNX451 and DNXCORE (because one project can target both). That seems to be the reason for this.
    And when you use DNX, there are a lot of additional goodies, for which, however, I'm not sure, yet, whether we shall use them. There is e.g. a built-in dependency injection system. It uses a very nice abstraction, for which they deliver a very nice and simple implementation. But you can also exchange this for e.g. NInject. In the long run, this could replace our ServiceRegistration (so that we could finally drop the ServiceLocator pattern, which would make writing UnitTests much easier).
    Well, as you see, there is a lot to find out :)
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    I changed the client detection to use http headers for now
    You should know that this is not 100% reliable. For example every generation of a smart TV support different DLNA profiles and therefore it requires a new profile. But in the header information sent from the TV it might not be possible to see which generation the TV is an therefore an invalid profile could be detected. It should still be possible for the user to select the correct profile.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    What about a combination of IP address and user agent (or hostname and user agent)?
    Not so sure about that.
    Now it is like this:
    You can define a fixed link for a ip. e.g. 192.168.178.26 points to the profile "Android".
    If there is no link the profile selection is made on the base of the user agent.

    Later we can add a config option inside the GUI to configure these links. Shouldn't be too hard :)

    Attached is the latest version in case someone wants to give it a try. Keep in mind that there is only a generic profile. If something isn't working tweaking the profile might help or creating your own profile. This needs a bit try and error I guess.
    MP4 seems to be a bad choice for streaming. At least WMP doesn't like it very much. Surprisingly mkv works pretty good or flv.
    Henso used this as a base: http://serviio.org/index.php?option=com_content&view=article&id=16 for the profile definition. But there are some minor differences. I guess we don't support to inherit from other profiles etc.

    Also you should make a backup of your DB before installing this pluging and probably make a reimport of your media to populate all the DLNA fields in the DB. Maybe it is needed to start from scratch. I don't know. Lehmden has probably some more experience here :)
     

    Attachments

    • MediaServer.rar
      21 MB
    • HttpServer + UPnP.rar
      113.9 KB

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    MP4 seems to be a bad choice for streaming
    MP4 container is not designed for streaming during transcoding. After transcoding is completed it should be possible though.

    I guess we don't support to inherit from other profiles etc.
    Yes the profile does support inheritance. You will see when I push the profiles.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    MP4 container is not designed for streaming during transcoding. After transcoding is completed it should be possible though
    I know :) That's why I implemented the movtags. It should make this possible, it was better, but not working 100%.
    I think it is a bit of try and error to find the right combination.^^

    Yes the profile does support inheritance. You will see when I push the profiles
    Nice!
     

    Users who are viewing this thread

    Top Bottom