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

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    You mean in DlnaProtocolInfoFactory? I think the most relevant part of the way we do it now is the comment:
    I agree here. We need to extend this function.
    And that is what we need more information for. So now my question is how to extend the media library in the best way to give us these extra information?
    I would probably port the function from miniDLNA (with credits) and maybe adjust it for our purpose.

    For the first step I would also do it without transcoding support.
    Once it is working more or less I would create another plugin which is responsible for transcoding (it can transcode everything MP wants to transcode) and basically a process plugin without any gui or so.

    Than we can also create profiles for client devices and advertise the protocol info on the basis of our profiles. If the profile in the DB doesn't match one of the supported profiles it gets transcoded.

    What do you think? But this is more of a long term plan.

    Another question is: Do we store the final DLNA profile in the DB or do we store all the needed information to dervice the profile from that.
    Basically move ConfigureProfile() to the importer side or leave it like it is now.
    I would be in favor of the later option because these informations like codecs etc. might be useful also for other plugins in the future.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @Lehmden
    Im not that familiar with MP2 yet^^ So forgive me when I ask so much questions^^
    Do you have the debug output enabled?
    I am looking for something like that:
    DlnaResourceAccessModule: Attempting to load mediaitem ...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,566
    3,947
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Do you have the debug output enabled?
    Afaik there is no global "Debug" Log level if you use release builds. I'm not sure but I think you need to enable debug logging directly in the plugin when compiling.
    Some log levels you can set in some config files. I've set SQLite log level to maximum and add those logs too. Maybe you can find something in there, that is useful.
    Aside this I don't know what else I can do here...
    So forgive me when I ask so much questions
    All is fine, I'm glad I can help. Imho this is a very important plugin as it opens the whole world of mobile devices, not- Windows PC and even "Smart- TV" to MediaPortal2 so I'm really happy someone is working on it. Imagine you can use LiveTV via UPnP/DLNA later... :cool:
     

    FreakyJ

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

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,566
    3,947
    Lehmden
    Home Country
    Germany Germany
    Never touched this before...:oops: But no one requested this before too.
    This log level is not usable in daily environment as the log files are flooded with useless informations and they are growing until eternity...
    I've changed the level to ALL, did some UPnP Requests and changed the log level back to normal...
    Happy reading:p;)
     

    FreakyJ

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

    I try to build my own meta data extractor for the DLNA stuff. I already got my own MediaAspect registered.^^
    The meta data Extractor is running, but I don't get any video files.
    My constructur looks like this:
    Code:
    static DlnaMetadataExtractor()
        {
          MediaCategory seriesCategory;
          IMediaAccessor mediaAccessor = ServiceRegistration.Get<IMediaAccessor>();
          if (!mediaAccessor.MediaCategories.TryGetValue(MEDIA_CATEGORY_NAME_SERIES, out seriesCategory))
            seriesCategory = mediaAccessor.RegisterMediaCategory(MEDIA_CATEGORY_NAME_SERIES, new List<MediaCategory> { DefaultMediaCategories.Video });
          MEDIA_CATEGORIES.Add(seriesCategory);
          MEDIA_CATEGORIES.Add(DefaultMediaCategories.Audio);
          MEDIA_CATEGORIES.Add(DefaultMediaCategories.Image);
          MEDIA_CATEGORIES.Add(DefaultMediaCategories.Video);
       
          DlnaMetadataExtractorSettings settings = ServiceRegistration.Get<ISettingsManager>().Load<DlnaMetadataExtractorSettings>();
          InitializeExtensions(settings);
    
          // All non-default media item aspects must be registered
          IMediaItemAspectTypeRegistration miatr = ServiceRegistration.Get<IMediaItemAspectTypeRegistration>();
          miatr.RegisterLocallyKnownMediaItemAspectType(DlnaItemAspect.Metadata);
        }

    Attached is the log file. As you can see I get nfo and rar files, but no video files.

    The debug information is placed like this:
    Code:
    public bool TryExtractMetadata(IResourceAccessor mediaItemAccessor, IDictionary<Guid, MediaItemAspect> extractedAspectData, bool forceQuickMode)
        {
          ServiceRegistration.Get<ILogger>().Debug("DLNA Metadata Extractor");
          try
          {
            DLNAResult result = null;
            IFileSystemResourceAccessor fsra = mediaItemAccessor as IFileSystemResourceAccessor;
            if (fsra == null)
              return false;
            ServiceRegistration.Get<ILogger>().Debug("DLNA Metadata Extractor:  fsra: {0}, {1}", fsra.Path, fsra.IsFile);

    I basically used the VideoMetadataExtractor as a base, but I don't know whats wrong :(
     

    Attachments

    • DlnaMetadataExtractor.rar
      4.7 KB
    Last edited:

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    The strange thing is it works for another media source, but these two sources are in the same folder on the same harddrive....

    [2015-09-03 18:21:29,321] [15014 ] [84 ] [DEBUG] - DLNA Metadata Extractor: fsra: /O:/Serien/House of Cards/Staffel 03/House of Cards (US) - 3x09 - Rache auf Russisch.mkv, True

    vs.

    [2015-09-03 18:22:37,053] [82746 ] [85 ] [DEBUG] - DLNA Metadata Extractor: fsra: /O:/Serien/Covert Affairs/Staffel 01/, False

    really really strange... both imports are in the logs attached below

    Edit:
    both folder contain .mkv files
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Was one source already imported into ML? If so, the file modification time is compared and unchanged files simply are skipped
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Yes both were already imported. But than it makes sense.
    I have to remove the MediaSource and add it again. Is there a debug option to force a reimport of all files?
    I currently extend the media Info wraper. I make some progress. :)
     

    Users who are viewing this thread

    Top Bottom