Ubuntu – Erase and rewrite MP3 ID3 tags

id3mp3

Background

I have a Squeezebox, and am running the Server on my (Natty) machine. This server scans my music directory and adds all files found therein to the server's library, to be streamed over the network to the devices.

Problem

There's a problem though — not all of my files are recognised due to the server's tag parser being buggy. I've filed a bug upstream about this.

Question

To fix this problem, I'd like to erase and rewrite the ID3 tags on my MP3s. Ideally I don't want any of the tags to change. Do you know of a program or script which can do this? Somehow iterate over all of my files and save their metadata, then erase it from the file leaving just the audio before writing it back. I'm trying to avoid writing a script to do this myself (although I will do if nobody knows a program/can come up with one). Hopefully this clean rewrite will then be accepted by the server. If not, well, at least we tried.

Best Answer

Picard is an amazing program, highly recommend it. +1 to ssweeny's rec.

However, if you just want to rewrite all existing tags, I think Ex Falso (apt link) and id3convert (apt) will better suit your needs. You might be able to do this all in Ex Falso, but I like knowing the original tags were removed.

Incidentally, Ex Falso has a plugin to tag via MusicBrainz just like Picard.

Process

  1. Use Ex Falso to rename all your files using the fields you want to keep (tip: hit "Preview", then "Save").
  2. Delete all your tags: find . -type f -iname '*.mp3' -exec id3convert -s {} \;
  3. Check to see tags are really gone: id3info example.mp3
  4. Use Ex Falso to retag based on the file names or MusicBrainz.

Ex Falso renaming files