How to use MP3Tag rules to edit your music files metadata tags to tidy up your iTunes or music library
Guide to using MP3Tag to rename your music files or replace particular characters or words easily and quickly
Today, I will be looking at using MP3Tag to create rules to quickly and easily edit the metadata or tags for your entire music collection no matter how large your library may be. Over time, as you add music to your media player (such as iTunes) from a variety of sources, the track, artist and album names can all become untidy or disorganised. This hub came about as I looked at tidying up my very large library of some 27,000 tracks so that in iTunes all my Track, Album, Album Artists and Artist Names were all consistently named and formatted.
I had an extensive list of things I wanted to change including:
- All words in the title, Album Artist or Artist fields started with a capital letter except 27 words such as all, any, don’t, in, the and so which I all wanted to be lowercase unless they were at the start of the field
- A number of words and symbols replaced. For example, & replaced by and, no and no. with number, ft. and feat replaced with Featured
- I also deleted [ and ] and added a space either side of all –
- Finally, I ensured that all the artists names were consistent throughout my library, for example Ke$ha, Guns N’ Roses, B.o.B and Will.i.am
Now, had I done this manually, it would have taken literally hundreds of hours. Instead, I used MP3Tag and made all of my desired changes very quickly in a matter of minutes.
Understanding how Metadata or Tags are used to store information about your music
Before we begin, let’s look at the tags that store all the information such as Title, Artist, Year, Track Number, Genre etc. All this information or metadata (and a great deal more besides) is stored in a tag which is part of the MP3 file stored on your PC or Mac hard disk.
The easiest way to see the information stored in a tag is:
- Right click on a track in iTunes
- Select Get Info
- Click the Info tab
You can see an example below:
Imagine, instead you saw the following:
Now of course, you can simply change this by correcting it until you are happy with it and pressing OK. But imagine if you had a library of 10,000 tracks or more that had all sorts of mistakes or things you wanted to change. That would take an awfully long time. This is where MP3Tag comes in. Using it, you can create rules (called actions) and use them to format your tags simply and more importantly quickly.
Using MP3Tag to organise and tidy your metadata or tags in your music library
Firstly, download MP3Tag from the following URL http://www.mp3tag.de/en/download.html. Once installed, launch the application.
To begin, you first need to load the directory that contains your music:
- Click File
- Add Directory
- Browse to your music folder and choose Select Folder
MP3Tag will then read all the tags associated with the music stored in that folder and list them
You can see below, it has loaded my music, ready for me to make some changes to their tags.
Note: Until you select a track, all the toolbar icons will be greyed out.
Now before we get started, a few really important points:
Creating a rule (or action) using MP3Tag
OK, now we are ready to create our first rule to format our tags. In our first rule, we are going to replace & with and
- Select a small number of tracks (just enough to check your rule works as expected)
- Click on the Actions menu and then select Actions again
- Click the New button on the right
- Give your first rule a descriptive name, such as Replace & and click OK
- Press New once more
- As we are replacing & with and, select Replace from the drop down list and click OK
Now, we have to create exactly what the rule (action) will do. Be very clear in your mind exactly what you want the rule to do, to minimise or preferably eliminate mistakes.
- Now, select your new rule and hit the Duplicate button
- Change Field to Artist and click OK
Now we have our action set up and ready to apply to our selected tracks.
Note: actions need to be selected for them to be run
Note: as soon as you click OK, MP3Tag will run the action on the tracks you chose. If you don’t want to run your action, click Close
MP3Tag will then show you how many tracks have had their tags changed as a result of your rule.
Note: Case Conversion is a prebuilt action which changes a words case to Mixed Case in this instance. So all words will start with a capital and all other letters will be in lowercase. This is an excellent rule to use as a starting point.
To create a Case Conversion action if one is not created for you automatically:
- Click New when you are in the Action Groups screen as above (if not, select the Actions menu and then Actions to get there)
- Call your new action Case Conversion
- Press the New button
- For Case Conversion, select Mixed Case or one of the other options, depending on your personal preference
- In Field, choose TITLE
- Click OK and use the Duplicate button to create an action for any other fields such as ARTSIST or ALBUMARTIST
Now, the eagle eyed among you would have noticed something about the action we just created to replace & (I will use _ to represent spaces to make it clearer). We just created an action, to replace
& with _and_
This works perfectly if we have the following tag
But what happens if we have a tag
We end up with
Now, we needed to write the action that way to ensure that all & were replaced with and, regardless of whether they had a space on either side. To tidy this up, we need to create an action that removes double spaces:
- So as before, click the Actions menu and select Actions
- Select New once again
- Use something like Spaces or Remove Double Spaces for the name of your action and click OK
- Choose New
- Once again, we are going to use Replace
- In Field, pick TITLE
- In Original, we are going to put in two spaces
- In Replace with, enter in one space
- Press OK
- Using the Duplicate button, create additional actions for any other fields you want to tidy up
I also created a rule that changes specific words to all lowercase as is my preference. The rule looks like this:
The final step, once you have run the action by clicking OK on the Action Groups dialogue box, is to press Save to commit the changes to your tags
If you get the below warning, always click Yes.
Now go into iTunes and check the tracks that belong to the tags you just changed and ensure that your rules did exactly as you wanted. If they did, choose some more tracks in MP3Tag and run your actions on them as well.
Note: iTunes may not automatically display the tag changes. You may need to select the tracks you updated or restart iTunes for the changes to be visible.
Understanding how precedence effects your actions in MP3Tag
The final thing to consider when designing your actions is precedence. MP3Tag runs all the selected actions in order. This may result in unexpected results if you have your actions incorrectly ordered.
MP3Tag starts with the first action (the topmost one) and works down the list until it completes the final action at the bottom of the list.
As a general rule, place the most general action at the top and the more specific ones below it. Also group together rules that make changes that are related to more easily ensure correct results.
Let’s illustrate precedence using an example:
Suppose I have a track with the following name:
sugar & spice
I have my actions in the following order
- MP3Tag takes the first action Double Spaces and checks for double spaces of which there are none
- It then looks at the second action (Lowercase all words on List) and finding none of those words in the title again does nothing
- Next, it replaces & with and using the Replace & action
- Finally, it runs the Case Conversion action and changes all words to Mixed Case
So we end up with:
Sugar And Spice
You will notice two things from this example:
- Two of our actions (Double Spaces and Lowercase all words on List) did nothing
- We ended up with a result that did not meet our expectations
Now, on the Action groups screen, we are going to order our actions so that we end up with exactly what we want.
Using the arrows in the bottom right, we put them in the following order (remember start with general actions and moving to more specific rules), also grouping together actions that are related. Also, think very carefully about exactly what each rule does and order them appropriately.
- Now, the first action changes the name to Mixed Case
- The second action does nothing once more
- The third rule changes the & to and
- The final rule also does nothing
We end up with the correct tag:
Sugar and Spice
Over time, it is very easy for the metadata or tags associated with your music files in your media library to become untidy or disorganised. Thankfully, you can use software such as MP3Tag to tidy up all your music so that it is consistently formatted and organised. In this hub we:
- Looked at the data stored in tags and how to access and change it
- Setup MP3Tag to change the tags or metadata
- Before creating any actions we looked at some rules you must follow to ensure that the actions you create in MP3Tag to tidy up your library do not create unexpected or bad results
- Created actions to make specific changes to tags (such as replacing & with and)
- Discussed precedence and how it affects your actions
Using this software, I tidied up my massive music library, saving myself countless hours that I would have had to spend manually changing tags. I hope that not only have you found this hub, useful and informative but that you too now have a perfectly tidy and organised media library. Thanks for reading and please feel free to leave any comments you may have below.
© 2013 Robbie C Wilson