ID3 Metadata Tags #163

Closed
opened 2026-04-24 22:59:48 +02:00 by adam · 10 comments
Owner

Originally created by @JKamsker on GitHub (Jan 4, 2022).

Looking at https://www.audiobookshelf.org/docs/#metadata , i cannot seem to find the corresponding Tag Identifiers (e.g: composer: TCOM, according to atldotnet-ID3v2.cs or ffmpeg)

Could you please add those fields?
If not, providing a sample m4b file with all metadata fields set for further analysis would be helpful aswell :)

Originally created by @JKamsker on GitHub (Jan 4, 2022). Looking at https://www.audiobookshelf.org/docs/#metadata , i cannot seem to find the corresponding Tag Identifiers (e.g: composer: TCOM, according to [atldotnet-ID3v2.cs](https://github.com/Zeugma440/atldotnet/blob/f26d926ee2926f89cc934f4fc179b8feff9df709/ATL/AudioData/IO/ID3v2.cs) or [ffmpeg](https://github.com/FFmpeg/FFmpeg/blob/afeefb306e89b3ea3eb8ac8227996dc79589b669/libavformat/id3v2.c)) Could you please add those fields? If not, providing a sample m4b file with all metadata fields set for further analysis would be helpful aswell :)
adam closed this issue 2026-04-24 22:59:48 +02:00
Author
Owner

@mx03 commented on GitHub (Jan 5, 2022):

This is how my mp3 id3 tags (ID3v2.3.0) are:

ID3 Tag Audiobookshelf Data Tag Identifier
artist / album-artist Author TPE1 / TPE2
album / title Title TALB / TIT2
subtitle Subtitle TIT3
publisher Publisher TPUB
year Publish Year TYER
composer Narrator TCOM
description Description TXXX
genre Genres * TCON
series Series TXXX
series-part Volume Number TXXX
@mx03 commented on GitHub (Jan 5, 2022): This is how my mp3 id3 tags (ID3v2.3.0) are: | ID3 Tag | Audiobookshelf Data | Tag Identifier | | ------------- | ------------- | ------------- | | artist / album-artist | Author | TPE1 / TPE2 | | album / title | Title | TALB / TIT2 | | subtitle | Subtitle | TIT3 | | publisher | Publisher | TPUB | | year | Publish Year | TYER | | composer | Narrator | TCOM | | description | Description | TXXX | | genre | Genres * | TCON | | series | Series | TXXX | | series-part | Volume Number | TXXX |
Author
Owner

@JKamsker commented on GitHub (Jan 5, 2022):

Thanks!
But if the keys are the same, how can it tell them apart?
@mx03

@JKamsker commented on GitHub (Jan 5, 2022): Thanks! But if the keys are the same, how can it tell them apart? @mx03
Author
Owner

@mx03 commented on GitHub (Jan 5, 2022):

TXXX are user defined fields.

4.2.2. User defined text information frame
This frame is intended for one-string text information concerning the audiofile in a similar way to the other "T"-frames. The frame body consists of a description of the string, represented as a terminated string, followed by the actual string. There may be more than one "TXXX" frame in each tag, but only one with the same description.

https://id3.org/id3v2.3.0

Example output for mp3 (exiftool):

...
  | Genre = geeenre
  | - Tag 'TCON' (19 bytes):
  |     013a: 01 ff fe 67 00 65 00 65 00 65 00 6e 00 72 00 65 [...g.e.e.e.n.r.e]
  |     014a: 00 00 00                                        [...]
  | Publisher = puuublisher
  | - Tag 'TPUB' (27 bytes):
  |     0157: 01 ff fe 70 00 75 00 75 00 75 00 62 00 6c 00 69 [...p.u.u.u.b.l.i]
  |     0167: 00 73 00 68 00 65 00 72 00 00 00                [.s.h.e.r...]
  | Subtitle = suuubtitle
  | - Tag 'TIT3' (25 bytes):
  |     017c: 01 ff fe 73 00 75 00 75 00 75 00 62 00 74 00 69 [...s.u.u.u.b.t.i]
  |     018c: 00 74 00 6c 00 65 00 00 00                      [.t.l.e...]
  | Title = tiiitel
  | - Tag 'TIT2' (19 bytes):
  |     019f: 01 ff fe 74 00 69 00 69 00 69 00 74 00 65 00 6c [...t.i.i.i.t.e.l]
  |     01af: 00 00 00                                        [...]
  | UserDefinedText = (SERIES) seeeries
  | - Tag 'TXXX' (37 bytes):
  |     0241: 01 ff fe 53 00 45 00 52 00 49 00 45 00 53 00 00 [...S.E.R.I.E.S..]
  |     0251: 00 ff fe 73 00 65 00 65 00 65 00 72 00 69 00 65 [...s.e.e.e.r.i.e]
  |     0261: 00 73 00 00 00                                  [.s...]
  | UserDefinedText = (SERIES-PART) 12345
  | - Tag 'TXXX' (41 bytes):
  |     0270: 01 ff fe 53 00 45 00 52 00 49 00 45 00 53 00 2d [...S.E.R.I.E.S.-]
  |     0280: 00 50 00 41 00 52 00 54 00 00 00 ff fe 31 00 32 [.P.A.R.T.....1.2]
  |     0290: 00 33 00 34 00 35 00 00 00                      [.3.4.5...]
  | UserDefinedText = (DESCRIPTION) deeescription
  | - Tag 'TXXX' (57 bytes):
  |     02a3: 01 ff fe 44 00 45 00 53 00 43 00 52 00 49 00 50 [...D.E.S.C.R.I.P]
  |     02b3: 00 54 00 49 00 4f 00 4e 00 00 00 ff fe 64 00 65 [.T.I.O.N.....d.e]
  |     02c3: 00 65 00 65 00 73 00 63 00 72 00 69 00 70 00 74 [.e.e.s.c.r.i.p.t]
  |     02d3: 00 69 00 6f 00 6e 00 00 00                      [.i.o.n...]
...
@mx03 commented on GitHub (Jan 5, 2022): TXXX are user defined fields. > 4.2.2. User defined text information frame This frame is intended for one-string text information concerning the audiofile in a similar way to the other "T"-frames. The frame body consists of a description of the string, represented as a terminated string, followed by the actual string. There may be **more than one "TXXX" frame** in each tag, but **only one with the same description**. https://id3.org/id3v2.3.0 Example output for mp3 (exiftool): ``` ... | Genre = geeenre | - Tag 'TCON' (19 bytes): | 013a: 01 ff fe 67 00 65 00 65 00 65 00 6e 00 72 00 65 [...g.e.e.e.n.r.e] | 014a: 00 00 00 [...] | Publisher = puuublisher | - Tag 'TPUB' (27 bytes): | 0157: 01 ff fe 70 00 75 00 75 00 75 00 62 00 6c 00 69 [...p.u.u.u.b.l.i] | 0167: 00 73 00 68 00 65 00 72 00 00 00 [.s.h.e.r...] | Subtitle = suuubtitle | - Tag 'TIT3' (25 bytes): | 017c: 01 ff fe 73 00 75 00 75 00 75 00 62 00 74 00 69 [...s.u.u.u.b.t.i] | 018c: 00 74 00 6c 00 65 00 00 00 [.t.l.e...] | Title = tiiitel | - Tag 'TIT2' (19 bytes): | 019f: 01 ff fe 74 00 69 00 69 00 69 00 74 00 65 00 6c [...t.i.i.i.t.e.l] | 01af: 00 00 00 [...] | UserDefinedText = (SERIES) seeeries | - Tag 'TXXX' (37 bytes): | 0241: 01 ff fe 53 00 45 00 52 00 49 00 45 00 53 00 00 [...S.E.R.I.E.S..] | 0251: 00 ff fe 73 00 65 00 65 00 65 00 72 00 69 00 65 [...s.e.e.e.r.i.e] | 0261: 00 73 00 00 00 [.s...] | UserDefinedText = (SERIES-PART) 12345 | - Tag 'TXXX' (41 bytes): | 0270: 01 ff fe 53 00 45 00 52 00 49 00 45 00 53 00 2d [...S.E.R.I.E.S.-] | 0280: 00 50 00 41 00 52 00 54 00 00 00 ff fe 31 00 32 [.P.A.R.T.....1.2] | 0290: 00 33 00 34 00 35 00 00 00 [.3.4.5...] | UserDefinedText = (DESCRIPTION) deeescription | - Tag 'TXXX' (57 bytes): | 02a3: 01 ff fe 44 00 45 00 53 00 43 00 52 00 49 00 50 [...D.E.S.C.R.I.P] | 02b3: 00 54 00 49 00 4f 00 4e 00 00 00 ff fe 64 00 65 [.T.I.O.N.....d.e] | 02c3: 00 65 00 65 00 73 00 63 00 72 00 69 00 70 00 74 [.e.e.s.c.r.i.p.t] | 02d3: 00 69 00 6f 00 6e 00 00 00 [.i.o.n...] ... ```
Author
Owner

@JKamsker commented on GitHub (Jan 5, 2022):

Do you have any recommendation which tool i can use to set this tags?(series) (+command example)

@JKamsker commented on GitHub (Jan 5, 2022): Do you have any recommendation which tool i can use to set this tags?(series) (+command example)
Author
Owner

@mx03 commented on GitHub (Jan 5, 2022):

Not sure if it was only an example, but with https://github.com/Zeugma440/atldotnet theTrack.AdditionalFields["series"] = "seriesname"; // Support for custom fields ?

Or https://wiki.multimedia.cx/index.php/FFmpeg_Metadata ffmpeg -i inputfile -metadata title="Movie Title" -metadata series="seriesname" outputfile (If any additional metadata tags are specified that are not in the preceding table, the FFmpeg MP3 muxer encodes a TXXX user-defined information frame containing both the key and the value.)

Personal i use mp3tag for manuel editing, for automatic conversion i use ffmpeg.

@mx03 commented on GitHub (Jan 5, 2022): Not sure if it was only an example, but with https://github.com/Zeugma440/atldotnet `theTrack.AdditionalFields["series"] = "seriesname"; // Support for custom fields` ? Or https://wiki.multimedia.cx/index.php/FFmpeg_Metadata ` ffmpeg -i inputfile -metadata title="Movie Title" -metadata series="seriesname" outputfile` (If any additional metadata tags are specified that are not in the preceding table, the FFmpeg MP3 muxer encodes a TXXX user-defined information frame containing both the key and the value.) Personal i use [mp3tag](https://www.mp3tag.de/) for manuel editing, for automatic conversion i use ffmpeg.
Author
Owner

@JKamsker commented on GitHub (Jan 5, 2022):

Ive tried atl, it works, but for audiobooks with a length of 12h it takes 5 minutes to save

Ffmpeg doesnt want to take the tags at all :(

Im working with m4b files btw

@JKamsker commented on GitHub (Jan 5, 2022): Ive tried atl, it works, but for audiobooks with a length of 12h it takes 5 minutes to save Ffmpeg doesnt want to take the tags at all :( Im working with m4b files btw
Author
Owner

@mx03 commented on GitHub (Jan 5, 2022):

m4b is acutally a m4a container and as far i know it dont use id3 tags. Almost every format has its own metadata.

But it should works with ffmpeg ffmpeg.exe -i test.m4b -metadata composer="harald" test2.m4b works fine for me.

If it still dont work you can send me that file and i look into it.

@mx03 commented on GitHub (Jan 5, 2022): m4b is acutally a m4a container and as far i know it dont use id3 tags. Almost every format has its own metadata. But it should works with ffmpeg `ffmpeg.exe -i test.m4b -metadata composer="harald" test2.m4b` works fine for me. If it still dont work you can send me that file and i look into it.
Author
Owner

@JKamsker commented on GitHub (Jan 5, 2022):

Yea, ffmpeg takes well known metadata, like composer, but TXXX data like series or series-data will go to the void.

@JKamsker commented on GitHub (Jan 5, 2022): Yea, ffmpeg takes well known metadata, like composer, but TXXX data like series or series-data will go to the void.
Author
Owner

@mx03 commented on GitHub (Jan 5, 2022):

You could try this: https://superuser.com/questions/1208273/how-to-add-new-and-non-defined-metadata-to-an-mp4-file .
I tried it and it "worked" with -movflags use_metadata_tags. It was visible with ffprobe, but not with mp3tag.

I use mainly mp3 and opus, not sure if its a bug or if its only a mess.

@mx03 commented on GitHub (Jan 5, 2022): You could try this: https://superuser.com/questions/1208273/how-to-add-new-and-non-defined-metadata-to-an-mp4-file . I tried it and it "worked" with `-movflags use_metadata_tags`. It was visible with ffprobe, but not with mp3tag. I use mainly mp3 and opus, not sure if its a bug or if its only a mess.
Author
Owner

@JKamsker commented on GitHub (Jan 9, 2022):

After some friendly (optimization/)help from atldotnet , saving tags now only takes 10 secs max.
This is how i did it if someone is interested: https://github.com/JKamsker/AudibleSyncService/blob/49f83db4f0247236d4d5b11fac65967294b69509/AudibleSyncService/Logic/Services/AudibleBook.cs#L190

@JKamsker commented on GitHub (Jan 9, 2022): After some friendly (optimization/)help from atldotnet , saving tags now only takes 10 secs max. This is how i did it if someone is interested: https://github.com/JKamsker/AudibleSyncService/blob/49f83db4f0247236d4d5b11fac65967294b69509/AudibleSyncService/Logic/Services/AudibleBook.cs#L190
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#163