User:Karellen/scratchpad01: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 157: Line 157:


<section begin="TagTable" />
<section begin="TagTable" />
{| class="wikitable"
{| class="wikitable sortable" style="text-align:center;"
|-
! style="text-align:left;"| Kodi Version
! style="text-align:left;"| Kodi Version
! Vorbis (.Flac)
! Vorbis (.Flac)

Revision as of 00:53, 29 September 2017

Steps to create your Music Library
Nuvola apps kscd.png
1. Guide Main Page
2. Music Settings
3. Music File Tagging
4. Scanning Music Into Library
5. Artist information folder
6. Scraping Additional Music data

7. Update Music Library
8. NFO Files
8.1 Music NFO Files
9. Artwork
9.1 Music Artwork


10. Import-export library
10.1 Music Import-Export
11. Backup & Recover
Zappy.png


Introduction

This page provides the following information:

  • How the Music section differs from the Video section of Kodi
  • The recommended method to tag your music files
  • The Music File Tags that Kodi reads and uses


Understanding the Music Library

The Music section of Kodi has many differences to the Video section of Kodi. It is important that you read this section to ensure your music and artwork are correctly scraped and displayed.

It is important to understand the fundamental difference between video library operation and the music library operation:

  • The video library is based on using the filenames to obtain online data. If the video files are incorrectly named, then there are no scraper results and there will be no library entry.
  • The music library is based on scanning tags embedded in the music files. It ignores the folder structure and file names you have created to store your music files. Basic and correct tagging is essential to ensure the library is populated correctly. Having slight variations in the tags for artist and album names could mean duplicated and unwanted entries.


Ever wonder how your music player always knows the name of the song, album, artist and track number of the music you play? This information comes from metadata embedded in the music file. If you purchased your music from an online store, then that store would have embedded the metadata in the file. If you ripped your own music, then the ripping software would have embedded the data into the file, probably without you even knowing. It is not uncommon that only minimal metadata is embedded, but this works very well on simple music players and is a convenient solution to sorting your library on these players.

Kodi also makes use of this embedded metadata. Kodi, being an advanced and feature rich player, requires a greater precision in the embedded tags. Any slight variance in, for example, the Album name between the tracks from the same album will see multiple entries in the library for that Album. Same with Artists. It is not uncommon to have a single album split into three similarly named albums. It is for this reason that there is a separation of the Scanning and Scraping processes in Kodi. The initial scan allows you to find and correct errors in tagging, before scraping. Failing to do that will create an unmanageable library.

Example of errors in tagging, which will cause duplicated entries in the library...

Similar Name 1 Similar Name 2 Note
György Ligeti Gyorgy Ligeti Accented and unaccented names will create duplicate entries
The Best of The Very Best Of Inconsistent naming will cause duplicated entries
Adam and the Ants Adam and the Antz Spelling mistakes will cause duplicated entries


MusicBrainz

MusicBrainz is an open source music encyclopedia that collects music metadata and makes it available to the public. MusicBrainz has a database that, as of Sept 2017, consists of over 1,258,860 Artists, over 1,866,600 albums and over 17,846,800 recordings.

MusicBrainz Picard is the music file tagger that can access the MusicBrainz database to locate metadata to embed into your music files. There are other Taggers that are able to access the MusicBraniz database, but Picard seems to be friendliest to use. It is recommended that your music collection is correctly tagged using the tagging software MusicBrainz Picard. This is a free download.

Below is a screenshot of the main screen of the Picard software. A brief description of the layout as follows:

  • Top Left Box- Directory listing of your music collection
  • Top Centre Box- Albums are dragged and dropped here in preparation for matching and tagging. Pressing Lookup (greyed out) will commence the lookup process
  • Top Right Box- Matching albums are displayed here and your songs are overlayed. In the screenshot, songs 01, 08 and 09 have been matched to the suggested album. If all songs match and you agree the correct album was located, simply pressing Save will tag the album with the tags displayed in the Bottom Tag Box.
  • Bottom Tag Box - Selecting a song from the Top Right Box will display all available tag fields (left column), the current tags in the music file (Original Value) and the MusicBrainz tags to be embedded in the music file (right column).

It is important to note that a lot of music is distributed with only the basic metadata embedded, as can be clearly seen in the screenshot below.

The example in the image below clearly shows the following:

  • Most tags are missing
  • The top three yellow entries are incorrect (original value column) and the corrections are in the right column
  • The green entries in the right column indicate new tags to be embedded
  • The black entries at the bottom of the list indicate no change to the existing tags as they are correct.

Although Kodi will populate the library with those minimal tags, the errors in those tags would create havoc in the library.

Further information and guides can be found at the MusicBrainz Picard site.


MusicBrainzPicard01.jpg


Although Picard is very easy to use, you must avoid blindly accepting everything offered by the software. It is important that you confirm the correct album was located. Due to the global nature of the database, there are many releases for a single album. These releases differ between countries, usually caused by copyright issues, and you may inadvertendly select the incorrect release for your album, even though it is named exactly the same. The differences between releases may be as simple as different song ordering or additional bonus tracks included.

Once the music files are tagged, it is important to avoid modifying the MusicBrainz tags unless you clearly understand the relationship of the MBID's and the other related tags. For example, embedding MBID tags, but then editing the Artist or Album Artist tags by changing the number of artists without editing the MBID tags will result in incorrect entries in the library.

See: MusicBrainz Website
See: MusicBrainz Picard Software


The information in the remainder of this page is provided for technical interest and reference only. It can be safely disregarded if you have no technical interest in Music File Tagging


Next step: Scanning Music Into Library


Technical Explanation: File tags

For many categories, such as genres and artists, Kodi supports multiple values in the one field. By default it uses the character sequence " / " to divide the entry into multiple values. This divider may be changed via advancedsettings.xml.


Artist Tags - Resolving Compilations and Multiple Artists

Kodi reads the Album Artist tag in ID3, Ogg, APE and MP4 tags and uses it if available to assign an artist to the album (independently of the track's artist information). This is the "Album Artist" tag (in ID3 this is represented by the "TPE2" tag; in vorbiscomment (ogg) files "ALBUMARTIST", "ALBUM ARTIST" and "ENSEMBLE" are all supported). Multiple artists for either a track or album artist can be specified in "Artist1 / Artist2 / Artist3" format.

If no Album Artist tag exists, Kodi will use the first (primary) artist from the tracks as the Album Artist. Essentially we do a string comparison of all the track artists, and assign the common artists as the Album artist. This is generally the TPE1 tag in ID3.

As many users don't yet use the Album Artist tag, Kodi has an additional filter system for identifying compilation albums, where each track normally has a different artist. As Kodi scans a folder, it does the following:

  1. Identifies albums based on Album name alone in the folder and groups the songs that have the same Album name together as an album.
  2. Runs through each album's assigned songs. If there is 2 or more tracks with the same Track number, the group of songs must come from 2 or more albums, so the Album name is ruled out as a possible compilation.
  3. If any of the songs assigned to the Album name have an Album Artist tag, then Kodi assumes the user knows what they're doing, and this album is also ruled out from being a compilation.
  4. If two or more songs assigned to the Album name then have different primary artists, then the Album name is considered to be a group of songs from a compilation, and the Various Artists" tag is assigned as the album artist.
  5. Otherwise, if all the songs have the same primary artist but don't have the same full artist list (eg a song or two has an additional artist) then the album is assigned the primary artist as it's Album Artist, and we assume the additional artists are guest artists.


Ratings in ID3 tags

Ratings in ID3 tags are read via the POPM field, and (if this doesn't exist) in a custom (TXXX) field named "RATING". For the RATING field, we accept 1-5 as valid ratings. For the POPM field things are more complicated, as there is no established standard in place. We currently most closely respect what Mediamonkey does, and also have some support for what Windows Media Player 11 does. The POPM tag takes a value from 0..255, with 0 meaning no rating, 1 the worst, and 255 the best. We currently map these as follows:

POPM value

Star rating

0

1

* This is a special case for Windows Media Player

2-8

9-49

*

50-113

**

114-167

***

168-218

****

219-255

*****


Tags Kodi reads

The music library is created by scanning metadata that is embedded in the music files, not by looking at the file names or the folders they are located in.

Kodi will scan the following tags embedded in the music file.


Kodi Version Vorbis (.Flac) ID3v2 (.mp3) APE MP4 ASF
v16 ARTIST TPE1 ARTIST \251ART Author
v16 ARTISTS ARTISTS ARTISTS ----:com.apple.iTunes:ARTISTS
v16 ALBUMARTIST or ALBUM ARTIST TPE2 OR ALBUMARTIST or ALBUM ARTIST ALBUMARTIST or ALBUM ARTIST aART WM/AlbumArtist
v16 ALBUMARTISTS or ALBUM ARTISTS ALBUMARTISTS or ALBUM ARTISTS ALBUMARTISTS or ALBUM ARTISTS ----:com.apple.iTunes:ALBUMARTISTS
v16 ALBUM TALB ALBUM \251alb WM/AlbumTitle
v16 TITLE TIT2 TITLE \251nam
v16 TRACKNUMBER TRCK TRACKNUMBER or TRACK trkn WM/TrackNumber or WM/Track
v16 DISCNUMBER TPOS DISCNUMBER or DISC disk WM/PartOfSet
v16 YEAR TYER YEAR \251day WM/Year
v16 DATE TDRC, TDRL DATE
v16 GENRE TCON GENRE \251gen WM/Genre
v16 MOOD TMOO OR TXXX:MOOD MOOD ----:com.apple.iTunes:MOOD WM/Mood
v16 COMMENT COMM COMMENT \251cmt (COMMENT)
v16 CUESHEET CUESHEET
v16 COMPILATION TCMP COMPILATION cpil
v16 LYRICS USLT LYRICS
v16 REPLAYGAIN_TRACK_GAIN REPLAYGAIN_TRACK_GAIN REPLAYGAIN_TRACK_GAIN ----:com.apple.iTunes:replaygain_track_gain replaygain_track_gain
v16 REPLAYGAIN_ALBUM_GAIN REPLAYGAIN_ALBUM_GAIN REPLAYGAIN_ALBUM_GAIN ----:com.apple.iTunes:replaygain_album_gain replaygain_album_gain
v16 REPLAYGAIN_TRACK_PEAK REPLAYGAIN_TRACK_PEAK REPLAYGAIN_TRACK_PEAK ----:com.apple.iTunes:replaygain_track_peak replaygain_track_peak
v16 REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_PEAK ----:com.apple.iTunes:replaygain_album_peak replaygain_album_peak
v16 REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_PEAK ----:com.apple.iTunes:replaygain_album_peak replaygain_album_peak
v16 MUSICBRAINZ_ARTISTID MUSICBRAINZ ARTIST ID MUSICBRAINZ_ARTISTID ----:com.apple.iTunes:MusicBrainz Artist Id MusicBrainz/Artist Id
v16 MUSICBRAINZ_ALBUMARTISTID MUSICBRAINZ ALBUM ARTIST ID MUSICBRAINZ_ALBUMARTISTID ----:com.apple.iTunes:MusicBrainz Album Artist Id MusicBrainz/Album Artist Id
v16 MUSICBRAINZ_ALBUMARTIST MUSICBRAINZ ALBUM ARTIST MUSICBRAINZ_ALBUMARTIST ----:com.apple.iTunes:MusicBrainz Album Artist MusicBrainz/Album Artist
v16 MUSICBRAINZ_ALBUMID MUSICBRAINZ ALBUM ID MUSICBRAINZ_ALBUMID ----:com.apple.iTunes:MusicBrainz Album Id MusicBrainz/Album Id
v16 MUSICBRAINZ_TRACKID UFID MUSICBRAINZ_TRACKID ----:com.apple.iTunes:MusicBrainz Track Id
v16 RATING POPM
v16 METADATA_BLOCK_PICTURE or COVERART or COVERARTMIME APIC covr WM/Picture
v17 COMPOSER TCOM COMPOSER \251wrt WM/Composer
v17 CONDUCTOR TPE3 CONDUCTOR ----:com.apple.iTunes:CONDUCTOR WM/Conductor
v17 LYRICIST TEXT LYRICIST ----:com.apple.iTunes:LYRICIST WM/Writer
v17 REMIXER or MIXARTIST TPE4 REMIXER or MIXARTIST ----:com.apple.iTunes:REMIXER WM/ModifiedBy
v17 ENSEMBLE (TIPL) or TXXX:Ensemble ENSEMBLE
v17 ARRANGER (TIPL) ARRANGER
v17 ENGINEER (TIPL) ENGINEER ----:com.apple.iTunes:ENGINEER WM/Engineer
v17 PRODUCER (TIPL) PRODUCER ----:com.apple.iTunes:PRODUCER WM/Producer
v17 DJMIXER (TIPL) DJMIXER ----:com.apple.iTunes:DJMIXER WM/DJMixer
v17 MIXER (TIPL) MIXER ----:com.apple.iTunes:MIXER WM/Mixer
v17 PERFORMER TMCL PERFORMER
v17 LABEL TPUB LABEL ----:com.apple.iTunes:LABEL WM/Publisher
v17 RELEASETYPE MUSICBRAINZ ALBUM TYPE MUSICBRAINZ_ALBUMTYPE ---:com.apple.iTunes:MusicBrainz Album Type MusicBrainz/Album Type



Audio Formats & Tags

MusicBrainz Picard supports the following Audio File and Tag Formats

Audio file format Data compression Metadata container
AAC Lossy iTunes MP4
Apple Lossless Lossless iTunes MP4
FLAC Lossless Vorbis comment
Monkey's Audio Lossless APEv2 tag
MP3 Lossy ID3
Musepack Lossy APEv2 tag
Ogg Vorbis Lossy Vorbis comment
OptimFROG Lossless APEv2 tag
Opus Lossy Vorbis comment
Speex Lossy Vorbis comment
TTA Lossless ID3
WAV Lossless N/A
WavPack Lossless APEv2 tag
Windows Media Audio Lossy ASF


Return to top


Next step: Scanning Music Into Library