MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.32k stars 158 forks source link

(Matroska) Not parsing layered tags properly, only showing lowest one. #720

Open MiM-MiM opened 1 year ago

MiM-MiM commented 1 year ago

Mediainfo only parses the furthest down tag layer when they use the same name. Matroska stores them both and they have different meanings. The higher the "TargetTypeValue" it is the more generic of a tag it is compared to the lower number option. In this example the "70" one is for the show "Lost", while the "50" one is for the specific episode, the pilot. Mediainfo only shows the episode one.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
<Tags>
    <Tag>
        <Targets>
            <TargetTypeValue>70</TargetTypeValue>
        </Targets>
        <Simple>
            <Name>IMDB</Name>
            <String>tt0411008</String>
        </Simple>
    </Tag>
    <Tag>
        <Targets>
            <TargetTypeValue>50</TargetTypeValue>
        </Targets>
        <Simple>
            <Name>IMDB</Name>
            <String>tt0636289</String>
        </Simple>
    </Tag>
</Tags>
Encoded date                             : UTC 2023-05-04 06:25:31
Writing application                      : mkvmerge v75.0.0 ('Goliath') 64-bit
Writing library                          : libebml v1.4.4 + libmatroska v1.7.1
IMDB                                     : tt0636289

If you open the file in a hex editor and look at the tags that way you'll see they are both there.

IMDBD‡‰tt0411008D{ƒundssŸcÀ€gÈ™E£„IMDBD‡‰tt0636289

Edit: The issue is present in all output modes tested, including xml and the full text.

JeromeMartinez commented 1 year ago

Definitely some improvements to do there :(.