Requesting help with Matroska Tags
Matthew Heaney <[email protected]>
| Newsgroups | gmane.comp.multimedia.matroska.user |
|---|---|
| Message-ID | <CAAjfm8Y46Q6wSjHDn2w4snzw3PL4843kH6WXRBXqLS9xeaLs=Q@mail.gmail.com> |
Hello,
I'm looking into adding metadata support in WebM (it's basically a
subset of MKV, but with doctype "webm"). I've been looking at the
Matroska Tags specification and I had a few questions.
Suppose I have an Ogg file with the following values in its comment
header (I obtained these results by using oggz-comment.exe):
Vendor: Xiph.Org libVorbis I 20070622
TITLE: One Look
ARTIST: Blaise Alleyne
ALBUM: One Look - Demo
YEAR: 2007
COMMENT: Licensed under a Creative Commons Attribution-Share
Alike Canada 2.5 license
http://creativecommons.org/licenses/by-sa/2.5/ca/
GENRE: Folk/Rock
TRACKNUMBER: 1
Now suppose I want to capture this information in the form of Matroska
tags. Assume for now that this is an MKV file with a single (Vorbis)
audio track.
We start with a Tags element:
1:Tag [12][54][C3][67]
Next we have a Tag element:
2:Tag [73][73]
Can there be multiple level-2 Tag elements nested in the level-1 Tags
element? What would be the purpose of this?
Next there's a Targets element:
3:Targets [63][C0]
I think this associates the metadata values with a particular track.
The description of that element says that "It is void to describe
everything in the segment." Does this mean it can be omitted? What
does it mean to say that it's "void"?
I see that there's a TargetTypeValue, and that it defaults to 50
("album"). Is 50 the appropriate value here? We have a single audio
track; is 30 ("track" or "song") a better value?
4:TargetTypeValue [68][CA]
Can the TargetTypeValue be omitted?
There's also a TargetType string that is informational:
4:TargetType [63][CA]
If the TargetTypeValue is 50, then should the TargetType have the value "ALBUM"?
If the TargetTypeValue is 30, then should the TargetType have the
value "TRACk" or possibly "SONG"?
Can the TargetType be omitted?
There are a few sub-elements that correspond to various UIDs, such as
TrackUID. We have only a single audio track, so I think this can be
omitted.
Is there anything else that can be nested (at level 4) inside the
Targets element (at level 3)?
I'm still having trouble grokking the relationship between the Targets
element (at level 3) and the SimpleTag element. Is the SimpleTag
element nested inside the Targets element, such that the SimpleTag
would be at level 4? Or does the SimpleTag element stand alone, as a
peer to the Targets element, at level 3?
Wherever the SimpleTag does, I think the TagName, TagString, etc, are
nested inside the SimpleTag element.
I think also that there is one SimpleTag and its nested components for
each metadata value listed above. So let's see what that would look
like:
I'm not sure what to do with the vendor string, so let's ignore that
one for now. I think the remaining comments would look something like
(assuming that SimpleTag elements are at level 3):
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "TITLE"
4:TagString [44][87] with payload "One Look"
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "ARTIST"
4:TagString [44][87] with payload "Blaise Alleyne"
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "ALBUM"
4:TagString [44][87] with payload "One Look - Demo"
Now I can see already that I'm confused. Matroska nests its tags.
Are the TITLE and ALBUM tags listed at the same level in the
hierarchy? Or is the TITLE tag (for the track/song) nested inside the
ALBUM somehow?
I assume YEAR comment refers to the release date, so that would be:
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "DATE_RELEASED"
4:TagString [44][87] with payload "2007"
The COMMENT would be:
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "COMMENT"
4:TagString [44][87] with payload "Licensed under a Creative Commons
Attribution-Share Alike Canada 2.5 license
http://creativecommons.org/licenses/by-sa/2.5/ca/"
Although I think in this case the COMMENT comment would be more
usefully transcribed as one of COPYRIGHT, PRODUCTION_OF_COPYRIGHT,
and/or TERMS_OF_USE, perhaps with a URL nested under COPYRIGHT.
The GENRE would be:
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "GENRE"
4:TagString [44][87] with payload "Fold/Rock"
The TRACKNUMBER would be:
3:SimpleTag [67][C8]
4:TagName [45][A3] with payload "PART_NUMBER"
4:TagString [44][87] with payload "1"
I'm not sure at what level PART_NUMBER goes, however.
Does anyone have any insight into this? I still not clear about which
things should be nested into other things, so any help would be much
appreciated.
Thanks,
Matt
_______________________________________________
Matroska-users mailing list
[email protected]
http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-users
Read Matroska-Users on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.user