Video Tags Example

Introduction

Video content usually doesn’t have tags in the file. But that doesn’t mean it’s a good thing. Here are some real-life examples where it makes sense to have tags. As for audio you can have all video parts of a bigger ensemble in the same file or in smaller files.

The XML Tag files matching mkvmerge’s DTD format for all the examples on this page can be found in a zip file.

Basic movie

Here is a very basic example of how you would add the title, director, date of release and comment about a movie on one DVD (XML version).

  • Tags
    • Tag (about the movie)
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Dune”
      • SimpleTag
        • TagName = “DIRECTOR”
        • TagString = “David Lynch”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1984”
      • SimpleTag
        • TagName = “COMMENT”
        • TagString = “One of the best sci-fi movies.”

Bigger example

Let’s consider the Simpsons DVDs. You have a set of DVDs, each containing a few episodes of a whole season. The episodes would be spanned as follows :

  • Season 1
    • DVD #1 (Chapter UID = 98)
      • Episode 1 (Chapter UID = 123)
        • Intro (Chapter UID = 963)
        • Episode content (Chapter UID = 852)
        • Credits (Chapter UID = 741)
      • Episode 2 (Chapter UID = 234)
        • Intro (Chapter UID = 159)
        • Episode content (Chapter UID = 267)
        • Credits (Chapter UID = 348)
      • Episode 3 (Chapter UID = 345)
        • Intro
        • Episode content
        • Credits
      • Episode 4 (Chapter UID = 456)
        • Intro
        • Episode content
        • Credits
    • DVD #2 (Chapter UID = 87)
      • Episode 5 (Chapter UID = 567)
        • Intro
        • Episode content
        • Credits
      • Episode 6 (Chapter UID = 678)
        • Intro
        • Episode content
        • Credits
      • Episode 7 (Chapter UID = 789)
        • Intro
        • Episode content
        • Credits
      • Episode 8 (Chapter UID = 890)
        • Intro
        • Episode content
        • Credits

One file with all DVDs

In this case the file contains one continuous video track with all episodes one after the other. Chapters are used to virtually split the content in many parts, ie the DVDs, the episodes and chapters. A good ripping application would rip the DVDs with the same structure as above as nested chapters.

Now let’s see how a basic tagging of this file would work (XML version) :

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 123
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons family”
      • SimpleTag (the number of the episode in this DVD)
        • TagName = “PART_NUMBER”
        • TagString = “1”
    • Tag (about a part of the episode)
      • Targets (the intro is the same for episode 1 & episode 2, so we target both chapters)
        • ChapterUID = 963
        • ChapterUID = 159
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag (no need for a PART_NUMBER for this, but you can have one)
        • TagName = “TITLE”
        • TagString = “first intro ever”
    • Tag (about a part of the episode)
      • Targets
        • ChapterUID = 852
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “episode 1 content”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 234
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons 2nd round”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “2”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 345
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Homer is lazy”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “3”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 456
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Bart is naughty”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “4”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 567
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Lisa goes to school”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “5”
    • etc…

One file per DVD

Now let’s split this first season file in 2 pieces (episode 1-4 and 5-8). The big difference is that the SEASON info are repeated in each files :

DVD #1 / File #1

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 123
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons family”
      • SimpleTag (the number of the episode in this file)
        • TagName = “PART_NUMBER”
        • TagString = “1”
    • Tag (about a part of the episode)
      • Targets (the intro is the same for episode 1 & episode 2, so we target both chapters)
        • ChapterUID = 963
        • ChapterUID = 159
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag (no need for a PART_NUMBER for this, but you can have one)
        • TagName = “TITLE”
        • TagString = “first intro ever”
    • Tag (about a part of the episode)
      • Targets
        • ChapterUID = 852
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “episode 1 content”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 234
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons 2nd round”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “2”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 345
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Homer is lazy”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “3”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 456
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Bart is naughty”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “4”

DVD #2 / File #2

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 567
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Lisa goes to school”
      • SimpleTag (episode one of this season)
        • TagName = “PART_NUMBER”
        • TagString = “5”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 678
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Marge gets pregnant”
      • SimpleTag (episode one of this season)
        • TagName = “PART_NUMBER”
        • TagString = “6”
    • etc…

One file per episode

In this case we have 8 files, one for each episode.

Episode 1 / File #1

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about an episode)
      • Targets (as always, no need to specify a target at it spans the whole file/segment, but you can)
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons family”
      • SimpleTag (the number of the episode in this DVD)
        • TagName = “PART_NUMBER”
        • TagString = “1”
    • Tag (about a part of the episode)
      • Targets (here the chapter target is needed)
        • ChapterUID = 963
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag (no need for a PART_NUMBER for this, but you can have one)
        • TagName = “TITLE”
        • TagString = “first intro ever”
    • Tag (about a part of the episode)
      • Targets
        • ChapterUID = 852
        • TargetTypeValue = 30
        • TargetType = “CHAPTER”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “episode 1 content”

Episode 2 / File #2

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about the episode)
      • Targets
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons 2nd round”
      • SimpleTag
        • TagName = “PART_NUMBER”
        • TagString = “2”

etc…

Episode 5 / File #5

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “The Simpsons”
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “1989”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “1” (the season number)
      • SimpleTag (the number of episodes)
        • TagName = “TOTAL_PARTS”
        • TagString = “8”
    • Tag (about an episode)
      • Targets
        • ChapterUID = 567
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Lisa goes to school”
      • SimpleTag (episode one of this season)
        • TagName = “PART_NUMBER”
        • TagString = “5”

etc…

Season Trailer

This example is a little more complex as it uses tag nesting. This is the Dexter Season 5 trailer available on YouTube. It is copyrighted by ShowTime. This is neither an episode (so the episode value is set to 0 as it’s before the season starts) and it is not a proper element so SAMPLE is used to nest some information that would actually be used at the regular level. The sample file available with these tags merged are available here.

Layout

XML version

  • Tags
    • Tag (about the whole show)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 70
        • TargetType = “COLLECTION”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Dexter”
      • SimpleTag (the information about the copyright on this file)
        • TagName = “COPYRIGHT”
        • TagString = “Showtime”
        • SimpleTag
    • Tag (about the season)
      • Targets (no target means the whole content of the file, otherwise you can put all matching ChapterUIDs)
        • TargetTypeValue = 60
        • TargetType = “SEASON”
      • SimpleTag
        • TagName = “DATE_RELEASED”
        • TagString = “2010”
      • SimpleTag (note there is no TOTAL_PARTS of seasons as the series is not stopped)
        • TagName = “PART_NUMBER”
        • TagString = “5” (the season number)
    • Tag (about the trailer)
      • Targets (as always, no need to specify a target at it spans the whole file/segment, but you can)
        • TargetTypeValue = 50
        • TargetType = “EPISODE”
      • SimpleTag
        • TagName = “TITLE”
        • TagString = “Dexter Season 5 trailer”
      • SimpleTag (the information specific to the trailer aspect of the file)
        • TagName = “SAMPLE”
        • SimpleTag
          • TagName = “PART_NUMBER”
          • TagString = “0”
        • SimpleTag
          • TagName = “TITLE”
          • TagString = “Trailer”
      • SimpleTag (a link to the original file)