Subject: [Cellar] Matroska Tags

From: Dave Rice <[email-masked]>
Date: Wed, 9 Mar 2016 14:31:28 -0500

Hi all,

I'm working on updating the documentation in the Matroska Tags section, but have some questions and comments.

The definitions for Tags and Tag imply that the Tag structure only contains metadata that relates to Tracks and Chapters, but elsewhere documentation refers to Tags in use to describe Attachments. I propose to adding Attachments to the Tag and Tags definitions. Is there anything else that Tags can describe besides Segment, Chapters, Tracks, and Attachments.

If the Matorska Segment is a part of a linked series of Segments (using PrevUID and/or NextUID), is it possible to use Tags to refer to the linked series of Segments?

I'm presuming that the Tags element may only describe data within the same containing Segment, is that right?

The Targets element is mandatory and the description says "It is empty to describe everything in the segment." Does "is Empty" mean that the Targets Master-element is literally empty with a zero value in the Element Data Size.

I find it a little unintuitive that the TagAttachmentUID element relates to another called FileUID. I realize that it's challenging to change the name of an element at this phase, but :(
For the linking UID Elements in this section I propose adding the Element that the element links to by name.

I'm confused as to why there are both TargetTypeValue and TargetType. The TargetTypeValue just seems like the human-readable version of TargetType, but what if they conflict? Are there scenarios where TargetType should be used but not TargetTypeValue?

If Tag contains TagTrackUID=0 and TagTrackUID={SPECIFIC_TRACKID}, does this mean the Tag element refers to all tracks?

There is TagEditionUID but EditionUID is not mandatory, so it seems as if the ability to describe a Chapter Edition depends on if an UID happens to be there. The other UID Elements that Tags relate to are all mandatory. Any reason that EditionUID is optional?

SimpleTag is one of the rare Elements that can appear at multiple levels. Is it true that the only valid parent elements of SimpleTag are Tag and SimpleTag?

Best Regards,
Dave Rice

---

From: Steve Lhomme <[email-masked]>
Date: Sun, 13 Mar 2016 14:58:29 +0100

> I'm working on updating the documentation in the Matroska Tags section, but have some questions and comments.

Before going into the details. The tags have been redone 2 or 3 times.
You can find ancient classes in libmatroska to deal with the old
system. At some point we should drop this. That system used one
element per tag name. That was way too much and harder to extend.

> The definitions for Tags and Tag imply that the Tag structure only contains metadata that relates to Tracks and Chapters, but elsewhere documentation refers to Tags in use to describe Attachments.…

An Edition can be tagged.
See the 4 different possible UIDs
https://www.matroska.org/technical/specs/tagging/index.html#TagTrackUID

> If the Matorska Segment is a part of a linked series of Segments (using PrevUID and/or NextUID), is it possible to use Tags to refer to the linked series of Segments?

No, tags are only for the current Segment. If we want this feature we
should add (multiple) SegmentUIDs as targets. The "COLLECTION" target
type may cover this case too. It is "soft linking" though. For example
2 files with the same COLLECTION name may not actually be related. On
the other hand, remuxing/transcoding would preserve the target even
after the Segment UID(s) changed.

> I'm presuming that the Tags element may only describe data within the same containing Segment, is that right?

So far, yes.

> The Targets element is mandatory and the description says "It is empty to describe everything in the segment." Does "is Empty" mean that the Targets Master-element is literally empty with a zero va…

If the element is not set or set with no data.

> I'm confused as to why there are both TargetTypeValue and TargetType. The TargetTypeValue just seems like the human-readable version of TargetType, but what if they conflict? Are there scenarios wh…

You're right, it's the human-readable form. You could use one or the
other (maybe that's not good). When there's both the TargetTypeValue
is what matters. The specs says TargetType is only informational.
I think the only reason TargetTypeValue is not mandatory is to allow
tagging tracks/chapters/etc in the same tag. But maybe that's just too
confusing and complex and it should just be made mandatory. It already
had a default value so shouldn't be an issue when reading old files.

> If Tag contains TagTrackUID=0 and TagTrackUID={SPECIFIC_TRACKID}, does this mean the Tag element refers to all tracks?

All tracks in the segment, yes.

> There is TagEditionUID but EditionUID is not mandatory, so it seems as if the ability to describe a Chapter Edition depends on if an UID happens to be there. The other UID Elements that Tags relate…

Most of the times (99.99%) Chapters only have one edition. So it would
mean adding extra useless data in most cases.

> SimpleTag is one of the rare Elements that can appear at multiple levels. Is it true that the only valid parent elements of SimpleTag are Tag and SimpleTag?

Yes.

> Best Regards,
> Dave Rice
> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar

-- 
Steve Lhomme
Matroska association Chairman