Cultured Perl: Fun with MP3 and Perl, Part 2
Ted writes "I continues to look at manipulating and guessing MP3 tags with Perl, FreeDB, and various CPAN models via my autotag.pl application. Writing autotag.pl was grueling but fun. I used fuzzy string matching, FreeDB searches, ID3 versions 1 and 2, and lots of text-mode user interactions. It all came together in an application that I tested thoroughly over the course of a month. Info and Slashdot comments about Part One can be seen here, which was posted in December."
As long as we're on the topic of useful perl scripts for manipulating metadata, let me offer some other scripts as well.
- ren-regexp
- A perl script that renames many files in parallel
using a series of regular expressions from the command line.
It's a profoundly useful script for those who are command-line and regexp power users.
-
mp3-ren-nice
- A perl script that attemts to clean up munged mp3 file names downloaded
from P2P networks. For example running the script on
"artist-title_title.2.MP3" will yield "Artist - Title Title.mp3".
-
newpl
- A perl script that creates an empty perl script template complete
with GetOptions code and a POD skeleton for writing more
scripts that manipulate mp3 files.
That and more here. Now wasn't that informative?Michael.
Linux : Mac
Isn't this the kind of thing MusicBrainz was invented for. For those who don't know about it MusicBrainz is like CDDB, but you can look up files based on an audio fingerprint as well as the tag information. This means that files could be tagged completely wrong and you can still match them in the database. They provide open-source software for generating the fingerprints, interfacing with the server, and the server software (should you, for some strange reason want to run your own site). There's a pretty easy-to-use client for Windows, and I've been considering writing my own client for Linux.
I copied all my cd's to mp3s on my harddrive, one thing, no ID3 tags.
Lucky, what I did do, is named them all with tracknumber-band-song.mp3 in each subdirectory.
Now that I have like 200 some directories, I don't want to go in with id3master on windows and make a id3 version1/2 tags on every file.
This is exactly what I need! I use cygwin to write small perl scripts to generate reports, so this should be a snap. He even has examples on how to use his perl modules.
Wow, nice for IBM to have a linux developers forum.