Gang,
I have a proposal for adding ID3 version 2 tag support to LAME. Why?
Well, someone asked about it on the mailing list several weeks ago and I
was bored and just wanted to make a contribution again. :-)
Actually, since version 2 tags are normally the first frame of an MPEG
audio stream, it's easier (less file I/O) to create them during encoding
than it is to add them later using another utility.
Why add version 2 tags at all? Version 1 tags are virtually useless
within streaming audio (since they don't appear until the end of the
stream), so version 2 tag support is essential for that type of
application.
Version 2 tags have one other very important benefit -- the fields (e.g.
"title" and "artist") don't have those annoying 30 character limits like
version 1 tags. This comes in very handy when using MP3 browsing and
librarian utilities, and is the main reason I want to add the feature.
Plus, I wanted to write it now so it has a chance of making it into the
3.84 tarball.
Rather than just sending in another patch (like I did for the optional
ID3 version 1.1. support), I thought I'd ask the developers and users of
LAME what they thought of the idea before I went to the trouble of
coding it all up.
To explain the new options and behavior of the feature I'm proposing,
here's what part of the output from `lame --longhelp' would look like
with ID3 version 2 support:
ID3 tag options:
--tt <title> audio/song title (max 30 chars for version 1 tag)
--ta <artist> audio/song artist (max 30 chars for version 1 tag)
--tl <album> audio/song album (max 30 chars for version 1 tag)
--ty <year> audio/song year of issue (max 4 chars for version 1 tag)
--tc <comment> user-defined text (max 30 chars for v1 tag, 28 for v1.1)
--tn <track> audio/song track number (converts to version 1.1 tag)
--tg <genre> audio/song genre (name or number, in list for v1 tag)
--add-id3v2 force addition of version 2 tag
--id3v1-only add only a version 1 tag
--id3v2-only add only a version 2 tag
--pad-id3v2 pad version 2 tag to at least 256 bytes
--genre-list print ID3 version 1 genre list and exit
Note: A version 2 tag will NOT be added unless one of the input fields
won't fit in a version 1 tag (e.g. the title string is longer than 30
characters), or the `--id3v2-only' or `--add-id3v2' options are used,
or output is redirected to stdout.
The idea is to add the version 2 tags in a "smart" way, i.e. ONLY when
version 1 tags won't suffice, or when version 2 tags are specifically
requested. This would mean a possible change in behavior from the
current version of LAME, but the older behavior could be duplicated with
the use of the `--id3v1-only' option.
I was working on my own ID3 version 1 and 2 tagging utility a few months
ago until I got interrupted by getting Mozilla Beta 1 out the door, so
I've got the code lying around to do this. I plan to use that code
instead of id3lib (see http://id3lib.sourceforge.net) because the
"official" library is a rather large collection of C++ and not available
on anything but *nix and Win32 currently, and it's not typically
pre-installed on those platforms as a .so or .dll.
Also, the code needed to write the tags is actually very simple.
Reading, parsing, and editing ID3 version 2 tags (which LAME doesn't
need) is the hard part and most of the reason for the large size of
id3lib.
So ... comments? Does anyone not want this feature? How about a
different behavior? Or should I just start typing away now? :-)
--
Don Melton
mailto:[EMAIL PROTECTED]
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )