Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking metadata enhancements #1036

Open
36 of 76 tasks
certuna opened this issue Apr 17, 2021 · 12 comments
Open
36 of 76 tasks

Tracking metadata enhancements #1036

certuna opened this issue Apr 17, 2021 · 12 comments

Comments

@certuna
Copy link
Contributor

certuna commented Apr 17, 2021

This is an issue to track various metadata enhancements in Navidrome's tag scanner, database and API, and their dependencies on other parts of Navidrome. Will make it easier to see in one central place which metadata is already implemented, which enhancements could be implemented relatively easily now, and which ones require more fundamental changes first.

Note that the four-letter tags below are as defined in id3v2.4. Tags in Vorbis (FLAC) are generally much more descriptive (eg, PRODUCER or RELEASETYPE) but they generally follow the id3 definitions in what they contain. MP4 (AAC) and id3v2.3 tags have small differences vs id3v2.4 but are also largely the same.

Track level metadata

Exposed to the web client through the song API endpoint.

  • APIC Song Image
  • TRCK Track Number
  • TIT1 Work Add support for Work, Movement & Subtitle #279 - used to group various individual files (either songs, or movements in classical music) together that are part of one work.
  • TIT2 Song Title
  • TIT3 Song subtitle/description for example "Live at Wembley" or "12 Inch Extended Mix" . Relatively easy to add to the scanner, database and API, but on the front end probably needs to be concatenated with TIT2 like Spotify does, so the UI dispayed title becomes Song Title · Song Subtitle, for example "Missing · Todd Terry Remix"
  • TSOT Song Title Sort Order [WebUI] utilize Sort Order tags #643 - alternative sort order for TIT2 note: Navidrome currently reads and stores this, but does not use it so far
  • MVIN Movement Index - like track number, but for Movements
  • MVMN Movement Name Add support for Work, Movement & Subtitle #279 - intended for classical music movements, to be used in conjunction with Work and Movement Index. Should be relatively easy to add to the scanner, database and API, but needs some UI choices client side. Probably best to do something like: if both Work and Movement fields are not empty, then concatenate the title to TIT1: MVIN. MVMN (eg, "Preludes: III. Le Vent Dans La Plaine" this is how Apple does it) as the song title in the player, otherwise concatenate to TIT1: TIT2 - TIT3 (dropping any empty fields)
  • TDRC (Recording) Date, supported by Navidrome as Year/Date. This is the date used for sorting-by-Year. note: the popular tag editor Musicbrainz Picard populates this field not with the song recording date, but with the album (re-)release date, so in this case Navidrome maps it to Release Date, see below
  • TDOR Original Date of the song/composition: according to the id3v2.4 specs, this field has the release date of the original song in the case of a cover, remix, live version or a performance of a classical composition note: Musicbrainz Picard populates this field instead with the "original album date", so in this case Navidrome maps it to Year/Date, see above
  • TDRL Release Date
  • TOAL Original Album Title this is meant to store the name of the album that a cover/live version/etc was originally featured on, or the original album where a compilation track came from. note: is anyone using Original Album Title in the wild?
  • TCON Genre (multi-valued) [WebUI] display multiple genres for album #119
  • TMOO Mood (multi-valued) note: in order to support multiple mood tags, this needs a database schema redesign first, to accommodate the many-to-many relationship between mood-mediafile
  • TLAN Language (multi-valued) Support for the Language tag #1377
  • TXXX:ITUNESADVISORY Content Advisory aka the Explicit tag, to protect the young, the elderly, and the linguistically sensitive (Add suppport for metdata explicit tag (itunes advisory) #1357). Standardized in mp4 (rtng, used extensively by Apple), somewhat exotic in id3v2.4 and Vorbis Comments
  • TKEY Key - useful primarily in DJ applications
  • TBPM BPM BPM metadata enhancement #1086
  • COMM Comments UI doesn't seem to display comments from DESCRIPTION tag #963 note: Navidrome assumes that when comments of all tracks in an album are all identical, they are album-level comments, if they are different, the comments are song-level. Note that a file can technically have multiple comments fields - although currently Navidrome only reads/uses the first
  • GRP1 Grouping it has never become quite clear whether this field is meant to work on the album level, song level or other, as Apple never specified how it should be used. This field was never defined in the id3v2 specs, and Vorbis doesn't have specs, however people seem to use it as a freeform tag field Browse collection by grouping #2045
  • USLT Unsynced lyrics _note: supported in the Subsonic API, but not displayed in the web player as unsynced lyrics are not supported in the upstream jinke-react-player, see Support lyrics without timestamps? lijinke666/react-music-player#346
  • SYLT Time-synced lyrics Support for Lyrics - Web UI #491 Support for Lyrics - Subsonic API #249 Support external .lrc file #1421 note: the web player now supports synced lyrics, but the Subsonic API doesn't
  • CHAP / CTOC Chapters Big Feature Request: Support for audio books (e.g. m4b) #1419 : mainly for audiobooks but could also be useful for single-file DJ mixes. note: will probably need support in the upstream jinke-react-player
  • POPM and PCNT Rating/popularity and Playcount note: since Navidrome does not write ratings to tags (that would require write access) but keeps them in the database, there needs to be some careful thought how to handle ratings-in-tags: do we read them once, when the file is first scanned? Or keep track of ratings-in-tags independently, and update them whenever the tag gets updated outside of Navidrome?
  • TXXX Musicbrainz Original Release ID
  • TXXX Musicbrainz Work ID
  • TXXX Musicbrainz Recording ID note: Navidrome reads and stores this, but does not use it
  • TXXX Musicbrainz Release Track ID
  • TXXX Musicbrainz AcoustID
  • TXXX ReplayGain Track Gain/Peak/Range Volume normalization (in web player) #233 note: trivial to read, store and include in the song API, but needs support in the upstream jinke-react-player: ReplayGain lijinke666/react-music-player#299
  • TXXX ReplayGain Reference Loudness
  • bit depth, sample rate & channels Sample rate, bit depth, channels, HD audio #1438 note: these are technically not metadata tags but part of the audio stream property (STREAMINFO in FLAC/Vorbis)
  • codec: audio stream property - currently Navidrome only reads/stores file extensions (.mp3, .flac), it does not extract codec
  • bit rate: audio stream property
  • TSSE Encoding settings: software/hardware and settings used for encoding
  • TLEN Song length/duration/time - note: this id3 frame is not guaranteed to be there (if you tell a tagging application to clear all tags, this also gets flushed), and not guaranteed to be accurate, so most encoders don't bother with this, compute the duration by simply summing up the duration in all the frame headers in the file, and store the length in a (XING or VBRI) header. "Proper" container formats like Vorbis, MP4, etc have their own stream property headers for the duration of the audio streams.
  • Song-level artist credits, like (Performing) Artist, Composer, Remixer, Lyricist etc. See Artist section below for details. Navidrome currently only supports one song-level artist credit: TPE1 aka "Lead Performer" aka "Track Artist". If the tag contains multiple artists, it reads only the first value.

Disc level metadata

This is a sub-grouping of songs within an album. Exposed through the song API endpoint, so all subsequent grouping needs to be done clientside.

Album level metadata

Exposed to the web client through the album API endpoint.

These fields are stored per song/file in the tags, but apply to the album as a whole, typically they have identical values for all songs of the album. Navidrome currently splits albums on Album Title and Album Artist, i.e. all files with those two fields are one album item. Navidrome could apply super-strict disambiguation rules and split albums as soon as any of the below fields are not identical for all songs - but that's currently not the case, since it might not be the behaviour that users expect.

  • TALB Album Title
  • TSOA Album Title Sort Order [WebUI] utilize Sort Order tags #643 note: Navidrome reads and stores this, but does not use it
  • APIC Album cover
  • COMM Comments UI doesn't seem to display comments from DESCRIPTION tag #963 note: when the comments of all songs of an album are identical, they are rolled up to album-level comments
  • TCMP Compilation note: already supported, Navidrome assumes any album with this TRUE and empty Album Artist is a various artists compilation
  • TPUB Label/Publisher Import, display and filter by Label/Publisher #389
  • TXXX Catalog Number note: Navidrome reads and stores this, but does not use it
  • TSRC ISRC/UPC code
  • TMED Media Type: source of the audio, values are for example "CD/DD" for DDD audio CD, "TT/33" for 33rpm LP, "ANA/8CA" for analogue 8-track cassette note: in principle this could be song-level info, but in practice this is nearly always an album-level field since it's rare that individual songs on an album come from different sources
  • TDRL Release date of the album, used to disambiguate various re-releases: different releasedate tag = different album
  • TDRC (Recording) Date When the same for all songs on the album, it's rolled up to album level, when not the same, it's shown as a range like"1995-2015"
  • TDOR Original Date When the same for all songs, it's rolled up to album level, when not the same, it's shown as a range like"1995-2015"
  • TXXX Release Type TXXX:Musicbrainz Album Type add Release Type field #369 such as "album", "single", "live", "dj-mix", "audiobook". Can be multivalued, semicolon separated or comma separated!
  • TXXX Musicbrainz Release Status note: "official", "non-official"
  • TXXX Musicbrainz Album Comment note: for example "remastered"
  • TXXX Musicbrainz Album ID note: Navidrome reads and stores this, but does not use it
  • TXXX Musicbrainz Release Group ID note: Navidrome reads and stores this, but does not use it
  • TXXX Album Release country TXXX:MusicBrainz Album Release Country
  • TXXX ReplayGain Album Gain/Peak/Range Volume normalization (in web player) #233 note: trivial to read, store and include in the song API, but needs support in the upstream jinke-react-player: ReplayGain lijinke666/react-music-player#299
  • total time (calculated field)
  • playcount Normalise album playcount sorting by amount of tracks #1032
  • Album-level artist credits, like Album Artist, but also Album Producer, Album Conductor, etc - see Artist section below for fields. Navidrome currently only supports TPE2 aka "Album Artist": it reads only the first artist when there's multiple values in this tag.

Artist metadata

Exposed to the web client through the artist API endpoint, the song endpoint for song-level credits and the album endpoint for album-level credits.

Some credits tags are unambiguously album-level (Album Artist, Album Artist Sort, MusicBrainz Album Artist ID), but the rest are ambiguous. Users probably expect that when a producer, artist or composer credit is tagged for each song of the album, this becomes an album-level credit (so, included in the album API endpoint), otherwise it should remain song-level. Note that Navidrome already does this track-level-unless-all-the-same with the Artist field when Album Artist is empty.

Most of this info cannot be exposed over the Subsonic API, since its specs only define one artist, one album artist, and no other roles/credits. Discussion on it here: #211

IMPORTANT Supporting multiple artists and additional credits (composer, remixer, producer etc) requires fundamental changes to the Database schema to accommodate the complex many-to-many-to-many relationships artist-role-mediafile.

Fields:

  • performing artist aka Track Artist (TPE1 and TXXX:Artists) and Album Artist (TPE2, TXXX:Album Artists) are currently supported only for one value: add support for multi-valued fields: Support multiple artists, with custom separator #238
  • TPE3 Conductor Add support for Conductor #281
  • TPE4 Remixer Add support for Remixer #277
  • TOPE Original Artist (for tagging covers)
  • TCOM Composer add support for Composer #275
  • TEXT Lyricist Add support for Lyricist #276
  • TMCL musician credits (Guitar, Vocals)
  • TIPL "involved people" (Producer, DJ-mixer)
  • TSOP Artist Sort Order, TSO2 Album Artist Sort Order , TSOC Composer Sort Order [WebUI] utilize Sort Order tags #643 note: while this field is helpful to sort "Beatles, The" under B, this field also has values like "West, Kanye" to sort him under W, which is something that a lot of users dislike.
  • TXXX Musicbrainz Artist ID note: Navidrome reads and stores this, but does not use it
  • TXXX Musicbrainz Album Artist ID note: Navidrome reads and stores this, but does not use it
  • APIC Artist Image Add support for artist artwork #394 note: can be an embedded tag, but Navidrome currently only gets this externally from last.fm, Spotify, MusicBrainz, Allmusic, Wikipedia, etc
  • Artist biography note: can in theory be an embedded tag with COMM, but I've never seen this in the wild. Usually this comes from last.fm, Spotify, MusicBrainz, Allmusic, Wikipedia, etc
  • Artist country note: could in theory be an embedded tag with TXXX:Artist Country or something, but I've never seen this in the wild. Usually this comes from last.fm, Spotify, MusicBrainz, Allmusic, Wikipedia, etc
  • various calculated/collated fields from albums and songs: artist date range, total number of tracks, total time, total playcount, genres, moods, etc.
@deluan deluan pinned this issue Apr 18, 2021
brianschrameck added a commit to CardioCast/navidrome that referenced this issue May 4, 2021
Related to navidrome#1036.

Adds BPM to the stored metadata about MediaFiles.

Displays BPM in the following locations:
- Listing songs in the song list (desktop, sortable)
- Listing songs in playlists (desktop, sortable)
- Listing songs in albums (desktop)
- Expanding song details

When listing, shows a blank field if no BPM is present. When showing song details, shows a question mark.

Updates test MP3 file to have BPM tag. Updated test to ensure tag is read correctly.

Updated localization files. Most languages just use "BPM" as discovered during research on Wikipedia. However, a couple use some different nomenclature. Spanish uses PPM and Japanese uses M.M.
This was referenced May 4, 2021
deluan pushed a commit that referenced this issue May 6, 2021
* BPM metadata enhancement

Related to #1036.

Adds BPM to the stored metadata about MediaFiles.

Displays BPM in the following locations:
- Listing songs in the song list (desktop, sortable)
- Listing songs in playlists (desktop, sortable)
- Listing songs in albums (desktop)
- Expanding song details

When listing, shows a blank field if no BPM is present. When showing song details, shows a question mark.

Updates test MP3 file to have BPM tag. Updated test to ensure tag is read correctly.

Updated localization files. Most languages just use "BPM" as discovered during research on Wikipedia. However, a couple use some different nomenclature. Spanish uses PPM and Japanese uses M.M.

* Enhances support for BPM metadata extraction

- Supports reading floating point BPM (still storing it as an integer) and FFmpeg as the extractor
- Replaces existing .ogg test file with one that shouldn't fail randomly
- Adds supporting tests for both FFmpeg and TagLib

* Addresses various issues with PR #1087.

- Adds index for BPM. Removes drop column as it's not supported by SQLite (duh).
- Removes localizations for BPM as those will be done in POEditor.
- Moves BPM before Comment in Song Details and removes BPM altogether if it's empty.
- Omits empty BPM in JSON responses, eliminating need for FunctionField.
- Fixes copy/paste error in ffmpeg_test.
@deluan
Copy link
Member

deluan commented Jul 17, 2021

@certuna: Navidrome don't read the TLEN, but it provides this information. Both ffmpeg and taglib extractors provide this info. Is there any advantage of reading the tag versus relying on the info provided by the extractors?

@certuna
Copy link
Contributor Author

certuna commented Aug 2, 2021

@certuna: Navidrome don't read the TLEN, but it provides this information. Both ffmpeg and taglib extractors provide this info. Is there any advantage of reading the tag versus relying on the info provided by the extractors?

Yeah I think this is indeed best handled upstream by the tag library. I've marked it as done in the list above for clarity.

mayanez added a commit to mayanez/navidrome that referenced this issue Aug 21, 2021
mayanez added a commit to mayanez/navidrome that referenced this issue Aug 22, 2021
mayanez added a commit to mayanez/navidrome that referenced this issue Aug 24, 2021
mayanez added a commit to mayanez/navidrome that referenced this issue Aug 25, 2021
@adamdmoss
Copy link

adamdmoss commented Sep 11, 2021

Is metadata in .dsf supposed to extract/scan intact at this point? Because I don't believe it's working; should I file a separate issue?
edit: I think I may have to just enable the ffmpeg scanner per #778 - will try that.

@certuna
Copy link
Contributor Author

certuna commented Sep 12, 2021

Correct, DSF at this point can only be read by ffmpeg, not by Taglib. Not much we can do about that...

mayanez added a commit to mayanez/navidrome that referenced this issue Sep 12, 2021
mayanez added a commit to mayanez/navidrome that referenced this issue Sep 12, 2021
@adamdmoss
Copy link

ffmpeg scanner did indeed fix it - apologies for the noise.

@SenorSmartyPants
Copy link

Please display 'MusicBrainz Album Comment' field if present in ID3 tags. Beets adds this to metadata if release has it set.

https://musicbrainz.org/release/c28de232-bb53-4ccc-aa29-60ca5decbbad

As displayed in Picard.
image

@rombat
Copy link

rombat commented Nov 17, 2022

any plan to handle the Arranger tag for tracks ? That would be great too !

@deluan deluan added the keep label Mar 7, 2023
@metalheim
Copy link
Contributor

@certuna navidrome reads and uses replaygain. Can you please update the first Post here ?

@deluan
Copy link
Member

deluan commented Dec 27, 2023

Please display 'MusicBrainz Album Comment' field if present in ID3 tags. Beets adds this to metadata if release has it set.

https://musicbrainz.org/release/c28de232-bb53-4ccc-aa29-60ca5decbbad

As displayed in Picard. image

Hey @SenorSmartyPants, what is the difference between this tag and _releasecomment?

By the way, do you need to configure anything in Picard for it to import this tag? My Picard (with default settings) can't seem to import it. Maybe it is a Beets thing?

Screenshot 2023-12-27 at 4 37 59 PM

@SenorSmartyPants
Copy link

I think they are the same (I am by no means an expert). I followed that link and this one from there https://community.metabrainz.org/t/add-album-version-tag-using-picard/539876 and came up with this Picard script.

$set(MusicBrainz Album Comment,%_releasecomment%)

Yes, by default it seems that Picard does not tag this field and beets does. It appears that I have the correct field name as Picard matches the one it makes with the beets tag one. But I could always send you an mp3 with the field in it, or ffmpeg dump of one.

@deluan
Copy link
Member

deluan commented Dec 29, 2023

$set(MusicBrainz Album Comment,%_releasecomment%)

Ah yes, _releasecomment. This is already imported (as MusicBrainz Album Comment) but not used anywhere ATM. In a future release, we will allow it to be used as disambiguation.

@michaelkrieger
Copy link

A non-numeric disc number doesn't seem to be honoured by Navidrome's web interface, merging all discs into one.
An example of this is a mix released by a popular TV show. It had a "TV Version" and a "Blog Version" of the same CD album.

Yes, this could be referenced as "Disc Subtitle", but there is no disc number in this case.
Yes, this could be named differently in the albums, but i do want to keep these together as one album.

Should Navidrome's web interface simply be squashing a disc number of "BLOG" or "TV" or "RED"/"GREEN" into a flat no-disc album? Probably not.

If the desire is to keep this field numeric for player compatibility purposes, maybe giving the discs a(n arbitrary) number and moving the text to the subtitle field internally?

Note: This would also impact vinyl numbering like A1, A2, B1, B2, C1, C2.

Note: Differs from #1652 and #2104 as this is disc number and not track number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants