Skip to content

Matroska tags with no TargetTypeValue fail to parse metadata #132

@matt-sorenson

Description

@matt-sorenson

According to https://www.matroska.org/technical/elements.html TargetTypeValue should default to '50' if it's not present but node-taglib-sharp throws instead.

This forum link has an example XML to pass into mkvpropedit which then strips out the TargetTypeValue (cause it's the default value)

https://help.mkvtoolnix.download/t/mkv-tags-with-target-type-value-50/1330

I created a sample file using ffmpeg -f lavfi -i color=c=magenta:s=1280x720:d=1 -f lavfi -i anullsrc=r=44100:cl=stereo -t 1 -c:v libx264 -c:a aac output.mkv and then used the mkvpropedit Test.mkv --tags all:<PUT_XML_FILENAME_HERE> with

<Tags>
  <Tag>
    <Targets>
      <TargetTypeValue>50</TargetTypeValue>
    </Targets>
    <Simple>
      <Name>PART_NUMBER</Name>
      <String>01</String>
    </Simple>
  </Tag>
</Tags>

Then try to read the metadata using the library and it will fail.

Setting the TargetTypeValue to 70 causes mkvpropedit to not strip it out and the library will successfully parse it, but the library should handle the default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions