[no Bug] [Needs implementation] Tags from MKV files are not imported (1 Viewer)

Smeulf

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

    I just tried to import a MKV file containing actors and genres tags, and the tags are not imported in the database.

    But we can take time to handle the issue : MediaInfo library does not currently support more than one actor or genre.

    See this bug report on MediaInfo : SourceForge.net: MediaInfo: Detail: 3439005 - MKV Tags for actors and genres

    Joined : sample file containing tags.

    Cheers.

    Smeulf.
     

    Attachments

    • sample.zip
      1.2 MB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,070
    7,459
    Home Country
    Germany Germany
    Confirmed issue. I recently started to extend the video MDE to use the MKVExtract tool to read tags and even covers from the mkv files.

    For tags (your sample file) it produces following xml. Most difficult will be the parsing of the tags and correctly mapping to our aspects.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
     
    <!DOCTYPE Tags SYSTEM "matroskatags.dtd">
     
    <Tags>
      <Tag>
        <Targets>
          <TargetTypeValue>70</TargetTypeValue>
        </Targets>
        <Simple>
          <Name>TITLE</Name>
          <String>Serie Name</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>SUMMARY</Name>
          <String>Serie summary</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>GENRE</Name>
          <String>Action and Adventure</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>GENRE</Name>
          <String>Drama</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>GENRE</Name>
          <String>Science-Fiction</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>TOTAL_PARTS</Name>
          <String>4</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
      </Tag>
      <Tag>
        <Targets>
          <TargetTypeValue>60</TargetTypeValue>
        </Targets>
        <Simple>
          <Name>PART_NUMBER</Name>
          <String>2</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>TOTAL_PARTS</Name>
          <String>13</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
      </Tag>
      <Tag>
        <Targets>
          <TargetTypeValue>50</TargetTypeValue>
        </Targets>
        <Simple>
          <Name>TITLE</Name>
          <String>Episode Title</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>SUMMARY</Name>
          <String>Episode summary</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>PART_NUMBER</Name>
          <String>5</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>DIRECTOR</Name>
          <String>Allan Kroeker</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>DATE_RELEASED</Name>
          <String>2004-10-18</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
        </Simple>
        <Simple>
          <Name>ACTOR</Name>
          <String>Edward James Olmos</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
          <Simple>
            <Name>CHARACTER</Name>
            <String>William &quot;Husker&quot; Adama</String>
            <TagLanguage>und</TagLanguage>
            <DefaultLanguage>1</DefaultLanguage>
          </Simple>
        </Simple>
        <Simple>
          <Name>ACTOR</Name>
          <String>Mary McDonnell</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
          <Simple>
            <Name>CHARACTER</Name>
            <String>Laura Roslin</String>
            <TagLanguage>und</TagLanguage>
            <DefaultLanguage>1</DefaultLanguage>
          </Simple>
        </Simple>
        <Simple>
          <Name>ACTOR</Name>
          <String>Grace Park</String>
          <TagLanguage>und</TagLanguage>
          <DefaultLanguage>1</DefaultLanguage>
          <Simple>
            <Name>CHARACTER</Name>
            <String>Sharon &quot;Boomer&quot; Valerii</String>
            <TagLanguage>und</TagLanguage>
            <DefaultLanguage>1</DefaultLanguage>
          </Simple>
          <Simple>
            <Name>CHARACTER</Name>
            <String>Sharon &quot;Athena&quot; Agathon</String>
            <TagLanguage>und</TagLanguage>
            <DefaultLanguage>1</DefaultLanguage>
          </Simple>
        </Simple>
      </Tag>
    </Tags>
     

    Smeulf

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

    The actual example describe a single episode of a serie : Target type = 70 is the serie, Target type = 60 is the season, Target type 50 is the episode.

    Here are the known tags for a MKV (all are not needed in the DB, and as if it's not enough, custom tags can be created...) : http://matroska.org/technical/specs/tagging/index.html

    Also, many examples can be found at Matroska web site :
    http://matroska.org/technical/specs/tagging/example-audio.html
    http://matroska.org/technical/specs/tagging/example-video.html

    But maybe before importing anything we should determine what is pertinent or not ?

    Feel free to ask if you want some examples for a specific case, I think I have now a pretty good idea about how it works ;)

    Cheers.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,070
    7,459
    Home Country
    Germany Germany
    thanks to "Linq to XML" I am able to read everything I want from the matroska tags now :D

    the key of the parameter "tagsToExtract" is a combination of "targetTypeValue" and the Simple tag's name:

    Code:
          MatroskaInfoReader reader = new MatroskaInfoReader(@"sample.mkv");
          // Add keys to be extracted to tags dictionary, matching results will returned as list of strings
          Dictionary<string, IList<string>> tagsToExtract = new Dictionary<string, IList<string>>
                                                      {
                                                        {"70.TITLE", null}, // Series title
                                                        {"70.GENRE", null}, // Series genre(s)
                                                        {"60.PART_NUMBER", null}, // Season number
                                                        {"60.DATE_RELEASE", null}, // Season year
                                                        {"60.TITLE", null}, // Season title
                                                        {"50.TITLE", null}, // Episode title
                                                        {"50.SUMMARY", null}, // Episode summary
                                                        {"50.DATE_RELEASED", null}, // Episode year
                                                        {"50.PART_NUMBER", null}, // Episode number
                                                        {"50.ACTOR", null}, // Actor(s)
                                                        {"TITLE", null} // File title
                                                      };
          reader.ReadTags(tagsToExtract);
          return;
    This handles also multiple matches and returns collections (here gernres and actors)
     

    Smeulf

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

    I'm wondering if the tag example if 100% accurate.

    According Matroska Target Type table in http://matroska.org/technical/specs/tagging/index.html, I think I miss the "TargetType" tag in my example.

    So maybe there is something more to check before defining if the tag is for a movie or an episode, a volume or a season...

    That's also means I have to tag again my files :( Definitely have to create a tool for this purpose.......

    Also, a basic concept is "High level value applies to all sub elements". Actors defined at collection level applies for all seasons / episodes. Having an empty string at episode level means no actor known for this episode. But I have no idea how the standards should work for actors at both levels : combine or replace... I can't find a good answer to this question.
     

    Smeulf

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

    Last news from Matroska dev group :

    > We're currently working on a Matroska tag parser for our future HTPC
    > software, and there's some questions I can't find any anwsers.
    >
    > Let's assume a TV Serie, where main actors would be declared at level 70
    > (Collection), and guest actors would be declared at level 50 (Episode).
    >
    > First question is : Is it correct to have actors at level 70 ?

    Yes

    > Second is : In the case it's correct, would actors tags for level 70 be
    > combined with or replaced by actors at level 50 in Matroska specs ?

    It is combined.

    Although I'm not too sure there are much softwares that currently read
    these and also that much users use it. But it has to start somewhere.

    At least, we know how to work :D
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Also exists MKA for audio files...
     

    Users who are viewing this thread

    Top Bottom