Difference between revisions of "Music tagging"

From Official Kodi Wiki
Jump to: navigation, search
(Explanation of Music importing options)
m (Tags {{kodi}} reads: add MUSICBRAINZ_RELEASEGROUPID tag)
(34 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{mininav| [[Music library]] }}
+
{{MusicLibraryCreate}}
 +
{{mininav|[[Music library]]}}
  
<section begin="intro" />
 
  
Starting in v16 "Jarvis", Kodi will ask the user who adds any file music source, if it should be imported.
+
= Introduction =
 +
This page provides the following information:
  
We recommend you say yes to this prompt as the Kodi Music library has many extra features that help with music navigation, metadata and artwork retrieval.
+
*How the Music section differs from the Video section of {{kodi}}
 +
*The recommended method to organise your music files
 +
*The recommended method for tagging your music files
 +
*Explanation of some commonly misunderstood Music File Tags
 +
*The Audio Files and Tags that {{kodi}} reads and uses
  
Once the music is imported in Kodi's library, you can start to organize and browse music in all kinds of awesome ways. We have chart views, artist, genre, and many other views. Starting from v15 "Helix" you can also create your own custom music nodes just like smart playlists. For example you can now create an A-Z artist view, or all music from the 2000's. See [[Music nodes]] for a guide.
 
  
<section end="intro" />
 
== Explanation of Music importing options ==
 
  
 +
= Understanding the Music Library =
 +
<section begin="understanding" />There is a fundamental differences between video library operation and the music library operation:
 +
*The video library is based on using the filenames or folder names to obtain online data. If they 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 names and structure and file names. Proper 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.<section end="understanding" />
  
The first thing we need to do is go to System >> Settings >> Music >> Library
 
  
And look at the options available:
 
  
[[File:Music-Library-settings.jpg]]
+
= Folder and File Structure =
 +
Although {{kodi}} ignores the folder structure and the names of the folders and files, the structure of your folders is important as it affects the operation of other functions such as Import/Export, nfo files and Artwork. For example, if you have all your music files in one folder (which is possible), then you lose the ability to use local nfo files, local artwork, and the import/export module will not function correctly.
  
 +
The following is {{kodi}} '''best practice'''. Remember use a layout that is nice for you, but '''tag accurately.'''
  
'''Include Artists who appear only on compilation albums'''
 
  
Turning this option on will show many more artists than you would normally like to see as it will include any "extra" artists found on an album. An example could be an album by a band, with 1 track that has a collaboration with a rapper on 1 song. It can also include VA albums. The option is triggered if more than 1 artist is found on an album. Basically you will normally want to turn this option off if you want a nice clean Artists view. You can always go to the compilations node to see the albums and artists that are missing.
 
  
 +
== Files ==
 +
Song files require suitable tagging for use in {{kodi}}. While {{kodi}} can scan minimal tags into the library, it can lead to errors in the library and subsequent scraping. We recommend music files are tagged with MusicBrainz as detailed below.
  
'''Fetch additional information during updates'''
+
Remember that {{kodi}} does not extract any information from the filename, so the filename is your choice.
  
This option will grab extra metadata and artwork for artists and albums from online sites (or local NFO files). Since we are a media centre and this kind of stuff is great, we recommend you turn this option on. It will download lots of things with scrapers such as artist biographies, moods, artist thumbnails, album artwork etc. However if you have a large music collection it can take some time, and you have to be confident that your files are well tagged first.
 
  
  
'''Prefer online information'''
+
== Folders ==
 +
{{kodi}} is quite flexible with the folder structure. The diagram below is an '''example'''. You should group your albums in a manner that makes sense to you.
  
This option will overide some of the artist and album data, that was initially derived from the tags in your song files, with information it finds online. The song files themselves are not changed in any way, just the data in the library. Providing that the scraper can uniquely identify the artist or album, this could be used to compensate for minimal tagging, but if you have tagged your music well it is better to let them take precedence, hence we recommend you switch it off normally. This makes it easy to tag your music files and know exactly how they will show up in Kodi. It also makes it easy to change data by simply editing the id3 tag.
+
To ensure {{kodi}} and other add-on processes can function efficently and correctly, the following is recommended.
 +
*Songs from the same album should be in the one folder
 +
*If there is more than one disk in the release, each disk should be in a sub-folder containing the songs from that disk
  
  
'''Scraper selection'''
+
The following is a typical folder structure:
  
This option lets you choose a scraper to grab metadata such as artist biographies, and artwork such as pictures or artists. Kodi uses 2 scrapers here, one for the artist, and another for the albums. The difference being the album scraper is able to grab cover-art and album descriptions, genres and reviews. We recommend you stick with the universal scraper here, which will use the MusicBrainz API to search and a number of different sites such as Fanart.tv, TheAudioDB.com and Allmusic to grab the additional data. Since some of these sites are open, it is possible to add information to these sites and scrape the new data from them instantly.
+
f:\  ....................................(root)
 +
  |__Artist Information  ..................(Artist Information Folder)
 +
  |
 +
  |__Artist Music  .......................(source folder)
 +
  |  |__ Madonna  ........................(artist folder)
 +
  |  |  |__ Beautiful Stranger (1999)  ..(album folder)
 +
  |  |  |  |__ Song 1
 +
  |  |  |  |__ Song 2
 +
  |  |  |  |__ Song 3 etc
 +
  |  |  |__ Bedtime Stories (1994)  .....(album folder)
 +
  |  |  |  |__ Song 1
 +
  |  |  |  |__ Song 2
 +
  |  |  |  |__ Song 3 etc
 +
  |  |  |__ Like A Prayer (1989)  .......(album folder)
 +
  |  |  |  |__ Song 1
 +
  |  |  |  |__ Song 2
 +
  |  |  |  |__ Song 3 etc
 +
  |  |__ Simply Red  .....................(artist folder)
 +
  |      |__ Picture Book (1985)  ........(album folder)
 +
  |          |__ Song 1
 +
  |          |__ Song 2
 +
  |          |__ Song 3 etc
 +
  |
 +
  |__Compilations  .......................(Source)
 +
  |  |__ Essential Eighties  .............(album folder)
 +
  |  |      |__ Song 1
 +
  |  |      |__ Song 2
 +
  |  |      |__ Song 3 etc
 +
  |  |__ 100% Hits- Best of 2005  ........(album folder)
 +
  |          |__ Song 1
 +
  |          |__ Song 2
 +
  |          |__ Song 3 etc
 +
  |
 +
  |__Classical  ..........................(Source)
 +
  |
 +
  |__Audiobooks  .........................(Source)
  
== Tagging with MusicBrainz Picard ==
 
  
  
OK.. lets get one thing straight before we start. Kodi uses the Musicbrainz Artist and Album ID's to do all its metadata lookups. If you have these tags present in your music files then Kodi does not need to do a name search on your music which could introduce errors. This means that the chances of accurate artwork and metadata retrieval will be hugely increased. To date, the only bit of tagging software that can add these tags is MusicBrainz Picard so thats what we are going to use in this example. Thankfully, once its installed it takes about 4 clicks to tag something perfectly as the tagger app is based on online lookups.
+
== Sources ==
 +
A source folder contains your media collection- in this case Music. This folder is then set as a Source in {{kodi}} which enables {{kodi}} to access your Music.  
  
 +
In the diagram from the previous section ''Artist Music, Compilations, Classical'' and ''Audiobooks'' are Sources.
  
'''NOTE''': That's not to say the old method of tagging files(with software like MP3tag http://www.mp3tag.de/en/ or MediaMonkey http://www.mediamonkey.com/) with accurate Artist and Album naming doesn't work. We just have a better way these days. Ultimately this method still uses the MusicBrainz ID to lookup metadata and artwork, you are just relying on the musicbrainz NameSearch API.
+
Setting and Scanning of Sources is covered in detail in the next step of the guide.  
  
  
So with that said, lets look at how to tag an album in Picard to be imported in Kodi.
 
  
Install (https://picard.musicbrainz.org/) then open Picard . Lets try to Auto Tag an Album:
+
= Tagging =
 +
Most music files purchased or ripped by your favourite software have only minimal metadata embedded. Normally this is not a problem and works very well on simple music players.
 +
<br /><br />
 +
{{kodi}}, being an advanced and feature rich player, requires greater accuracy with 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. It is not uncommon to have a single album split into three similarly named albums. Also true for Artists. It is for this reason that there is a separation of the Scanning and Scraping processes for Music. The initial scan allows you to find and correct errors in tagging, before scraping.
 +
<br /><br />
 +
This table has examples of errors in tagging, which will cause duplicated entries in the library...
 +
 
 +
{|class="prettytable"
 +
!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 between songs of the same album and/or artist will cause duplicated entries
 +
|-
 +
|Madonna || Madonnna || Spelling mistakes will cause duplicated entries for albums and/or artists
 +
|-
 +
|Sting || Sting and The Police || Seen as two separate and unrelated Artists
 +
|}
 +
 
 +
As {{kodi}} scans your music collection, it copies the data contained in those tags into the {{kodi}} music database. The benefits of this are:
 +
*Once the scan is complete, the tags are not accessed again
 +
*All information is now obtained from the database. This has the benefit of dramatically increasing efficency and speed when navigating the library.
 +
*Now that a database entry exists, you are able to scrape additional information from online sources. This is covered later in the guide.
 +
 
 +
 
 +
 
 +
== MusicBrainz ==
 +
'''{{kodi}} has strong support for MusicBrainz tagging. It is highly recommended that users tag their music files using MusicBrainz Picard.'''
 +
 
 +
'''MusicBrainz Picard''' is the music file tagger software that can access the MusicBrainz database to locate metadata to embed into your music files. MBIDs are useful because names are not unique. The bigger and more diverse your music collection is, the more likely you will encounter Artists with the same name.
 +
 
 +
The advantages of tagging with MusicBrainz are:
 +
*They allow you to have different artists with the same name in your library e.g. "John Williams" the classical guitarist and "John Williams" the film music composer and conductor.
 +
*They negate inconsistencies in artist naming e.g. having "Peter Tchaikovsky" on some albums and "Piotr Czajkowski" on others
 +
*They allow you to have more than one release of an album in your library e.g. the normal and deluxe editions of an album
 +
*They clearly identify the artist and album in ways that names alone can not. This can then be used to accurately scrape additional artist and album information and locate the correct artwork
 +
*They allow the scraping process to be more efficient, otherwise an extra call is made to try and get an mbid first to use at the scraping sites, and each request from Musicbrainz must be throttled to 1 per sec which will slow the scraping process.
 +
 
 +
 
 +
Below is a screenshot of the main screen of the Picard software. A brief description of the layout as follows.
 +
 
 +
*Top Left Box- Folder 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 column) and the MusicBrainz tags to be embedded in the music file (right column).
 +
 
 +
The example in the image below shows the following:
 +
*Most tags are missing (original value column)
 +
*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 or not used by MusicBrainz.
 +
 
 +
 
 +
<gallery mode="packed" widths="1000px" heights="563px">
 +
File:MusicBrainzPicard01.jpg
 +
</gallery>
 +
 
 +
 
 +
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 due to copyright requirements. This may lead you to 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 the inclusion of additional bonus tracks.
 +
 
 +
For the best tagging experience set the correct options in Picard, particularly the "Clear Existing Tags" option in settings. This option means that any old tags that may cause issues are wiped, preserving only the musicbrainz tagging. It will also be wise to tag using ID3v2.4 compatibility.
 +
 
 +
<gallery mode="packed" widths="500px" heights="283px">
 +
File:Picard options.jpg
 +
</gallery>
 +
 
 +
 
 +
== albumartists ==
 +
{{Kodi}} requires the '''albumartists''' tag to correctly handle multiple album artists on the same album. This tag is not a default tag in MusicBrainz Picard and other tagging software. <ref> https://forum.kodi.tv/showthread.php?tid=334729&pid=2760161#pid2760161 </ref>
 +
 
 +
To include this tag add a new script under ''Options > Options > Scripting > Add new script'' and include the following code...
 +
<syntaxhighlight lang="xml">
 +
$setmulti(albumartists,%_albumartists%)
 +
</syntaxhighlight>
 +
 
 +
<gallery mode="packed" widths="500px" heights="283px">
 +
File:Picard Script.JPG
 +
</gallery>
 +
 
 +
 
 +
Once the music files are tagged, 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 tag or Album Artist tag will result in incorrect entries in the library.
 +
 
 +
For example:
 +
*If you need to change the artist or album artist tag you also have to edit the matching artist mbid tag and album artist mbid tag.
 +
*If Kodi finds a release mbid it will expect the artist mbid tags to also be present.
 +
 
 +
 
 +
:'''''See: [https://musicbrainz.org/ MusicBrainz Website]'''''
 +
:'''''See: [https://picard.musicbrainz.org/ MusicBrainz Picard Software]'''''
 +
 
 +
 
 +
 
 +
----
 +
<center>{{red|'''The remainder of this page deals with special use cases or provides information for technical interest and reference only. It can be safely disregarded if these do not apply to you'''}}</center>
 +
----
  
  
1) Click the Add folder icon in the top left of the toolbar and select the folder the album is in.
 
  
 +
<div style="{{linear-gradient|left|#f5d3ff, #12b2e7}}">{{next|[[Adding_music_to_the_library|Scanning Music into Library]]}} </div>
  
2) Click the "Cluster" button (this brings all the files together so picard knows its a single album).
 
  
  
3) Now click "Lookup". You should now see the album on the right hand side box. (Picard has basically preformed an online search for your music on the MB site and selected what it thinks is the album)
+
= Ripping CD's =
 +
{{main|Ripping CDs}}
 +
{{#lst:Ripping CDs|intro}}
  
 +
There is no requirement to use the {{Kodi}} CD Ripper. If you are comfortable using other ripping software, then we recommend you continue using that software.
  
4) Assuming its found the correct album, thats basically it. All you need to do is click save and Picard will save a whole wealth of new tags in your music.
 
  
  
Lets now look at those tags:
+
= Cue Sheets =
 +
{{#lst:Cue_sheets|intro}}
  
 +
{{kodi}} does provide basic support for using cue sheets to define individual tracks when an entire CD has been ripped into a single music file. However the information provided by  the cue sheet standard is much more limited than that of standard tagging, hence to enjoy the full music library features it is recommended that tracks are ripped into separate files and fully tagged.
 +
<br />
 +
{{red|If you do not use Cue Sheets you can safely move onto the next step.}}
 +
<br />
 +
;{{see also|Cue_sheets}}
  
[[File:Picard1.jpg]]
 
  
  
Now lets click on a file that has 2 artists collaborating. In this case its track number 3
+
= Streams =
 +
{{#lst:Internet_video_and_audio_streams|intro}}
  
'''03-50_cent-patiently_waiting_ft._eminem.flac'''
+
;{{see also|Internet_video_and_audio_streams}}
  
  
[[File:Picard2.jpg]]
 
  
So this song has 2 artists "50 Cent" and "Eminem".  
+
= 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]].
  
As you can see it has them listed in the ARTISTS tag.
 
  
This is very important as Kodi will now have 2 artists on the album and treat it as a compilation release.
+
== Resolving Compilations and Multiple Artists ==
 +
{{red|Applies to v17 and below. v18 introduced the [[Artist information folder]] which solved these problems. You are encouraged to update to v18}}
  
 +
{{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.
  
[[File:Picard3.jpg]]
+
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.
  
And if we look further down the list, we can see the release has lots of MBID's now that Kodi can use for online lookups.
+
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:
 +
# Identifies albums based on ''Album'' name alone in the folder and groups the songs that have the same ''Album'' name together as an album.
 +
# 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.
 +
# 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.
 +
# 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.
 +
# 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.
  
That's basically it, picard makes music tagging incredibly easy and quick.
 
  
NOTE: Picard works by using drag and drop a lot. If it misidentifies a track or release, try dragging it onto a track to match it up. You can also right click on the album >> other verions. To select the correct release.
 
  
== Importing into Kodi ==
+
== 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:
 +
 
 +
{| class="prettytable"
 +
|-
 +
!'''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 ||'''*****'''
 +
|}
  
Lets now add this folder as a source in Kodi and scan in it into the library.
 
  
Go to:
 
  
Kodi >> Music >> Files >> Add Music >> Select the album folder (or your music folder if you have many albums) >> Scan to library when prompted.
+
= Audio Formats & Tags =
  
Assuming you have the options to search online for metadata enabled, Kodi will now scan the tags, and lookup and additional bits of artwork and metadata.
 
  
  
[[File:Kodimusicimport1.jpg]]
+
== Supported Audio Formats ==
 +
Although the list of playable formats is quite comprehensive, it is not accurate to say that every {{kodi}} installation will play every format. The ability to play some of the more obscure formats will depend upon the version of {{kodi}} and the operating system in use. Some formats will require the installation of add-ons.
  
 +
{{#lst:Advancedsettings.xml|musicextensions}}
  
You can now browse the library by artist, album or via many different views.
+
;{{See also|Advancedsettings.xml}}
  
  
[[File:Kodimusicimport2.jpg]]
 
  
 +
== Supported Metadata Containers ==
 +
The following metadata containers are supported by {{kodi}}
  
All artwork, artist biographies and details are now imported into kodi's library.
+
{| class="prettytable"
 +
|-
 +
! Metadata Container || Note
 +
|-
 +
|[[wikipedia:APEv2 tag|APEv2 tag]] ||
 +
|-
 +
|[[wikipedia:Advanced_Systems_Format|ASF]] ||
 +
|-
 +
|Generic Tag || A generic tag for basic data from other odd file types
 +
|-
 +
|[[wikipedia:ID3|ID3]] || v1, v2.3 and v2.4
 +
|-
 +
|[[wikipedia:MPEG-4 Part 14#Metadata|MP4]] ||
 +
|-
 +
|[https://xiph.org/ Xiph.org] || Vorbis Comments
 +
|}
  
  
You can see the biography and additional details by selecting an artist in the Artists view, and hitting the info button ("i" on the keyboard).
 
  
 +
== Common File & Tag Combination ==
 +
You will notice that not all the tags listed in the section ''Supported Audio Formats'' above are listed in the following table. Those formats that are ommitted do not have provision to support embedded tags. If your collection contains any of these unsupported formats, you will be unable to scan the music into the library. Your options are:
 +
#Convert your audio file to a supported format and tag using MusicBrainz Picard. (recommended)
 +
#Access your music via the File Manager or via File View
  
[[File:Kodimusicimport3.jpg]]
+
{{kodi}} supports the following common Audio File and Tag Formats
  
 +
{| class="wikitable sortable" style="text-align:center;"
 +
|-
 +
!| Metadata container
 +
!| Additional Filename extensions
 +
|-
 +
| [[wikipedia:APEv2 tag|APEv2 tag]] || ape, mp3, aac, wv, mpc
 +
|-
 +
| [[wikipedia:Advanced_Systems_Format|ASF]] || asf, wmv, wma
 +
|-
 +
| Generic Tag || it, mod, module, nst, wow, s3m, xm
 +
|-
 +
| [[wikipedia:ID3|ID3 v1]] || mp3, aac
 +
|-
 +
| [[wikipedia:ID3|ID3 v2]] || mp3, aac, tta, aif, aiff, wav, flac
 +
|-
 +
| iTunes [[wikipedia:MPEG-4 Part 14#Metadata|MP4]] || .3g2 .m4a .m4b .m4p .m4r .m4v .mp4
 +
|-
 +
|[https://xiph.org/ Xiph.org] || flac, oga, ogg, opus
 +
|}
  
You can even change your scraper settings to download the biography in many different languages.
+
Note:
 +
*FLAC files- xiph tags override id3v2 tags
 +
*mp3 files can have either id3 or APE tags
 +
*mka, dsf, dff - ID3v2 format read but are handled by ffmpeg tag reader and it does not support all tags from IDE standard)
  
  
== Tags Kodi reads ==
 
  
Kodi reads the following tags:
+
== Tags {{kodi}} reads ==
 +
{{kodi}} will scan the following tags embedded in the music file. The column ''{{kodi}} Version'' indicates the version of {{kodi}} that the tag was introduced, and will work in subsequent versions.
  
{| class="wikitable"
+
<section begin="TagTable" />
! style="text-align:left;"| Kodi Database Field
+
{| class="wikitable sortable" style="text-align:center;"
! Kodi Version
+
|-
! Vorbis
+
! style="text-align:left;"| {{kodi}} Version
! ID3v2
+
! Vorbis (.Flac)
 +
! ID3v2 (.mp3)
 
! APE
 
! APE
 
! MP4
 
! MP4
 
! ASF
 
! ASF
 
|-
 
|-
|strArtist
 
 
|v16
 
|v16
 
|ARTIST
 
|ARTIST
Line 146: Line 356:
 
|Author
 
|Author
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|ARTISTS
 
|ARTISTS
Line 154: Line 363:
 
|  
 
|  
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|ALBUMARTIST  or ALBUM ARTIST
 
|ALBUMARTIST  or ALBUM ARTIST
Line 162: Line 370:
 
|WM/AlbumArtist
 
|WM/AlbumArtist
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|ALBUMARTISTS or ALBUM ARTISTS
 
|ALBUMARTISTS or ALBUM ARTISTS
Line 170: Line 377:
 
|
 
|
 
|-
 
|-
|strAlbum
 
 
|v16
 
|v16
 
|ALBUM
 
|ALBUM
Line 178: Line 384:
 
|WM/AlbumTitle
 
|WM/AlbumTitle
 
|-
 
|-
|strTitle
 
 
|v16
 
|v16
 
|TITLE
 
|TITLE
Line 186: Line 391:
 
|
 
|
 
|-
 
|-
|iTrack
 
 
|v16
 
|v16
 
|TRACKNUMBER
 
|TRACKNUMBER
Line 194: Line 398:
 
|WM/TrackNumber or WM/Track
 
|WM/TrackNumber or WM/Track
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|DISCNUMBER
 
|DISCNUMBER
Line 202: Line 405:
 
|WM/PartOfSet
 
|WM/PartOfSet
 
|-
 
|-
|iYear
 
 
|v16
 
|v16
 
|YEAR
 
|YEAR
Line 210: Line 412:
 
|WM/Year
 
|WM/Year
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|DATE
 
|DATE
Line 218: Line 419:
 
|
 
|
 
|-
 
|-
|strGenres
 
 
|v16
 
|v16
 
|GENRE
 
|GENRE
Line 226: Line 426:
 
|WM/Genre
 
|WM/Genre
 
|-
 
|-
|mood
 
 
|v16
 
|v16
 
|MOOD
 
|MOOD
Line 234: Line 433:
 
|WM/Mood
 
|WM/Mood
 
|-
 
|-
|comment
 
 
|v16
 
|v16
 
|COMMENT
 
|COMMENT
Line 242: Line 440:
 
|(COMMENT)
 
|(COMMENT)
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|CUESHEET
 
|CUESHEET
Line 250: Line 447:
 
|
 
|
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|COMPILATION
 
|COMPILATION
Line 258: Line 454:
 
|
 
|
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|LYRICS
 
|LYRICS
Line 266: Line 461:
 
|
 
|
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|REPLAYGAIN_TRACK_GAIN
 
|REPLAYGAIN_TRACK_GAIN
Line 274: Line 468:
 
|replaygain_track_gain
 
|replaygain_track_gain
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|REPLAYGAIN_ALBUM_GAIN
 
|REPLAYGAIN_ALBUM_GAIN
Line 282: Line 475:
 
|replaygain_album_gain
 
|replaygain_album_gain
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|REPLAYGAIN_TRACK_PEAK
 
|REPLAYGAIN_TRACK_PEAK
Line 290: Line 482:
 
|replaygain_track_peak
 
|replaygain_track_peak
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|REPLAYGAIN_ALBUM_PEAK
 
|REPLAYGAIN_ALBUM_PEAK
Line 298: Line 489:
 
|replaygain_album_peak
 
|replaygain_album_peak
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|REPLAYGAIN_ALBUM_PEAK
 
|REPLAYGAIN_ALBUM_PEAK
Line 306: Line 496:
 
|replaygain_album_peak
 
|replaygain_album_peak
 
|-
 
|-
|strMusicBrainzArtistID
 
 
|v16
 
|v16
 
|MUSICBRAINZ_ARTISTID
 
|MUSICBRAINZ_ARTISTID
Line 314: Line 503:
 
|MusicBrainz/Artist Id
 
|MusicBrainz/Artist Id
 
|-
 
|-
|strMusicBrainzAlbumID
 
 
|v16
 
|v16
 
|MUSICBRAINZ_ALBUMARTISTID
 
|MUSICBRAINZ_ALBUMARTISTID
Line 322: Line 510:
 
|MusicBrainz/Album Artist Id
 
|MusicBrainz/Album Artist Id
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|MUSICBRAINZ_ALBUMARTIST
 
|MUSICBRAINZ_ALBUMARTIST
Line 330: Line 517:
 
|MusicBrainz/Album Artist
 
|MusicBrainz/Album Artist
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|MUSICBRAINZ_ALBUMID
 
|MUSICBRAINZ_ALBUMID
Line 338: Line 524:
 
|MusicBrainz/Album Id
 
|MusicBrainz/Album Id
 
|-
 
|-
|strMusicBrainzTrackID
 
 
|v16
 
|v16
 
|MUSICBRAINZ_TRACKID
 
|MUSICBRAINZ_TRACKID
Line 346: Line 531:
 
|
 
|
 
|-
 
|-
|rating
 
 
|v16
 
|v16
 
|RATING
 
|RATING
Line 354: Line 538:
 
|
 
|
 
|-
 
|-
|
 
 
|v16
 
|v16
 
|METADATA_BLOCK_PICTURE or COVERART or COVERARTMIME
 
|METADATA_BLOCK_PICTURE or COVERART or COVERARTMIME
Line 362: Line 545:
 
|WM/Picture
 
|WM/Picture
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|COMPOSER
 
|COMPOSER
Line 370: Line 552:
 
|WM/Composer
 
|WM/Composer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|CONDUCTOR
 
|CONDUCTOR
Line 378: Line 559:
 
|WM/Conductor
 
|WM/Conductor
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|LYRICIST
 
|LYRICIST
Line 386: Line 566:
 
|WM/Writer
 
|WM/Writer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|REMIXER or MIXARTIST
 
|REMIXER or MIXARTIST
Line 394: Line 573:
 
|WM/ModifiedBy
 
|WM/ModifiedBy
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|ENSEMBLE
 
|ENSEMBLE
Line 402: Line 580:
 
|
 
|
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|ARRANGER
 
|ARRANGER
Line 410: Line 587:
 
|
 
|
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|ENGINEER
 
|ENGINEER
Line 418: Line 594:
 
|WM/Engineer
 
|WM/Engineer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|PRODUCER
 
|PRODUCER
Line 426: Line 601:
 
|WM/Producer
 
|WM/Producer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|DJMIXER
 
|DJMIXER
Line 434: Line 608:
 
|WM/DJMixer
 
|WM/DJMixer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|MIXER
 
|MIXER
Line 442: Line 615:
 
|WM/Mixer
 
|WM/Mixer
 
|-
 
|-
|
 
 
|v17
 
|v17
 
|PERFORMER
 
|PERFORMER
Line 449: Line 621:
 
|
 
|
 
|
 
|
 +
|-
 +
|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
 +
|-
 +
|v18
 +
|MUSICBRAINZ_RELEASEGROUPID
 +
|MUSICBRAINZ RELEASE GROUP ID
 +
|MUSICBRAINZ_RELEASEGROUPID
 +
| ----:com.apple.iTunes:MusicBrainz Release Group Id
 +
|MusicBrainz/Release Group Id
 +
|-
 +
|v18
 +
|ARTISTSORT
 +
|TSOP
 +
|ARTISTSORT
 +
|
 +
|WM/ArtistSortOrder
 +
|-
 +
|v18
 +
|ALBUMARTISTSORT
 +
|TS02
 +
|ALBUMARTISTSORT
 +
|soaa
 +
|WM/AlbumArtistSortOrder
 +
|-
 +
|v18
 +
|COMPOSERSORT
 +
|TSOC
 +
|COMPOSERSORT
 +
|soco
 +
|WM/ComposerSortOrder
 +
|-
 +
|v18
 +
|WRITER
 +
|WRITER
 +
|WRITER
 +
|
 +
|-
 
|}
 
|}
 +
<section end="TagTable" />
  
== Data Kodi Scrapes ==
+
= References =
'''Artist'''
+
<references />
* Life span (Born, Died) - TADB/AM/MB
 
* Formed, Disbanded
 
* YearsActive - AM
 
* Genres - TADB/AM
 
* Moods - TADB/AM
 
* Styles - TADB/AM
 
* Instruments
 
* Biography - TADB
 
* Discography - TADB/AM/MB
 
* Thumb - fanart.tv/TADB/AM/HT
 
* Fanart - fanart.tv/TADB/HT
 
  
  
'''Album'''
 
* Genres
 
* Year
 
* Compilation
 
* Moods - TADB/AM
 
* Styles - TADB/AM
 
* Themes - AM
 
* Review (description) - TADB
 
* Thumb (cover) - fanart.tv/TADB/AM
 
* Label
 
* Rating - TADB/AM/MB
 
  
 +
{{Top}}
  
== NFO files ==
+
<div style="{{linear-gradient|left|#f5d3ff, #12b2e7}}">{{next|[[Adding_music_to_the_library|Scanning Music into Library]]}} </div>
{{main|NFO files}}
 
Like with most metadata in XBMC, MusicBrainz tags can be added using [[NFO files]]. Both album.nfo and artist.nfo files can contain the MusicBrainz tag or simply contain a URL to the correct page on the MusicBrainz website, similar to how Movies can contain an IMDb URL NFO file.
 
  
  
== See also ==
+
{{updated|18}}
=== Similar page names ===
+
[[Category:FAQ]]
{{#lst:MusicBrainz|similar pages}}
+
[[Category:Index]]
 
+
[[Category:Guides]]
 +
[[Category:Manual]]
 +
[[Category:First time user]]
 
[[Category:Music library]]
 
[[Category:Music library]]
[[Category:Manual]]
+
[[Category:Advanced topics]]
 +
[[Category:Quick Start Guide]]

Revision as of 08:30, 26 May 2019

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. Rebuild your music library
Zappy.png
Home icon grey.png   ▶ Music library ▶ Music tagging


1 Introduction

This page provides the following information:

  • How the Music section differs from the Video section of Kodi
  • The recommended method to organise your music files
  • The recommended method for tagging your music files
  • Explanation of some commonly misunderstood Music File Tags
  • The Audio Files and Tags that Kodi reads and uses


2 Understanding the Music Library

There is a fundamental differences between video library operation and the music library operation:

  • The video library is based on using the filenames or folder names to obtain online data. If they 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 names and structure and file names. Proper 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.


3 Folder and File Structure

Although Kodi ignores the folder structure and the names of the folders and files, the structure of your folders is important as it affects the operation of other functions such as Import/Export, nfo files and Artwork. For example, if you have all your music files in one folder (which is possible), then you lose the ability to use local nfo files, local artwork, and the import/export module will not function correctly.

The following is Kodi best practice. Remember use a layout that is nice for you, but tag accurately.


3.1 Files

Song files require suitable tagging for use in Kodi. While Kodi can scan minimal tags into the library, it can lead to errors in the library and subsequent scraping. We recommend music files are tagged with MusicBrainz as detailed below.

Remember that Kodi does not extract any information from the filename, so the filename is your choice.


3.2 Folders

Kodi is quite flexible with the folder structure. The diagram below is an example. You should group your albums in a manner that makes sense to you.

To ensure Kodi and other add-on processes can function efficently and correctly, the following is recommended.

  • Songs from the same album should be in the one folder
  • If there is more than one disk in the release, each disk should be in a sub-folder containing the songs from that disk


The following is a typical folder structure:

f:\   ....................................(root)
 |__Artist Information  ..................(Artist Information Folder)
 |
 |__Artist Music   .......................(source folder)
 |  |__ Madonna   ........................(artist folder)
 |  |   |__ Beautiful Stranger (1999)   ..(album folder)
 |  |   |   |__ Song 1
 |  |   |   |__ Song 2
 |  |   |   |__ Song 3 etc
 |  |   |__ Bedtime Stories (1994)   .....(album folder)
 |  |   |   |__ Song 1
 |  |   |   |__ Song 2
 |  |   |   |__ Song 3 etc
 |  |   |__ Like A Prayer (1989)   .......(album folder)
 |  |   |   |__ Song 1
 |  |   |   |__ Song 2
 |  |   |   |__ Song 3 etc
 |  |__ Simply Red   .....................(artist folder)
 |      |__ Picture Book (1985)   ........(album folder)
 |          |__ Song 1
 |          |__ Song 2
 |          |__ Song 3 etc
 |
 |__Compilations   .......................(Source)
 |  |__ Essential Eighties   .............(album folder)
 |  |       |__ Song 1
 |  |       |__ Song 2
 |  |       |__ Song 3 etc
 |  |__ 100% Hits- Best of 2005   ........(album folder)
 |          |__ Song 1
 |          |__ Song 2
 |          |__ Song 3 etc
 |
 |__Classical   ..........................(Source)
 |
 |__Audiobooks   .........................(Source)


3.3 Sources

A source folder contains your media collection- in this case Music. This folder is then set as a Source in Kodi which enables Kodi to access your Music.

In the diagram from the previous section Artist Music, Compilations, Classical and Audiobooks are Sources.

Setting and Scanning of Sources is covered in detail in the next step of the guide.


4 Tagging

Most music files purchased or ripped by your favourite software have only minimal metadata embedded. Normally this is not a problem and works very well on simple music players.

Kodi, being an advanced and feature rich player, requires greater accuracy with 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. It is not uncommon to have a single album split into three similarly named albums. Also true for Artists. It is for this reason that there is a separation of the Scanning and Scraping processes for Music. The initial scan allows you to find and correct errors in tagging, before scraping.

This table has examples 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 between songs of the same album and/or artist will cause duplicated entries
Madonna Madonnna Spelling mistakes will cause duplicated entries for albums and/or artists
Sting Sting and The Police Seen as two separate and unrelated Artists

As Kodi scans your music collection, it copies the data contained in those tags into the Kodi music database. The benefits of this are:

  • Once the scan is complete, the tags are not accessed again
  • All information is now obtained from the database. This has the benefit of dramatically increasing efficency and speed when navigating the library.
  • Now that a database entry exists, you are able to scrape additional information from online sources. This is covered later in the guide.


4.1 MusicBrainz

Kodi has strong support for MusicBrainz tagging. It is highly recommended that users tag their music files using MusicBrainz Picard.

MusicBrainz Picard is the music file tagger software that can access the MusicBrainz database to locate metadata to embed into your music files. MBIDs are useful because names are not unique. The bigger and more diverse your music collection is, the more likely you will encounter Artists with the same name.

The advantages of tagging with MusicBrainz are:

  • They allow you to have different artists with the same name in your library e.g. "John Williams" the classical guitarist and "John Williams" the film music composer and conductor.
  • They negate inconsistencies in artist naming e.g. having "Peter Tchaikovsky" on some albums and "Piotr Czajkowski" on others
  • They allow you to have more than one release of an album in your library e.g. the normal and deluxe editions of an album
  • They clearly identify the artist and album in ways that names alone can not. This can then be used to accurately scrape additional artist and album information and locate the correct artwork
  • They allow the scraping process to be more efficient, otherwise an extra call is made to try and get an mbid first to use at the scraping sites, and each request from Musicbrainz must be throttled to 1 per sec which will slow the scraping process.


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

  • Top Left Box- Folder 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 column) and the MusicBrainz tags to be embedded in the music file (right column).

The example in the image below shows the following:

  • Most tags are missing (original value column)
  • 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 or not used by MusicBrainz.



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 due to copyright requirements. This may lead you to 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 the inclusion of additional bonus tracks.

For the best tagging experience set the correct options in Picard, particularly the "Clear Existing Tags" option in settings. This option means that any old tags that may cause issues are wiped, preserving only the musicbrainz tagging. It will also be wise to tag using ID3v2.4 compatibility.


4.2 albumartists

Kodi requires the albumartists tag to correctly handle multiple album artists on the same album. This tag is not a default tag in MusicBrainz Picard and other tagging software. [1]

To include this tag add a new script under Options > Options > Scripting > Add new script and include the following code...

$setmulti(albumartists,%_albumartists%)


Once the music files are tagged, 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 tag or Album Artist tag will result in incorrect entries in the library.

For example:

  • If you need to change the artist or album artist tag you also have to edit the matching artist mbid tag and album artist mbid tag.
  • If Kodi finds a release mbid it will expect the artist mbid tags to also be present.


See: MusicBrainz Website
See: MusicBrainz Picard Software



The remainder of this page deals with special use cases or provides information for technical interest and reference only. It can be safely disregarded if these do not apply to you


Next step: Scanning Music into Library


5 Ripping CD's

Kodi has integrated Audio-CD (CDDA) ripping functionality. In order to use this feature, first configure the CD ripping settings (to set which encoder quality to use and where to store the files). To Rip the entire CD, highlight the Audio CD from the My Music root listing and choose Rip Audio CD from the context menu. To rip a single track, enter the Audio CD, highlight the desired track, and choose Rip Audio Track from the context menu.

There is no requirement to use the Kodi CD Ripper. If you are comfortable using other ripping software, then we recommend you continue using that software.


6 Cue Sheets

Cue Sheets are used to provide index and playlist information for a large audio file. They are generally used in conjunction with either extracting from, or burning to, Music AudioCD. Cue sheets have the file extension ".cue", and are simple plain text files.

Kodi does provide basic support for using cue sheets to define individual tracks when an entire CD has been ripped into a single music file. However the information provided by the cue sheet standard is much more limited than that of standard tagging, hence to enjoy the full music library features it is recommended that tracks are ripped into separate files and fully tagged.
If you do not use Cue Sheets you can safely move onto the next step.


7 Streams

Various internet video and audio streams can be played back in Kodi as if they were locally stored on your media center by using STRM files. As long as the format and streaming-method (network-protocol) is supported by Kodi, stream can be added. These are basic text files that look like <name>.strm and contain a URL to the internet stream. STRM files can also be added to the video library and can have cover art, summaries, etc.

Some internet sites may have an add-on available that can also access these media streams, rather than having to manually create STRM files. See Add-ons for more information on how to find and install add-ons.


8 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.


8.1 Resolving Compilations and Multiple Artists

Applies to v17 and below. v18 introduced the Artist information folder which solved these problems. You are encouraged to update to v18

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.


8.2 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 *****


9 Audio Formats & Tags

9.1 Supported Audio Formats

Although the list of playable formats is quite comprehensive, it is not accurate to say that every Kodi installation will play every format. The ability to play some of the more obscure formats will depend upon the version of Kodi and the operating system in use. Some formats will require the installation of add-ons.


Default extensions for MUSIC:

.nsv .m4a .flac .aac .strm .pls .rm .rma .mpa .wav .wma .ogg .mp3 .mp2 .m3u .gdm .imf .m15 .sfx
.uni .ac3 .dts .aif .aiff .wpl .ape .mac .mpc .mp+ .mpp .shn .wv .dsp .xsp .xwav .waa .wvs .wam
.gcm .idsp .mpdsp .mss .spt .rsd .sap .cmc .cmr .dmc .mpt .mpd .rmt .tmc .tm8 .tm2 .oga .url
.pxml .tta .rss .wtv .mka .tak .opus .dff .dsf .m4b .cue .zip .rar

It is possible to add or remove extensions for Music, using the following XML tags. Useful if you keep, say, FLAC and mp3 versions of music in the same folder. The <remove> tag can be used to remove mp3 from being listed in the library, leaving only the higher quality FLAC being displayed.

<musicextensions>
  <add>.ex1|.ex2</add>
  <remove>.ex3|.ex4</remove>
</musicextensions>



9.2 Supported Metadata Containers

The following metadata containers are supported by Kodi

Metadata Container Note
APEv2 tag
ASF
Generic Tag A generic tag for basic data from other odd file types
ID3 v1, v2.3 and v2.4
MP4
Xiph.org Vorbis Comments


9.3 Common File & Tag Combination

You will notice that not all the tags listed in the section Supported Audio Formats above are listed in the following table. Those formats that are ommitted do not have provision to support embedded tags. If your collection contains any of these unsupported formats, you will be unable to scan the music into the library. Your options are:

  1. Convert your audio file to a supported format and tag using MusicBrainz Picard. (recommended)
  2. Access your music via the File Manager or via File View

Kodi supports the following common Audio File and Tag Formats

Metadata container Additional Filename extensions
APEv2 tag ape, mp3, aac, wv, mpc
ASF asf, wmv, wma
Generic Tag it, mod, module, nst, wow, s3m, xm
ID3 v1 mp3, aac
ID3 v2 mp3, aac, tta, aif, aiff, wav, flac
iTunes MP4 .3g2 .m4a .m4b .m4p .m4r .m4v .mp4
Xiph.org flac, oga, ogg, opus

Note:

  • FLAC files- xiph tags override id3v2 tags
  • mp3 files can have either id3 or APE tags
  • mka, dsf, dff - ID3v2 format read but are handled by ffmpeg tag reader and it does not support all tags from IDE standard)


9.4 Tags Kodi reads

Kodi will scan the following tags embedded in the music file. The column Kodi Version indicates the version of Kodi that the tag was introduced, and will work in subsequent versions.


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
v18 MUSICBRAINZ_RELEASEGROUPID MUSICBRAINZ RELEASE GROUP ID MUSICBRAINZ_RELEASEGROUPID ----:com.apple.iTunes:MusicBrainz Release Group Id MusicBrainz/Release Group Id
v18 ARTISTSORT TSOP ARTISTSORT WM/ArtistSortOrder
v18 ALBUMARTISTSORT TS02 ALBUMARTISTSORT soaa WM/AlbumArtistSortOrder
v18 COMPOSERSORT TSOC COMPOSERSORT soco WM/ComposerSortOrder
v18 WRITER WRITER WRITER


10 References


Return to top


Next step: Scanning Music into Library