KristoforMaynard / music-tag

Simple interface to edit audio file metadata
MIT License
125 stars 19 forks source link

Please add support for Audiobooks (.m4b) #42

Open Emasoft opened 1 year ago

Emasoft commented 1 year ago

This tool is amazing. Reading and writing tags is a breeze! It should add support for audiobooks too (.m4b). Usually it is very cumbersome to manage those, but this tool can finally solve this issue! Please, add support for audiobooks specific metadata, like:

Audiobooks Metadata

Name Tag Name FFmetadata MP4 atom Mp3tag ID3v2
Book title Title title ©nam TITLE TIT2
Book title (multi-file) Album album ©alb ALBUM TALB
Chapter title (multi-file) Title title ©nam TITLE TIT2
Book sort-title Sort-title sort_name (title-sort) sonm TITLESORT TSOT
Book sort-title (multi-file) Sort-album sort_album (album-sort) soal ALBUMSORT TSOA
Chapter number (multi-file) Track number track trkn TRACK TRCK
Author Artist artist ©ART ARTIST TPE1
Author (optional override) Album artist album_artist aART ALBUMARTIST TPE2
Narrator Composer composer ©wrt COMPOSER TCOM
Genre Genre genre ©gen GENRE TCON
Release date * Date date ©day YEAR TDRC/TYER
Description Description description (MP4)
TIT3 (MP3)
desc SUBTITLE TIT3

* When being as precise as possible the ISO 8601 format of the string is yyyy-MM-ddTHH:mm:ss (in UTC), but the precision may be reduced by removing as many time indicators as wanted.
Hence valid timestamps are yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss.

ADDITIONAL SPECIFICATIONS

There is a dedicated Narrator tag that Audible uses (©nrt) but since not all audiobooks come from Audible, most of the audiobook community uses the composer tag instead for tagging.

Artist/Performer is used for the author because it's the most prominent tag for a person associated with the media, with Composer being the second most commonly viewed tag.

If you want to cover your bases (i.e. have accurate metadata, but also use the community standard metadata working on popular apps) you must do it this way:

Author(s)(iTunes / ID3 -- I will try to include options for both 2.4 and 2.3) Artist: ©ART / TPE1 (standard) ©aut or auth / TIPL: Author or IPLS: Author (OCD-version)

First Author (for multi-author books, or editor of an anthology. Whoever you want to be most recognized/searchable for this book) aART / TPE2 (standard)

Narrator(s) ©com or ©wrt / TCOM (standard) ©nrt or perf / TMCL: Narrator or IPLS: Narrator (custom)

Publisher There are 2-3 different tags that can be used for this. ©pub/TPUB are both the most common and the most accurate, but some apps won't recognize this. If they don't, they're probably looking for ©lab (label -- not sure if there is an ID3 equivalent) or possibly even the studio tag, which I can't remember off the top of my head.

Series Ideally individual books in a series should be tagged in the way discs in a multi-disc album are tagged. So "Album" would be the series title, and then "Title" would be the book title, and you'd use the "disc#" tag for the series index. However there are any number of ways to do this, and none of them are going to be universal. Here are a couple, however:

Audible uses series and series-part for this purpose (I don't remember off the top of my head what the MP4 code is for these, but I think it's one that Audible created and not part of the standard library). I think that tag probably gets lost when converting to ID3 though, so you could create TXXX: Series and TXXX: Series Index tags for this. That's one option.

Some people use the Grouping or Content Group tags for this: ©grp / TIT1 - Series title

A more precise way to go is to use the movement/movement index tags: ©mvn / MNVN - Series title ©mvi and MVIN - Series index That seems to be the second-most popular option, probably because those tags already exist in both MP4/Quicktime tagging and ID3 tagging.

If you have books that are in a multi-series universe (eg. Terry Brooks' Shannara universe), you could also use the "Work" tags in addition to the "Movement" tags: ©wrk / TIT1 - Universe title

If you use .m4b files rather than .mp3, you can also use the tags available for TV Shows: tvsh - series title tven - book title tves - series index tvnn - Universe title tvsn - Universe index (i.e. where the sub-series falls within the universe as a whole, so you know which subseries to read in which order.)

There's no real advantage either way. Some apps don't look for series data but they look for the subtitle so they can display "Series Title, Book Index".

Thanks in advance!

iconoclasthero commented 11 months ago

While I object to the fact that this issue is titled with (.m4b), I would like to see this implemented for, namely .opus. As I mentioned in https://github.com/KristoforMaynard/music-tag/issues/45 this appears it could be easily fixed with an implementation of free-text tags. The lack of flexibility in this regard was also duly noted in №. 45. I also bring up .opus specifically because there are a dearth of utilities for handling .opus specifically despite its efficiency for spoken audio.

Beyond free-text, the fact that this is lacking support for audiobooks is a glaring omission. With things like ABS https://github.com/advplyr/audiobookshelf gaining in popularity, users of audiobooks should reasonably expect that any complete audio tagging library will include these standard tags (and free-text for others unthought of previously). I would also like to see e.g., ABS, add support for writing out to .opus as an option (like, e.g, the existing .m4b output) and having libraries like this provide support for chapterized .opus (or .m4b) audiobooks is helpful in that regard.

Further, there is no support for chapters as far as I can tell which is the point of №. 45 not discussed in №. 42 OP.

iconoclasthero commented 11 months ago

@Emasoft check out audiobookshelf (ABS). Not sure if you're going to want to implement a whole server for your audiobook library, I did. It has writeout/tagging support for .m4b as well as the ability to collect metadata from the interwebz.