Malcolm Sharpe and Bruce Sharpe
Copyright (c) 2005 Singular
Software
These are a couple of command-line tools for adding or extracting tags from an MP3 file.
settags - set the ID3v2 tags in an MP3 file from a tag
description file
gettags - write the ID3v2 tags from an MP3 file into
a tag description file
The intention is to supplement visual MP3 tag editors with something that can be run from a command line. It also facilitates collaboration: one person can write the tag file (e.g., a podcast show editor) and another one can apply the tags (e.g., a podcast show audio engineer).
If you are doing one-off tagging of a file or want to add identical tags to a large number of files, a dedicated tag editor like ID3-TagIT is a better tool. But if you need to add a consistent set of tags to a series of files (like podcasts) where some tags are repeated every time and some are new, these tools can be handy.
If you are used to Python, this is a snap. If you aren't, well it's not as complicated as it might look, really!
pytagger_setup.exe to complete the installation. On other platforms run setup.py.C:\bin\pyaudio.)Enter one of the following at a command line prompt:
settags.py tag_desc_file mp3_file
gettags.py tag_desc_file mp3_file
where
tag_desc_file is the tag description file (described
below)
mp3_file is the path to the MP3 file
Note that settags is designed to reset all the tags from scratch. That is, when it is run it first deletes any existing tags and then adds the requested ones.
tag_desc_file is a text file with one tag description per line. It starts with the standard frame id (always 4 characters followed by a single space). The tag value is the rest of the line, not including the end of line character.
Note that the tag values can have embedded single quotes, double quotes, forward slashes, ... almost anything. Comment fields (COMM) fields have a different structure in the ID3v2 spec than other tags: they have an initial null-terminated string for "Comment Descriptor". We leave this blank.
Example of tag_desc_file:
TCON Podcast
TRCK 462
TALB ETech 2005 (ITC)
TCOP RDS Strategies LLC
TPE1 Justin F. Chapweske
TIT2 ITC.ETech2005-JustinChapweske-2005.03.16
TYER 2005
COMM "The Swarming Web," by Justin F. Chapweske, ...