ID3 Tags

From Indie IT Wiki


This page contains information on correctly tagging MP3 music files in Linux.

Command Line Tools


HOWTO: Sort Genre Alphabetically

id3v2 -L |sort -k 2


This software Adds/Modifies/Removes/Views id3v2 tags, modifies/converts/lists id3v1 tags.

$ id3v2 --help
Usage: id3v2 [OPTION]... [FILE]...
 -h,  --help               Display this help and exit
 -f,  --list-frames        Display all possible frames for id3v2
 -L,  --list-genres        Lists all id3v1 genres
 -v,  --version            Display version information and exit
 -l,  --list               Lists the tag(s) on the file(s)
 -R,  --list-rfc822        Lists using an rfc822-style format for output
 -d,  --delete-v2          Deletes id3v2 tags
 -s,  --delete-v1          Deletes id3v1 tags
 -D,  --delete-all         Deletes both id3v1 and id3v2 tags
 -C,  --convert            Converts id3v1 tag to id3v2
 -1,  --id3v1-only         Writes only id3v1 tag
 -2,  --id3v2-only         Writes only id3v2 tag
 -a,  --artist  "ARTIST"   Set the artist information
 -A,  --album   "ALBUM"    Set the album title information
 -t,  --song    "SONG"     Set the song title information
 -c,  --comment "DESCRIPTION":"COMMENT":"LANGUAGE"  
                           Set the comment information (both
                            description and language optional)
 -g,  --genre   num        Set the genre number
 -y,  --year    num        Set the year
 -T,  --track   num/num    Set the track number/(optional) total tracks

Change to the directory where your MP3 album is located...

$ cd /path/to/album

Delete all the existing ID3 tags...

$ id3v2 --delete-all *.mp3

Set all the tags which are the same for the whole album...

$ id3v2 --artist "Led Zeppelin" --album "Led Zeppelin II" --year "1969" --genre "Rock" *.mp3

Then, set the tag for each song...

$ id3v2 --track "1" --song "Whole Lotta Love" 01\ Whole\ Lotta\ Love.mp3

Check your work...

$ id3v2 --list *.mp3


  eyeD3 [OPTS] file [file...]

  --version            show program's version number and exit
  -h, --help           show this help message and exit
                       Add an image to the tag.  The description and type
                       optional, but when used, both ':' delimiters must be
                       present.  The type MUST be an string that corresponds
                       to one given with --list-image-types. If the IMG_PATH
                       value is empty the APIC frame with TYPE is removed.

mp3fu BASH Shell Script

Paul Littlefield has written a shell script to set ID3 tags in a given directory.

There are a few personal preferences (like removing underscores, permissions and ownership, etc.) but you can tweak this as required.

It depends on id3v2, eyeD3 and rename(xm) being installed.

You just need to rip the album, check the file names (for things like ' apostrophes), download the cover art (500x500 pixels from somewhere like saved as cover.jpg, save the Genre in a plain text file called genre.txt, and make sure the directory is set like this /Artist/[year] Album/


/home/paully/Music/Linkin Park/[2007] Minutes To Midnight/
|-- 01 Wake.mp3
|-- 02 Given Up.mp3
|-- 03 Leave Out All The Rest.mp3
|-- 04 Bleed It Out.mp3
|-- 05 Shadow Of The Day.mp3
|-- 06 What I've Done.mp3
|-- 07 Hands Held High.mp3
|-- 08 No More Sorrow.mp3
|-- 09 Valentine's Day.mp3
|-- 10 In Between.mp3
|-- 11 In Pieces.mp3
|-- 12 The Little Things Give You Away.mp3
|-- cover.jpg
`-- genre.txt

Files For Download