Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Manage MP3 ID3 tag information from the command line UNIX
I hate when I download MP3's (which I of course have copyright permission for ;) and they don't have ID3 tag info. Also, as I am a unix geek, I hate anything I can't script at a command line. Therefore, I had to find a command-line tool to edit and display ID3 info. In my travels, I finally came upon id3tool. Admittedly, there probably are a lot of other tools, but this one was pretty darn easy. I downloaded the source, and used the standard ./configure, make, sudo make install and had it running in less than a minute (I have the latest Dev Tools installed, BTW). I'll e-mail the author and see if he's OK with me posting a binary to my website for this; if so and if anyone's interested, please make it known in the comments here.

Anyway, this, for me was perfect. Now I can shell script batch ID3 updating (perfect for when I have a bunch with the same artist/album). This has made my life a LOT easier.

Let me know if anyone wants an example of how to shell script using this tool. It's definitely not a "newbie" process, as the scripts I use require knowledge of sed, awk, cut and basic bash scripting precepts. But, even without scripting, this tool is a great, simple command-line way of fixing ID3 info.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[18,058 views]  

Manage MP3 ID3 tag information from the command line | 13 comments | Create New Account
Click here to return to the 'Manage MP3 ID3 tag information from the command line' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Manage MP3 ID3 tag information from the command line
Authored by: gvaughn on Wed, Aug 6 2003 at 10:44AM PDT
I'd like to see your shell script.

[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: ygor on Wed, Aug 6 2003 at 11:10AM PDT
I have some command line apps I wrote using ID3Lib. The library is available at http://id3lib.sourceforge.net/

I would be more than happy to share what I cobbled together if anyone wants.

[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: darkhalf on Wed, Aug 6 2003 at 12:12PM PDT
id3tool is in the fink tree.

[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: ygor on Thu, Aug 7 2003 at 10:19AM PDT
I looked at id3tool.

Very nice. Simple, easy command line interface.

However, it is limited to version 1 type id3 tags which have a finite list of tag fields of fixed length.

Info about ID3V1 here

The ID3Lib I am using supports version 2, which I prefer to use as it is not limited by size of tag or tag sequence.

Info about ID3V2 here

[ Reply to This | # ]

Manage MP3 ID3 tag information from the command line
Authored by: bluehz on Thu, Aug 7 2003 at 9:06PM PDT
So what would be your suggestion for doing the same thing as id3tool for ID2 tags?

[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: ber on Tue, Nov 11 2003 at 8:34AM PST
Take a look at <http://id3v2.sourceforge.net>. It requires <http://id3lib.sourceforge.net>. I just downloaded both packages and they compiled with no problems on 10.3 with the Dev Tools installed. Just read the simple INSTALL file in the id3v2 directory for complete instructions.

You end up with a command line program called id3v2.

brian


[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: saltydog4791 on Wed, Aug 6 2003 at 2:48PM PDT
Bring on the scripts.....

[ Reply to This | # ]
Shell Scripts
Authored by: Shiver758 on Wed, Aug 6 2003 at 7:40PM PDT
Ok.. This is a particularly tangly example, and written on the fly. Therefore it hasn't been "optimized" or anything like that. Please cat flames on my bash scripting ability to /dev/null.

for i in *.mp3
do
album="The Thorns"
artist="The Thorns"
tnum=`echo $i |awk '{print $1}'`
fname=`echo $i |awk -F\( '{print $1}' |awk -F\- '{print $2}' |cut -c 2-|sed s/.$//g`
id3tool -c$tnum -t "$fname" -a "$album" -r "$artist" -y 2003 "$i"
done

This one was made to take apart a list of filenames with the number of the track, and the name (example "01 - Runaway Feeling (The Thorns.The Thorns.2003).mp3"). I knew the artist name, the album, and the year, so I just hardcoded them. enjoy!

[ Reply to This | # ]
Binary
Authored by: Shiver758 on Wed, Aug 6 2003 at 9:09PM PDT
Ok, I've e-mailed back-and-forth with the author, who assures me that I don't need his permission to do this. So, here goes.

I've tarred up the directory I installed from, so the easiest way to install (once you've un-tarred the file) is to simply change to the newly created id3tool-1.2 directory then sudo cp id3tool /usr/local/bin/ . If you have problems, please let me know.

Here's that link: link

Best of luck. :)

[ Reply to This | # ]
GPL, that's why
Authored by: Xeo on Thu, Aug 7 2003 at 2:28AM PDT
Just for future reference, you don't need to ask the author of any source code when it's released under the GPL. If it's not under the GPL, then just look for the file regarding the license among the source code. It will always tell you the terms of distribution.

Not preaching, just teaching. :)

[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: Ambush_Bug on Fri, Aug 8 2003 at 2:33AM PDT
I found out that if you rip a CD to mp3, but you don't have net access
at the time, you can make iTunes add the ID3 stuff later.

Basically, rip the CD but make sure you make a playlist with everything
in it. Then later, you can select the playlist and go to the CDDB menu
up at the top (I'm away from my mac at the moment, so forgive me for
not remembering where it is) and it will find the album and correct the
names for you. I thought this was pretty cool.



[ Reply to This | # ]
Manage MP3 ID3 tag information from the command line
Authored by: bluehz on Sat, Aug 9 2003 at 1:00AM PDT
Take a look at this perl module. Has some nice example scripts with it. Modifies MP3tags, incl id3v2, renames, etc. Compiles and installs just fine in OS X.

http://search.cpan.org/author/THOGEE/tagged-0.40/

[ Reply to This | # ]
But wait, what about album art?
Authored by: schnogg on Mon, Nov 6 2006 at 11:13AM PST
This little tool rocks!

I have been using this tool in a Cocoa Applescript app in lieu of using iTunes to do it (since iTunes v7.0 changed its dictionary so dramatically).
Is there anything that does this, plus album art? I 'm looking to do this without extra dependencies like Perl modules.
I see that id3lib itself works with album art, but I'm not experienced enough to implement a c library into an applescript-only app. :)
Any help is appreciated.
J

[ Reply to This | # ]