UPnP / DLNA Media Server for MediaPortal 2 (1 Viewer)

henso

Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    @FreakyJ
    I had some thoughts (again ;)):
    Should the transcoding library not be changed to service like you did with the FFMpegLib? Then an eventual Web interface could also use it for transcoding?
    That then raises the question if whether the DLNA MIA's should be renamed to something more generic? This would then also include that the Metadata Extractors would need to be a shared library/service?

    Just some thoughts :)
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Should the transcoding library not be changed to service like you did with the FFMpegLib?
    Actually I am working on it :) It was just a bussy week for me.
    My problem right now is that you used strings, but I need to change it to the IResourceAccessor. So I have to read the code first and think about it befor I start changing :)

    Then an eventual Web interface could also use it for transcoding?
    The transcoding service looks already pretty generic. After my changes to use the IResourceAccessor it should be even more generic. At least I hope so^^

    That then raises the question if whether the DLNA MIA's should be renamed to something more generic? This would then also include that the Metadata Extractors would need to be a shared library/service?
    I don't think so. A PC usually can take whatever you throw at it. If I understand ffmpeg right you just have to pass the target codecs/container, not the src codecs. So for the web interface I would make 4 profiles (defined in the Webinterface plugin) and just call the tranbscoding service which is shared with the DLNA plugin.

    Does that make sense?

    I am happy about every suggestion and open for discussion :)
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    My problem right now is that you used strings
    I didn't know enough about the inner workings to prepare for that. :p

    A web interface could also be used by mobile devices, which don't have such broad support. The reason for the additional MIA's is to make an informed choice about how to transcode media with minimum loss of quality. Of course we can make a few profiles that support most devices/PCs but that could mean lower quality on high-end hardware.
    I think Serviio's web interface uses some media parameters for transcoding that are not currently present in the MediaPortal 2 MIA's.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Oh after reading it again I think I missunderstood you. You would like to have the transcoding service outsourced?
    I guess that's a goof idea (y)

    But first I have to change to change the transcoding service to use my new FFMpegLib^^

    The reason for the additional MIA's is to make an informed choice about how to transcode media with minimum loss of quality.
    I don't know how other applications handle this, I just know it from MPExtended and it's webinterface. (It is for MP1, don't know if you know it)
    The you could define a default profile and you could change between different profiles by using a drop down menu.

    I guess you want to identify the user by using the user agent. Than have different profiles for each device, for different types of quality and bandwith.
    And take also the source material into account.

    I guess it would be nice to port this to MP2:
    https://github.com//MPExtended/tree/master/Services/MPExtended.Services.StreamingService
    The interface are defined here: https://github.com//MPExtended/tree/master/Services/MPExtended.Services.StreamingService.Interfaces

    It is already very modular.
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    You would like to have the transcoding service outsourced?
    Not sure I understand what you mean with outsourcing. I was thinking about changing the transcode library to be just like the FFMpgeLib you created.

    I guess that's a goof idea
    Should I be offended, when you call my idea goof? ;)

    I know MPExtended. I use it together with MediaPortal 1. MPExtended's approach is to stream everything by transcoding to the selected target container and codec. I was thinking of a different approach were the stream is transcoded (if necessary) to the compatible target container/codec that has minimum quality loss. Of course there should still be high, medium and low quality or similar possibilities. Does that make sense?
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    I guess you want to identify the user by using the user agent. Than have different profiles for each device, for different types of quality and bandwith.
    And take also the source material into account.
    After reading it again I think you are basically describing the same. For starters we could just have a few profiles that would support most devices/PC's just like MPExtendend. Over time we could expand them to include the minimum loss targets.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Not sure I understand what you mean with outsourcing.
    Creating an own plugin which is independent from the MediaServer and gets used by other plugins :)

    Should I be offended, when you call my idea goof?
    Hahah no! It was just a typo, but I guess you know that already^^

    I like your approach :)
    But I still think the MPExtened Module linked above could server as a base for a new transcoding service (instead the one which is used right now in the MediaServer). What do you think?

    I am not sure if you know this already:
    There is actually a webinterface for MP2 planned on the base of vNext. Because our Webserver doesn't handle Multithreading :( I guess this is a bit of a show stopper until we've moved to vNext.
    But if you are keen, you can still do the webinterface and we port it later. I would help you :)
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    But I still think the MPExtened Module linked above could server as a base for a new transcoding service (instead the one which is used right now in the MediaServer). What do you think?
    I'm not sure exactly what you mean. You mean you want to change the interface to the transcoding library but keep the current functionality? If it has the same functionality (or better), I see no problem in doing that. If I might ask what exactly are you thinking about doing? It might help understand the MP2 design better.

    Yeah, I have been reading about the web interface and vNext/ASP.NET 5. Web interfaces is not really something I have worked with. I have only made a very small web server with self hosting and a very simple JSON interface. I would have to research a lot more before I understand web interfaces better.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Just a short info: I am trying to port the MPExtended StreamingService. The code is not documented at all, so I don't know how far I get, but it might take some time :)

    I made already a rough port of teh MediaServer TranscodingService to the new FFMpeg lib. It is compiling and functional, but it uses impersionating only for the MediaAnalyzer right now, not the actual transcoding.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @MJGraf
    I have two issues with the ProcessUtils.TryExecuteAsync:
    1) I can't abort the process: https://github.com/MediaPortal/Medi...7c#diff-8319435bd663bff8ec96d34820d3b914R2350
    I can check "executionResult.IsCanceled", but I don't have any possibility to actually cancel the task :(

    2) ProcessUtils.TryExecuteAsync assumes that the standard output is a string, but that is not always the case. FFMpeg uses the Standard Output to stream binary data and uses the standard Error for all text messages.
    I tried to implement this, but it looked so hacked that I wanted to ask you for your input :)
     

    Users who are viewing this thread

    Top Bottom