Forget "every audio format". A modern tool just for Mp3/ID3 is sorely needed. The command-line syntax should mirror that of LAME 3.99, enabling tagging of any field and the embedding of any size image.
Well, with TagLib you basically get tagging of all important audio formats for "free". Even if you're not a programmer, you can see that the short example program taken from taglib is very powerful. It prints out meta-tags and audio property from any audio file format supported.
int main(int argc, char *argv[])
{
int i;
int seconds;
int minutes;
TagLib_File *file;
TagLib_Tag *tag;
const TagLib_AudioProperties *properties;
taglib_set_strings_unicode(FALSE);
for(i = 1; i < argc; i++) {
file = taglib_file_new(argv[i]);
if(file == NULL)
break;
tag = taglib_file_tag(file);
properties = taglib_file_audioproperties(file);
if(tag != NULL) {
printf("-- TAG --\n");
printf("title - \"%s\"\n", taglib_tag_title(tag));
printf("artist - \"%s\"\n", taglib_tag_artist(tag));
printf("album - \"%s\"\n", taglib_tag_album(tag));
printf("year - \"%i\"\n", taglib_tag_year(tag));
printf("comment - \"%s\"\n", taglib_tag_comment(tag));
printf("track - \"%i\"\n", taglib_tag_track(tag));
printf("genre - \"%s\"\n", taglib_tag_genre(tag));
}
if(properties != NULL) {
seconds = taglib_audioproperties_length(properties) % 60;
minutes = (taglib_audioproperties_length(properties) - seconds) / 60;
printf("-- AUDIO --\n");
printf("bitrate - %i\n", taglib_audioproperties_bitrate(properties));
printf("sample rate - %i\n", taglib_audioproperties_samplerate(properties));
printf("channels - %i\n", taglib_audioproperties_channels(properties));
printf("length - %i:%02i\n", minutes, seconds);
}
taglib_tag_free_strings();
taglib_file_free(file);
}
return 0;
}
I've always thought that a tool could be derived from LAME itself, and wonder why it's never been made a part of that project. Remove the encoding and decoding ability and add ReplayGain scanning and things like tag import and export similar to metaflac.
I suppose it could (but only for mp3) as it contains both tagging and replaygain code, but I'd say it's easier to add mp3gain/wavegain code with the above.