![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Proposing custom music metadata
Hey does anybody know stuff about audio track metadata?
I've had an idea rattling around in my head for a while but didn't have an easy and community-based way to organize my thoughts about it. So I am really pleased to see a DW fan coding community pop up! I not only welcome but plead for input on this concept:
I want to build a way to create custom tags on music files.
You know how you can sort by artist, album, year published, and all that, because those are categories embedded in ID3 metadata? I wish ID3 metadata allowed for custom categories. I want to be able to sort my music collection by color, mood, character, and fanfiction trope, to name a few. I think this has huge potential in being able to easily make playlists, fandom or otherwise, that flow smoothly and center around a common theme.
The core features I want for this custom tag metadata:
- encoded in the audio files themselves (like ID3)
- does not interfere with existing ID3 metadata (still able to be read by existing ID3-compatible software)
- allows many custom tag slots (should limit it, for file size reasons, but I do want 10+ custom slots per track)
- ideally compatible with ReplayGain or similar audio normalization metadata
The end goal would be to create a music player program that can auto-generate a playlist based on matching criteria from one song to the next (eg: selecting only songs tagged with colors, and playing them in rainbow order) but that is probably years away. Step one is metadata formatting & storage-- I should get a format structured and a few tracks set up before I try to make a program read and sort it, right?
My current questions:
- Is there a way to access ID3 metadata as raw text, so I can inspect its current formatting? Or does it get encoded into computer gibberish and have to be processed into words through ID3-reading software? (I'm guessing the latter, but if you know of a program that would let me read it as raw text, let me know.)
- Do you have any links or know of any resources to read on how exactly file metadata works? It's easy to get lost in Wikipedia's tall grasses.
- Other than ID3, Vorbis comments, and other music metadata, what technologies should I try to become familiar with now while I'm in the early planning stages?
- Are there any obvious issues or roadblocks that come to mind as you read through this concept?
Thanks all!
Mods, if you create tags that should be added to this, let me know.
no subject
There’s a program I use for metadata (now mostly used for podfic) that lets me add custom fields; obviously this isn’t the scope of what you’re looking for but now I wonder if I’ll be able to add a colour field and corresponding column in windows explorer to sort by that field 🤔
no subject
If you do get it working and the data is actually embedded in the file itself, I might ask for you to send me the file through CryptDrive or something so I can download it and inspect the formatting! My understanding is that there is almost definitely a way to encode the information, but making it efficient and ID3-compatible while also allowing a program to read it is probably the big thing.
The idea originally came from the fact that my husband experiences synesthesia, so songs that I think flow naturally from one to the next can be jarring to him because of a sudden transition of color or texture. Since that's not an experience I share I wanted a way for him to document that info in the metadata so I can sort by it and make better playlists for us to listen to on long drives :)
no subject
no subject
no subject
I encourage you to not use MP3s to store your music going forward, both because it is worse sound quality (lol) and because ID3 is bad. However, ID3 does support a private frame (
PRIV
) which can be used to encode arbitrary metadata.You can use kid3 to view and edit the metadata tags on most audio files and I highly recommend doing so. There is a handbook here.
If you want to get really serious about metadata, there is XMP which is built upon RDF. There is a mechanism for encoding XMP into MP3 and MP4 files (not sure about Vorbis but I expect so), although I wouldn’t expect most media players to recognize this data (they will just use the ID3/etc tags instead). It’s trivial to add your own properties to XMP (the X stands for “eXtensible”), but this is a big topic which probably involves a whole bunch of new concepts if you haven’t ever done this kind of metadata work before. Be prepared for a kind of steep learning curve if you decide to go this route.
no subject
Steep learning curve is what I anticipated, so I will at least look into XMP and RDF, thank you! Music players defaulting to ID3 instead of being confused by my own metadata is totally fine; I wanted a way to have both present on the same file so ID3 would be the fallback anyway.
I use MP3 because it is broadly supported across even cheap outdated music player hardware, whereas some dollar store hardware is thrown off by even WAV files. Most currently available music is also ready to download in MP3 format. What audio format do you prefer? And what metadata container do you use along with it?
no subject
Personally? I use MP4, either with AAC (which is pretty broadly supported these days) or ALAC (Apple Lossless), but this is because I mostly only use Apple devices and those formats have broad support there. ALAC is the one which is less portable (although it is an open format, so support is growing); your other options for lossless audio are WAV (typically on Windows) or FLAC (typically on Linux), neither of which really have desirable metadata properties IMO. But IDK, don’t take my recommendations too seriously here; there aren’t any perfect solutions.
I’m happy to help talk you through some RDF concepts and point you towards relevant XMP stuff!! I haven’t worked too much with XMP in particular myself, but I have a lot of background knowledge in metadata more generally, and it’s a part of the ecosystem I wouldn’t mind being a bit more familiar with.
no subject
Hmm. I'll have to look into this more, but it seems like it would probably be useful to build my container to be compatible with more than one file format, if possible (and it seems like it should be given that other containers do the same). I'd like to be able to have FLAC and WAV support when I eventually build the program that's going to use the metadata. I do use multiple garbage devices though and I don't expect to stop, lol, so MP3 support is going to have to be a given. Based on what I've seen XMP may be exactly what I'm looking for, but I need to do significantly more reading haha, thank you :)
no subject
I have only dug around in image metadata stuff, not audio, but in terms of resources, ExifTool has a truly insane level of documentation on metadata formats and file formats, and it looks like it's got some audio and video formats on top of about a million image formats.
no subject
I haven't a clue how that is actually accomplished, or whether most of the ID3 tag editors implement all the possible frames into their ID3v2 tags, but that's a possible way of getting those tags into place without having to necessarily learn a completely different framework just to accomplish a goal. (If that's what you want to do, fabulous, go for it.)