MP3 Tagging tools
Back to the front door...
So, I have been slowly migrating all of my CDs in to MP3s (not going to argue on FLAC vs MP3 - it's an educated personal choice) but I also have an existing MP3 collection from the CDs I had already ripped. When either ripping or tagging I ran into a couple of problem I couldn't find tools to solve, so I wrote them myself.
I have written two tools, mp3view and mp3gain.
Download: mp3view2.pl - rename it from TXT to PL.
Unlike a lot of people, I strangely like to have my individual non-mixed tracks located in one flat folder and any mixes (such as Ministry Of Sound mix albums, etc...) go into another folder sorted by Albums in separate folders. I also embed all of my MP3s with the album art from the album it is from so they are fully portable across a multi-tude of systems.
Therefore, I want my original system kept as is for me, but software like Windows Media Center annoyingly requires you to have it structured in the 'Album Artist -> Album' directory structure with the album art stored as 'Folder.jpg'.
I will not be ranting about how rubbish that required structure is on a technical level; I have got over that now :). But instead, I wrote a PERL script that runs on my Linux NAS that does the following:
This is what I use - have it configured in Cron to run daily. Takes about 1 hour to process and shortcut 15000 MP3s. I then have iTunes, MediaMonkey, Windows Media Center, etc... to read / update it's library from the Samba share pointing to /c/Music/View
mp3view2.pl --delnonexists --createlinks --mp3dir=/c/Music --linksdir=/c/Music/View --recursive --excludemp3dir=/c/Music/View 2>&1 > /var/log/mp3view.log
Here's the usage information:
mp3view2.pl [--debug] --mp3dir=
--linksdir= [--createlinks] [--delnonexists] [--skiperrs]|--help --createlinks ** PLEASE DO NOT USE THIS ON THE FIRST RUN - without ** ** it, we will show you tracks that don't have ID3v2 ** ** tags or don't have the AlbumArtist tag populated. ** ** ** ** Creates folders / links in --linksdir from MP3s ** ** found in --mp3dir. Any action that would have ** ** occurred is displayed on STDOUT prefixed by ** ** *ACTION*. This information is automatically ** ** included if you run with the --debug option. ** --debug Displays debug processing information --delnonexists If tracks have been removed / renamed, then links in the folder structure that point to MP3s that are not present in --mp3dir, are removed. --excludemp3dir If you have used the --recursive option and have dirs within the location specified in --mp3dir, you can add directories under it to an exclude list where we will not process any MP3s found. --help Displays this help information --linksdir=<path> Output folders for artists and albums including soft links to the actual tracks will be written here. --mp3dir=<path> Script will search for MP3s to create the links to represent a flat MP3 collection in a folder structure that Media Center et al. can understand. To specify multiple directories, separate them with a : (colon) The Location where the links / folders are written to is set by --linksdir option. ** THIS MUST BE A FULL RELATIVE PATH ** --recreate Can only be used with --createlinks. This will remove any existing links and recreate them. --recursive Use this option if you want us to recursively look for MP3s within the directories specified in --mp3dir --skiperrs If there are any errors with creating directories / links, then do not stop processing.
Download: mp3gain.pl - rename it from TXT to PL.
Download: metamp3.exe v0.92 beta 5 - required tool for this to work; install in the same directory as the PERL script.
When I am ripping my tracks from CD, I don't want the original tracks changed when it comes to the volume gain. However, I like the gain information to be written to the MP3s within the tags leaving it to the player to adjust the volume dynamically.
The tool I found most useful for this is metamp3.exe by Tycho. However, for it to write the Album Gain tag, you needed to supply the individual tracks that make up that album on the command line. This was something I wasn't willing to do manually and also wanted to have the gain tags written across multiple albums. Hence, I wrote this PERL script!
Here's the usage information:
mp3gain.pl [--debug] [--directory=
] [--rescan] [--update]|--help --debug Displays debug processing information --directory=<path> Script will search for MP3s to analyse their volume gain information. By default, we use the current directory --help Displays this help information --rescan If volume gain information is found, instead of skipping the tracks, they will have the tag information deleted before scanning / updates take place (it's a limitation in metamp3.exe unfortunately) --update Updates the MP3s with volume gain information if it is found to be missing or inconsistent within the MP3s. It will also set Album Gain details for tracks.