GNOME Bugzilla – Bug 167639
Support MusicBrainz metadata tags
Last modified: 2005-02-25 09:05:27 UTC
The MusicBrainz project has a set of tags it recommends are added to media it is used to tag. I'd love to add these to songs ripped with SJ, so need to support: Track identifier Album identifier Track artist identifier Album artist identifier These are documented at http://wiki.musicbrainz.org/wiki.pl?MetadataTags, along with how to write these to Ogg and ID3 tags. I'm willing to write the patch for this if it will be accepted into CVS.
Created attachment 37572 [details] [review] Add MusicBrainz tags to gsttag.h This patch adds the MusicBrainz tags to gsttag.[ch].
Created attachment 37573 [details] [review] Map the MusicBrainz tags to Ogg tag names This patch implements the mapping from the MusicBrainz tags to Ogg comment names, as per http://wiki.musicbrainz.org/wiki.pl?MetadataTags
Hey Ross, I´m not against adding this to elements. However, it sounds very wrong somehow to call the musicbrainz IDs in our core. It´s like adding a FLAC tag parser, but placing it in core. It´s not the right place. Can you somehow rename this to general names (just track ID, instead of musicbrainz track ID, etc.) or, if that makes no sense, not add those tag IDs inside core but just make them shared in the elements where it makes sense? Sorry I´m nagging, but I just don´t like the idea of musicbrainz-specific stuff in core...
As the tags when written to ID3/Ogg contain the word "MusicBrainz" it makes sense to use the current names, as putting a non-MusicBrainz URL in there would be pointless. Would it be possible to remove the changes to core and leave the changes in gst-plugins, so that sound-juicer could use strings instead of CPP symbols (i.e. "musicbrainz_trackid") when adding tags, but the Ogg tag converter could still convert them as required.
I'd like to see proper support for these tags as well. Maybe we can put the tag #defines into gst-plugins/gst-libs/gst/tag/tag.h and add a function like gst_tag_register_{musicbrainz|additional|foobarwhatever}_tags () to gst-plugins/gst/tag/tag.c and call that from the class_init function of plugins that support these tags? I still think it would be nicer to just put it into the core - after all it's just defines of real-world tags and not functions or other global symbols or the like. Cheers -Tim
The point of renaming them is that we´ve always aimed at not being biased towards any specific application or lib in the core. It´s 100% agnostic. If we support musicbrainz specific tags, then why not foobar? Why not myapp? Why not crappy-chinese-idiot-tag? Etc. It´s a political question, really, which is why I prefer the rename. The actual tags are OK.
But the Ogg Vorbis encoding of these tags is MUSICBRAINZ_TRACKID etc, so you can't avoid the MusicBrainz bit. Is there a way of adding tags to Gst at runtime?
Created attachment 37637 [details] [review] Map the MB tag names to Ogg tags OK, how about this. The patch tells the Ogg tag mapper how to convert from "musicbrainz-trackid" (etc) to Ogg tags. If an application wants to use these tags, it has to do this: gst_tag_register ("musicbrainz-trackid", GST_TAG_FLAG_META, G_TYPE_STRING, NULL, NULL, NULL); (etc) If this approach is good, I'll try and implement the mapping for ID3 tags too.
Created attachment 37647 [details] [review] Latest patch This patch implements most of Tim's proposal.
Created attachment 37648 [details] gst-plugins/gst/tags/tags.c This is the rest of the patch. Stupid CVS.
Created attachment 37649 [details] [review] A better patch This time I'll use "cvs diff" instead of "cvs upd"
Looks good to me. Thanks.
Applied.