Tags for mkv files added via mkvpropedit don’t get set up with specific target detail if input tag has a target type value of 50.
If you use mkvextract on a file that’s been tagged using mkvpropedit this way, then the extracted output xml file will show <Targets />
rather than 50, even though the target type value 50 was explicit in mkvpropedit input tag xml file.
Steps to reproduce.
Take a copy of a Matroska video file, name it Test.mkv
Remove all its tags: mkvpropedit Test.mkv --tags all:
Create an input tag xml file as follows:
<Tags>
<Tag>
<Targets>
<TargetTypeValue>50</TargetTypeValue>
</Targets>
<Simple>
<Name>PART_NUMBER</Name>
<String>01</String>
</Simple>
</Tag>
</Tags>
Name it TestTagsIn.xml
Add tags into Test.mkv using mkvpropedit: mkvpropedit Test.mkv --tags global:TestTagsIn.xml
Extract tag information from Test.mkv using mkvextract: mkvextract Test.mkv tags TestTagsOut.xml
The output xml looks like this:
<?xml version="1.0"?>
<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->
<Tags>
<Tag>
<Targets />
<Simple>
<Name>PART_NUMBER</Name>
<String>01</String>
<TagLanguageIETF>und</TagLanguageIETF>
</Simple>
</Tag>
</Tags>
In other words, the input target type value of 50 has gone, along with xml file’s surrounding (opening and /closing) <Targets>
and <TargetTypeValue>
tags.
All being replaced with <Targets />
The same thing happens when using mkvmerge.
Is this deliberate?
With level 50 being the most common tag grouping level (ie. movie /episode level) for Matroska video, is <Targets />
intended to represent the idea of an unspecified target type value level being taken somehow as the ‘default’ level?
If so, this notion of a default target type level being assumed rather than being explicitly set doesn’t seem to be in the Matroska specification.