Difference between revisions of "Video file tagging"

From Official Kodi Wiki
Jump to: navigation, search
(light clarification)
(copyedit, tag field table)
 
Line 1: Line 1:
 
{{mininav|[[Video library]]||}}
 
{{mininav|[[Video library]]||}}
 
{{incomplete}}
 
{{incomplete}}
{{notice|This feature is currently for movies only. TV Shows and music videos are not yet supported.}}
+
{{notice|This feature is currently for '''movies only'''. TV shows and music videos are not yet supported.}}
 +
{{notice|This page describes an '''experimental''' and alternative way of adding movies to the library that is not dependent on file names or online scrapers.}}
 +
{{notice|If you have already named and organized your files using Kodi's naming guidelines, then you can safely ignore this page and go to the next step.}}
 
{{VideoLibraryCreate}}
 
{{VideoLibraryCreate}}
'''{{red|{{resize|1.3em|This page describes an EXPERIMENTAL and alternative way of adding Movies only to the library that is not dependent on file names or online scrapers.}}}}'''
 
  
'''{{red|{{resize|1.3em|If you have already named and organized your files using Kodi's naming guidelines, then you can safely ignore this page and go to the next step.}}}}'''
+
<section begin="intro" />Kodi v18 Leia introduces support for embedded video tags using '''*.mkv''' and '''*.mp4''' video files. They are similar in principle to the tags saved in audio files. Only limited movie support is available at this time.<section end="intro" />
  
<section begin="intro" />Kodi v18- Leia introduces support for embedded video tags using '''*.mkv''' and '''*.mp4''' video files. They are similar in principle to the tags saved in audio files. Only limited movie support is available at this time.<section end="intro" />
+
= Benefits of embedded video tags =
 
 
 
 
= Benifits of embedded video tags =
 
 
There are multiple reasons why one would want to use this feature:
 
There are multiple reasons why one would want to use this feature:
 
Media may already contain useful metadata (the reverse however is also true - many files contain "junk" metadata, hence why the feature defaults to off).
 
Media may already contain useful metadata (the reverse however is also true - many files contain "junk" metadata, hence why the feature defaults to off).
 
It gives one more control over the metadata than scrapers do (as scrapers may misclassify media and pull the wrong data).
 
It gives one more control over the metadata than scrapers do (as scrapers may misclassify media and pull the wrong data).
It does away with the need to have .nfo files. Since metadata travels with the media file, there is no longer a need for potentially thousands of these smaller files and can make directory management even easier.
+
It does away with the need to have [[.nfo file]]s. Since metadata travels with the media file, there is no longer a need for potentially thousands of these smaller files and can make directory management even easier.
Using ultra-high resolution Artwork/cover images that looks nicer on newer HD displays.(Pretty pictures!)
+
Using ultra-high resolution [[artwork]]/cover images that looks nicer on newer HD displays. (Pretty pictures!)
 
 
 
 
  
== How does it change/differ to the old model? ==
+
== How does it change/differ from the old model? ==
Kodi has two options for metadata import: using an online scraper or using local information, traditionally in the form of .nfo files. local tag reading is bundled into the "Local Information" arm, as logically, metadata is still local (i.e not network-drawn) information. Thus, one can still use a combination of .nfo files and embedded information if they choose "Local Information" rather than to use a scraper.
+
Kodi has two options for metadata import: using an online scraper or using local information, traditionally in the form of .nfo files. Local tag reading is bundled into the "Local Information" arm, as logically, metadata is still local (i.e not network-drawn) information. Thus, one can still use a combination of .nfo files and embedded information if they choose "Local Information" rather than to use a scraper.
  
It is important to note however that .nfo files will override embedded information. Not all of Kodi's NFO features are supported by embedded metadata yet, so many users may wish to still use the NFO method. (https://forum.kodi.tv/showthread.php?tid=326340.
+
It is important to note however that .nfo files will override embedded information. Not all of Kodi's NFO features are supported by embedded metadata yet, so many users may wish to still use the NFO method. (https://forum.kodi.tv/showthread.php?tid=326340)
  
 
== Settings ==
 
== Settings ==
The {{kodi}} settings has the option to enable or disable the reading of video file tags. The default setting is disabled.<br />
+
{{Kodi}} [[settings]] have the option to enable or disable the reading of video file tags at [[Settings/Media/Videos|Settings > Media Settings > Videos > Use video tags]]. The default setting is ''disabled''.
{{red|link to settings page here- Settings>Media Settings>Videos>Use video tags}}
 
  
This page assumes this setting has been enabled.
+
This page assumes this setting has been ''enabled''.
  
 
= Folder & File Structure =
 
= Folder & File Structure =
The use of Video File Tags does not absolve you from using the correct Folder and File structure for Movies, TV Shows and [[Music_videos|Music Videos]] as detailed in the previous pages. Use the navbox above to locate and read those requirements.
+
The use of Video File Tags does not absolve you from using the correct Folder and File structure for [[Naming video files/Movies|Movies]], [[Naming video files/TV Shows|TV Shows]] and [[Music videos|Music Videos]] as detailed in the previous pages.
 
 
 
 
  
 
= Tagging =
 
= Tagging =
Line 41: Line 34:
  
 
== Windows ==
 
== Windows ==
mp3tag is a Windows based metadata editor for many different files types, including MP4 (despite what it's name may suggest). While somewhat complex, it provides very fine-grained control over tagging, and is a worthwhile asset in any media management library.
+
[http://www.mp3tag.de MP3tag] is a Windows-based metadata editor for many different files and tag types, including MP4 and MKV (despite what it's name may suggest). While somewhat complex, it provides very fine-grained control over [https://help.mp3tag.de/main_tags.html tagging], and is a worthwhile asset in any media management library.
 
 
MetaX is a user friendly tagging solution, However it is proprietary and paid ($10). It features much the same core features as MP3tag, but adds an online search functionality to grab metadata from providers such as iTunes, Amazon and others, as well as an autotag feature. This can be useful to people with enormous media collections where the time saved manually tagging justifies the price.
 
 
 
  
 +
MetaX is a user-friendly tagging solution. However, it is proprietary and paid ($10). It features much the same core features as MP3tag, but adds an online search functionality to grab metadata from providers such as iTunes, Amazon and others, as well as an autotag feature. This can be useful to people with enormous media collections where the time saved manually tagging justifies the price.
  
 
== Mac ==
 
== Mac ==
;MP4 tagging:
+
; MP4 tagging:
 
* [https://griff.github.io/metaz/ MetaZ] is a free and open source metadata lookup and editor for Mac OS.
 
* [https://griff.github.io/metaz/ MetaZ] is a free and open source metadata lookup and editor for Mac OS.
  
 
== Linux ==
 
== Linux ==
  
= A note on iTunes =
+
* mp4v2
Apple, in their wisdom, have created a subset of tags that are strictly speaking only meant for use with iTunes. However, most tagging software can read and write these iTunes tags. These tags are also quite useful But will not work with Kodi. Tags include the ability to store Cast (actors), Screenwriter and Director information, as well as age restriction data such as MPAA ratings.
+
* exiftool
 +
 
 +
== A note on iTunes ==
 +
Apple, in their wisdom, have created a subset of MP4 tags that are strictly speaking only meant for use with iTunes. However, most tagging software can read and write these iTunes tags. These tags are also quite useful but will not work with Kodi. Tags include the ability to store Cast (actors), Screenwriter and Director information, as well as age restriction data such as MPAA ratings.
  
 
The important point to note here is that just because your tagging software allows you to add these does not mean they will be used. After all, they are unstandardized and were created by Apple solely for use with iTunes and iOS/macOS devices.
 
The important point to note here is that just because your tagging software allows you to add these does not mean they will be used. After all, they are unstandardized and were created by Apple solely for use with iTunes and iOS/macOS devices.
 
  
 
= Core Tags =
 
= Core Tags =
  
While there are an absolute myriad of tags that one can use, many, if not most of these are unnecessary for video files. Remember that MP4 tags have to have fields for everything - TV shows, movies, music videos and Music! We do not want to populate tags related to music (Such as Artist) in a movie file! As such here are some of the most critical tags for video (TV show and Movie) files.
+
While there are an absolute myriad of tags that one can use, many, if not most of these are unnecessary for video files. Remember that MP4 tags have to have fields for everything - TV shows, movies, music videos and music! We do not want to populate tags related to music (such as Artist) in a movie file. As such here are some of the most critical tags for video (TV show and Movie) files.
  
 
== Title ==
 
== Title ==
Line 81: Line 74:
  
 
== Cover/Picture ==
 
== Cover/Picture ==
Probably the singular greatest benefit to tags is being able to set your own cover image. Don't like the standard cover? Use the collectors Edition or Digital Download cover.
+
For some users, the singular greatest benefit to tags is being able to set your own cover image. Don't like the standard cover? Use the Collectors Edition or Digital Download cover.
  
 
== TV Show Specific Tags ==
 
== TV Show Specific Tags ==
There are three more tags that should be filled in for TV Shows: Show, Season and Episode Number. At the moment these tags do not seem to be of any practical use in Kodi, but should nevertheless be filled out as this may change.
+
There are three more tags that should be filled in for TV Shows: '''Show''' (tvsh), numeric '''Season''' (tvsn) and '''Episode Number''' (tves) and the unique '''Production Code''' (tven).  
 
+
At the moment these tags do not seem to be of any practical use in Kodi, but should nevertheless be filled out as this may change.
  
 
= Supported Tags =
 
= Supported Tags =
  
{{red|are the tags in this table for both mkv and mp4?}}
+
; {{red|are the tags in this table for both mkv and mp4?}}
 
+
: Both MP4 and MKV tags are supported, although they use fundamentally different methods of encoding metadata.
Both MP4 and MKV tags are supported, although they use fundamentally different methods of encoding metadata.
+
; {{red|Is it ok to remove the music related tags? Are they separated accurately?}}
 
+
: n/a
{{red|Is it ok to remove the music related tags? Are they separated accurately?}}
+
; {{red|I cannot find these video related tags in mp3tag}}
 
+
: To get to all the juicy video file related tags in mp3tag, right click on your video file and select "Extended Tags". From here one can see all the tags currently in a file. Add new ones by clicking on the Add button, selecting a Field (what tag to edit) and entering a value. The most critical one in all cases is TITLE, as it seems Kodi will not add a media file if this core tag is missing (and there is no .nfo file).
 
+
: This will also allow you to add the cover artwork.
 
+
; {{red|What format is this- id3, APE, Generic, MP4, other?}}
{{red|I cannot find these video related tags in mp3tag}}
+
: MP4 files use "moov" atoms embedded within the file. These are the same ones used in AAC audio files (such as m4a).
 
+
; {{red|IMDBURL/TMDBURL is this one tag or two separate tags?}}
To get to all the juicy video file related tags in mp3tag, right click on your video file and select "Extended Tags". From here one can see all the tags currently in a file. Add new ones by clicking on the Add button, selecting a Field (what tag to edit" and entering a value. The most critical one in all cases is TITLE, as it seems Kodi will not add a media file if this core tag is missing (and there is no .nfo file).
+
: n/a
 
 
This will also allow you to add the cover artwork.
 
 
 
{{red|What format is this- id3, APE, Generic, MP4, other?}}
 
 
 
MP4 files use "moov" atoms embedded within the file. These are the same ones used in AAC audio files (such as m4a).
 
 
 
{{red|IMDBURL/TMDBURL is this one tag or two separate tags?}}
 
  
 
== MP4 tag options ==
 
== MP4 tag options ==
  
The below table shows the ''mp4tags'' (part of mp4v2) command line options for all standard MP4 tags, Kodi roughly supports the ones applicable to movies.
+
The below table shows the ''mp4tags'' (part of mp4v2) command line (CLI) options for all standard MP4 tags. Kodi roughly supports the ones applicable to movies.
  
 
{| class="prettytable"
 
{| class="prettytable"
|-
+
|+ style="background-color:#a1f5e4;" | Video File Tags
! colspan="4" style="background-color:#a1f5e4;" | Video File Tags
 
 
|+
 
|+
! style="background-color:#f5f5a1; text-align:left; width:050px" | ?
+
!style="background-color:#f5f5a1; text-align:left; width: 10em" colspan=2 | mp4v2 CLI parameter
! style="background-color:#f5f5a1; text-align:left; width:100px" | Tag
+
!style="background-color:#f5f5a1; text-align:left; width: 3em" title="STR = text, NUM = number" | Type
! style="background-color:#f5f5a1; text-align:left; width:050px" | Type
+
!style="background-color:#f5f5a1; text-align:left;" | MP4 field
! style="background-color:#f5f5a1; text-align:left; width:450px" | Description
+
!style="background-color:#f5f5a1; text-align:left;" | Description
 
|-
 
|-
 
| -B
 
| -B
 
| -podcast
 
| -podcast
 +
| pcst
 
| NUM
 
| NUM
 
| Set the podcast flag
 
| Set the podcast flag
Line 129: Line 114:
 
| -c
 
| -c
 
| -comment
 
| -comment
 +
| ©cmt
 
| STR
 
| STR
 
| Set a general comment
 
| Set a general comment
Line 134: Line 120:
 
| -C
 
| -C
 
| -copyright
 
| -copyright
 +
| cprt
 
| STR  
 
| STR  
 
| Set the copyright information
 
| Set the copyright information
Line 139: Line 126:
 
| -e
 
| -e
 
| -encodedby
 
| -encodedby
 +
| ?
 
| STR  
 
| STR  
 
| Set the name of the person or company who encoded the file
 
| Set the name of the person or company who encoded the file
Line 144: Line 132:
 
| -E
 
| -E
 
| -tool
 
| -tool
 +
| ?
 
| STR
 
| STR
 
| Set the software used for encoding
 
| Set the software used for encoding
Line 149: Line 138:
 
| -g
 
| -g
 
| -genre
 
| -genre
 +
| gnre / ©gen
 
| STR
 
| STR
 
| Set the genre name
 
| Set the genre name
Line 154: Line 144:
 
| -G
 
| -G
 
| -grouping
 
| -grouping
 +
| ©grp
 
| STR
 
| STR
 
| Set the grouping name
 
| Set the grouping name
Line 159: Line 150:
 
| -H
 
| -H
 
| -hdvideo
 
| -hdvideo
 +
| hdvd
 
| NUM
 
| NUM
| Set the HD flag (1\0)
+
| Set the HD flag (1/0)
 
|-
 
|-
 
| -i
 
| -i
 
| -type
 
| -type
 +
| stik
 
| STR
 
| STR
| Set the Media Type(tvshow, movie, music, ...)
+
| Set the Media Type (tvshow, movie, music, ...)
 
|-
 
|-
 
| -I
 
| -I
 
| -contentid
 
| -contentid
 +
| cnID?
 
| NUM
 
| NUM
 
| Set the content ID
 
| Set the content ID
Line 174: Line 168:
 
| -j
 
| -j
 
| -genreid
 
| -genreid
 +
| ©gen / gnre?
 
| NUM
 
| NUM
 
| Set the genre ID
 
| Set the genre ID
Line 179: Line 174:
 
| -l
 
| -l
 
| -longdesc
 
| -longdesc
 +
| desc?
 
| STR
 
| STR
 
| Set the long description
 
| Set the long description
Line 184: Line 180:
 
| -m
 
| -m
 
| -description
 
| -description
 +
| desc?
 
| STR
 
| STR
 
| Set the short description
 
| Set the short description
Line 189: Line 186:
 
| -M
 
| -M
 
| -episode
 
| -episode
 +
| tves
 
| NUM
 
| NUM
 
| Set the episode number
 
| Set the episode number
Line 194: Line 192:
 
| -n
 
| -n
 
| -season
 
| -season
 +
| tvsn
 
| NUM
 
| NUM
 
| Set the season number
 
| Set the season number
Line 199: Line 198:
 
| -N
 
| -N
 
| -network
 
| -network
 +
| tvnn
 
| STR
 
| STR
 
| Set the TV network
 
| Set the TV network
Line 204: Line 204:
 
| -o
 
| -o
 
| -episodeid
 
| -episodeid
 +
| tven
 
| STR
 
| STR
 
| Set the TV episode ID
 
| Set the TV episode ID
Line 209: Line 210:
 
| -O
 
| -O
 
| -category
 
| -category
 +
| ©grp?
 
| STR
 
| STR
 
| Set the category
 
| Set the category
Line 214: Line 216:
 
| -p
 
| -p
 
| -playlistid
 
| -playlistid
 +
| ?
 
| NUM
 
| NUM
 
| Set the playlist ID
 
| Set the playlist ID
Line 219: Line 222:
 
| -P
 
| -P
 
| -picture
 
| -picture
 +
|
 
| PTH
 
| PTH
| Set the picture as a .png
+
| Set the picture as a .png, Cover
|-
 
| -r
 
| -remove
 
| STR
 
| Remove tags by code (e.g. "-r cs" removes the comment and song tags)
 
 
|-
 
|-
 
| -S
 
| -S
 
| -show
 
| -show
 +
| tvsh
 
| STR
 
| STR
 
| Set the TV show
 
| Set the TV show
Line 234: Line 234:
 
| -X
 
| -X
 
| -rating
 
| -rating
 +
| rtng
 
| STR
 
| STR
| Set the Rating(none, clean, explicit)
+
| Set the Rating (none, clean, explicit)
 
|-  
 
|-  
 
| -y
 
| -y
 
| -year
 
| -year
 +
| ©day
 
| NUM
 
| NUM
 
| Set the release date
 
| Set the release date
|-
 
|
 
| -help
 
|
 
| Display this help text and exit
 
|-
 
|
 
| -version
 
|
 
| Display version information and exit
 
 
|-
 
|-
 
! colspan="4" style="background-color:#a1f5e4;" | Music File Tags- TO BE REMOVED FROM LIST? or is it used for Music Videos?
 
! colspan="4" style="background-color:#a1f5e4;" | Music File Tags- TO BE REMOVED FROM LIST? or is it used for Music Videos?
Line 261: Line 253:
 
| -A
 
| -A
 
| -album
 
| -album
 +
| ©alb
 
| STR
 
| STR
| Set the album title
+
| Set the album title, use TV Show or Work instead
 
|-
 
|-
 
| -a
 
| -a
 
| -artist
 
| -artist
 +
| ©art
 
| STR
 
| STR
 
| Set the artist information
 
| Set the artist information
Line 271: Line 265:
 
| -b
 
| -b
 
| -tempo
 
| -tempo
 +
| tmpo
 
| NUM
 
| NUM
 
| Set the tempo (beats per minute)
 
| Set the tempo (beats per minute)
Line 276: Line 271:
 
| -d
 
| -d
 
| -disk
 
| -disk
 +
| disk
 
| NUM
 
| NUM
| Set the disk number
+
| Set the disk number, use Season instead
 
|-
 
|-
 
| -D
 
| -D
 
| -disks
 
| -disks
 +
| disk
 
| NUM
 
| NUM
 
| Set the number of disks
 
| Set the number of disks
Line 286: Line 283:
 
| -L
 
| -L
 
| -lyrics
 
| -lyrics
 +
| ©lyr
 
| NUM
 
| NUM
| Set the lyrics
+
| Set the lyrics, Subtitles can be embedded, too
 
|-
 
|-
 
| -R
 
| -R
 
| -albumartist
 
| -albumartist
 +
| aART
 
| STR
 
| STR
 
| Set the album artist
 
| Set the album artist
Line 296: Line 295:
 
| -s
 
| -s
 
| -song
 
| -song
 +
| ©nam
 
| STR
 
| STR
 
| Set the song title
 
| Set the song title
Line 301: Line 301:
 
| -t
 
| -t
 
| -track
 
| -track
 +
| trkn
 
| NUM
 
| NUM
| Set the track number
+
| Set the track number, use Episode Number instead
 
|-
 
|-
 
| -T
 
| -T
 
| -tracks
 
| -tracks
 +
| trkn
 
| NUM
 
| NUM
 
| Set the number of tracks
 
| Set the number of tracks
Line 311: Line 313:
 
| -w
 
| -w
 
| -writer
 
| -writer
 +
| ©wrt
 
| STR
 
| STR
 
| Set the composer information
 
| Set the composer information
Line 316: Line 319:
 
| -z
 
| -z
 
| -artistid
 
| -artistid
 +
|
 
| NUM
 
| NUM
 
| Set the artist ID
 
| Set the artist ID
Line 321: Line 325:
 
| -Z
 
| -Z
 
| -composerid
 
| -composerid
 +
|
 
| NUM
 
| NUM
 
| Set the composer ID
 
| Set the composer ID
Line 327: Line 332:
 
== MKV tag options ==
 
== MKV tag options ==
  
MKV tagging currently does not support the Matroska tagging "spec" to fill library info, rather a Kodi standard NFO file can be embedded into MKV files.
+
MKV tagging currently does not support the Matroska tagging specification to fill library info, rather a Kodi standard NFO file can be ''embedded'' into MKV files.
  
 
* An attachment named '''kodi-metadata''' will be scanned as an embedded .nfo file
 
* An attachment named '''kodi-metadata''' will be scanned as an embedded .nfo file
 
* An attachment named '''kodi-override-metadata''' will be scanned as a url nfo if combined with specifying IMDB/TMDB url. if alone, you get an override nfo
 
* An attachment named '''kodi-override-metadata''' will be scanned as a url nfo if combined with specifying IMDB/TMDB url. if alone, you get an override nfo
 
  
 
= Artwork =
 
= Artwork =

Latest revision as of 20:50, 17 July 2019

Home icon grey.png   ▶ Video library ▶ Video file tagging
Incomplete.png INCOMPLETE:
This page or section is incomplete. Please add information or correct uncertain data which is marked with a ?
Emblem-important-yellow.png NOTICE:
This feature is currently for movies only. TV shows and music videos are not yet supported.
Emblem-important-yellow.png NOTICE:
This page describes an experimental and alternative way of adding movies to the library that is not dependent on file names or online scrapers.
Emblem-important-yellow.png NOTICE:
If you have already named and organized your files using Kodi's naming guidelines, then you can safely ignore this page and go to the next step.
Steps to create your Video Library
Video.png
1. Video Guide Main Page
Prepare the Files
2. Naming & Folder Structure
2.1 Movies
2.2 TV Shows

Creating the Library
3. Add Sources & Scrape
4. Scraping Problems
Modify your Library
5. Update Video Library
6. Library Management
7. Artwork
7.1 Movie
7.2 TV Show
8. NFO Files
8.1 Movie
8.2 TV Show

Safeguard & Rebuild
9. Import-Export Library
10. Rebuild your Video Library
Zappy-frodo.png

Kodi v18 Leia introduces support for embedded video tags using *.mkv and *.mp4 video files. They are similar in principle to the tags saved in audio files. Only limited movie support is available at this time.

1 Benefits of embedded video tags

There are multiple reasons why one would want to use this feature: Media may already contain useful metadata (the reverse however is also true - many files contain "junk" metadata, hence why the feature defaults to off). It gives one more control over the metadata than scrapers do (as scrapers may misclassify media and pull the wrong data). It does away with the need to have .nfo files. Since metadata travels with the media file, there is no longer a need for potentially thousands of these smaller files and can make directory management even easier. Using ultra-high resolution artwork/cover images that looks nicer on newer HD displays. (Pretty pictures!)

1.1 How does it change/differ from the old model?

Kodi has two options for metadata import: using an online scraper or using local information, traditionally in the form of .nfo files. Local tag reading is bundled into the "Local Information" arm, as logically, metadata is still local (i.e not network-drawn) information. Thus, one can still use a combination of .nfo files and embedded information if they choose "Local Information" rather than to use a scraper.

It is important to note however that .nfo files will override embedded information. Not all of Kodi's NFO features are supported by embedded metadata yet, so many users may wish to still use the NFO method. (https://forum.kodi.tv/showthread.php?tid=326340)

1.2 Settings

Kodi settings have the option to enable or disable the reading of video file tags at Settings > Media Settings > Videos > Use video tags. The default setting is disabled.

This page assumes this setting has been enabled.

2 Folder & File Structure

The use of Video File Tags does not absolve you from using the correct Folder and File structure for Movies, TV Shows and Music Videos as detailed in the previous pages.

3 Tagging

Stop hand.png These pages are maintained by the community and should not be considered an endorsement or recommendation. *


Note: User-friendly options for adding and editing embedded metadata may be lacking for your given platform. Be prepared for challenges when going down this path.

3.1 Windows

MP3tag is a Windows-based metadata editor for many different files and tag types, including MP4 and MKV (despite what it's name may suggest). While somewhat complex, it provides very fine-grained control over tagging, and is a worthwhile asset in any media management library.

MetaX is a user-friendly tagging solution. However, it is proprietary and paid ($10). It features much the same core features as MP3tag, but adds an online search functionality to grab metadata from providers such as iTunes, Amazon and others, as well as an autotag feature. This can be useful to people with enormous media collections where the time saved manually tagging justifies the price.

3.2 Mac

MP4 tagging
  • MetaZ is a free and open source metadata lookup and editor for Mac OS.

3.3 Linux

  • mp4v2
  • exiftool

3.4 A note on iTunes

Apple, in their wisdom, have created a subset of MP4 tags that are strictly speaking only meant for use with iTunes. However, most tagging software can read and write these iTunes tags. These tags are also quite useful but will not work with Kodi. Tags include the ability to store Cast (actors), Screenwriter and Director information, as well as age restriction data such as MPAA ratings.

The important point to note here is that just because your tagging software allows you to add these does not mean they will be used. After all, they are unstandardized and were created by Apple solely for use with iTunes and iOS/macOS devices.

4 Core Tags

While there are an absolute myriad of tags that one can use, many, if not most of these are unnecessary for video files. Remember that MP4 tags have to have fields for everything - TV shows, movies, music videos and music! We do not want to populate tags related to music (such as Artist) in a movie file. As such here are some of the most critical tags for video (TV show and Movie) files.

4.1 Title

It seems that Kodi will not import a media file without a valid title in the metadata tag. This makes it the most critical tag of all.

Title also differs from Filename - I may have a file called Blade_Runner_2049_(2017)Withalotofexcessinformation.mp4, But the title value can simply be "Blade Runner 2049". Kodi will then display "Blade Runner 2049).

4.2 Description

This describes the movie/TV Show. A snippet from iTunes' description of Blade Runner 2049 is as follows: "Thirty years after the events of the first film, a new blade runner, LAPD Officer K (Ryan Gosling), unearths a long buried secret that has the potential to plunge what’s left of society into chaos."

Descriptions thus actually describe the character or basic plot of a movie or TV Show. These will be displayed in Kodi when the file is selected.

Best practice at this point seems to be to mirror the Long Description and Short Description, as there does not seem to be any practical distinction between the two.

When using this tag with TV Shows, every episode can be individually described according to the plot of that particular episode.

4.3 Content Type

In MP4 there should be four choices: Music, Music Video, Movie and TV Show. The choice does not seem to matter at this point as Kodi can not distinguish files based on this tag, but rather relies on the manual setting when the directory was added. It might be useful to set this properly when tagging however, as a future change to allow Kodi to distinguish these tags may prove invaluable.

4.4 Cover/Picture

For some users, the singular greatest benefit to tags is being able to set your own cover image. Don't like the standard cover? Use the Collectors Edition or Digital Download cover.

4.5 TV Show Specific Tags

There are three more tags that should be filled in for TV Shows: Show (tvsh), numeric Season (tvsn) and Episode Number (tves) and the unique Production Code (tven). At the moment these tags do not seem to be of any practical use in Kodi, but should nevertheless be filled out as this may change.

5 Supported Tags

are the tags in this table for both mkv and mp4?
Both MP4 and MKV tags are supported, although they use fundamentally different methods of encoding metadata.
Is it ok to remove the music related tags? Are they separated accurately?
n/a
I cannot find these video related tags in mp3tag
To get to all the juicy video file related tags in mp3tag, right click on your video file and select "Extended Tags". From here one can see all the tags currently in a file. Add new ones by clicking on the Add button, selecting a Field (what tag to edit) and entering a value. The most critical one in all cases is TITLE, as it seems Kodi will not add a media file if this core tag is missing (and there is no .nfo file).
This will also allow you to add the cover artwork.
What format is this- id3, APE, Generic, MP4, other?
MP4 files use "moov" atoms embedded within the file. These are the same ones used in AAC audio files (such as m4a).
IMDBURL/TMDBURL is this one tag or two separate tags?
n/a

5.1 MP4 tag options

The below table shows the mp4tags (part of mp4v2) command line (CLI) options for all standard MP4 tags. Kodi roughly supports the ones applicable to movies.

Video File Tags
mp4v2 CLI parameter Type MP4 field Description
-B -podcast pcst NUM Set the podcast flag
-c -comment ©cmt STR Set a general comment
-C -copyright cprt STR Set the copyright information
-e -encodedby  ? STR Set the name of the person or company who encoded the file
-E -tool  ? STR Set the software used for encoding
-g -genre gnre / ©gen STR Set the genre name
-G -grouping ©grp STR Set the grouping name
-H -hdvideo hdvd NUM Set the HD flag (1/0)
-i -type stik STR Set the Media Type (tvshow, movie, music, ...)
-I -contentid cnID? NUM Set the content ID
-j -genreid ©gen / gnre? NUM Set the genre ID
-l -longdesc desc? STR Set the long description
-m -description desc? STR Set the short description
-M -episode tves NUM Set the episode number
-n -season tvsn NUM Set the season number
-N -network tvnn STR Set the TV network
-o -episodeid tven STR Set the TV episode ID
-O -category ©grp? STR Set the category
-p -playlistid  ? NUM Set the playlist ID
-P -picture PTH Set the picture as a .png, Cover
-S -show tvsh STR Set the TV show
-X -rating rtng STR Set the Rating (none, clean, explicit)
-y -year ©day NUM Set the release date
Music File Tags- TO BE REMOVED FROM LIST? or is it used for Music Videos?
 ? Tag Type Description
-A -album ©alb STR Set the album title, use TV Show or Work instead
-a -artist ©art STR Set the artist information
-b -tempo tmpo NUM Set the tempo (beats per minute)
-d -disk disk NUM Set the disk number, use Season instead
-D -disks disk NUM Set the number of disks
-L -lyrics ©lyr NUM Set the lyrics, Subtitles can be embedded, too
-R -albumartist aART STR Set the album artist
-s -song ©nam STR Set the song title
-t -track trkn NUM Set the track number, use Episode Number instead
-T -tracks trkn NUM Set the number of tracks
-w -writer ©wrt STR Set the composer information
-z -artistid NUM Set the artist ID
-Z -composerid NUM Set the composer ID

5.2 MKV tag options

MKV tagging currently does not support the Matroska tagging specification to fill library info, rather a Kodi standard NFO file can be embedded into MKV files.

  • An attachment named kodi-metadata will be scanned as an embedded .nfo file
  • An attachment named kodi-override-metadata will be scanned as a url nfo if combined with specifying IMDB/TMDB url. if alone, you get an override nfo

6 Artwork

For MKV you can have embedded images. currently limited to:

  • 'small_cover.png' or 'small_cover.jpg' for thumbnails
  • 'cover.png' or 'cover.jpg' for posters
  • 'fanart.png' or 'fanart.jpg' for fanart

'poster' images can be embedded in MP4 files.

Return to top


Next step: Add Source & Scrape