Is there a tool that can detect (and if possible, fix) glitches in MP3 files?
The command-line tool mp3val makes quick work of scanning for, and optionally repairing, structural defects in mp3 files. I try to run it over pretty much every file in my collection, on the "can't hurt" principle. It identifies amazing numbers of ostensibly-good files with defects ranging from inconsequential to severe.
mp3val is especially good at recognizing and correcting header deficiencies, such as lack of VBR headers in a VBR file (the source of most wrong-duration and seeking issues). But it will also clear out garbage/corrupted audio frame data, unusable cruft that some players may handle less than elegantly if it's left in the file.
It can even be told to run over an entire directory of mp3's, repairing only those files it finds problems with, keeping backups (or optionally not), preserving timestamps (optionally), and logging the session to a text file (optionally).
And it's free and open source! (The link is to its sourceforge project.)
EDIT: One last thing I forgot to mention. "But mp3val hasn't been updated since 2009!!", I hear you cry. That's very true! It's been working just fine since 2009, and hasn't needed an update. (After all, it's not like the MP3 file format has changed any in the past 2 years!)
I assumed you already tried the first option on google ...? Also a perl script, mp3checker, that might be useful.
Edit:
As for repairing your tracks might give MP3 Diags(links to a lifehacker article) a look.
mpck works on Windows and GNU / Linux.
Home page: http://checkmate.gissen.nl/
It detects bad frames and generates optional reports.
There is a GUI frontend for windows too.
mpck 0.19 - checks a MP3 file for errors
Usage: mpck [OPTION]... [FILE]...
Verbosity:
-v, --verbose print some extra info
-q, --quiet print only Ok or Bad per file
-B, --badonly only report bad files
Other options:
-R, --recursive check directories recursively
-e, --extention=EXT only check files ending on .EXT
-r short for -R -e mp3
-m, --maxname=NUM report bad for filenames which exceed NUM characters
-n, --namecheck check for strange characters in the filename
-x, --xmloutput output results in XML
-h, --help print this help, then exit
-V, --version print version information
Update:
This program seems to be fully capable of handling utf-8 file names, although I haven't tried japanese, chinese or more exotic glyphs.
Gentoo (UTF-8)
$ mpck -r 2000\ -\ Завтрак\ на\ траве\ \(USA\)/ | grep SUM
SUMMARY: 2000 - Завтрак на траве (USA)//04-ja-sbrasyvaju-kozhu.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//07-tak-vot-kakaja-ty-demo.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//09-evrej-i-goj.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//06-teplyj-dozhd'-demo.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//01-vse-napominaet-o-tebe.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//02-marsh-novoselov--sf-unplugged.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//05-rubaha.mp3
SUMMARY: 2000 - Завтрак на траве (USA)//03-kalifornia-love.mp3
Cygwin with UTF-8 locale (japanese locale in windows)
The native windows binary is not aware of cygwin so I had to convert the output.
$ mpck.exe -r "2000 - Завтрак на траве (USA)" | grep 'SUM' |
iconv -f CP932 -t UTF-8
SUMMARY: 2000 - Завтрак на траве (USA)\04-ja-sbrasyvaju-kozhu.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\07-tak-vot-kakaja-ty-demo.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\09-evrej-i-goj.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\06-teplyj-dozhd'-demo.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\01-vse-napominaet-o-tebe.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\02-marsh-novoselov--sf-unplugged.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\05-rubaha.mp3
SUMMARY: 2000 - Завтрак на траве (USA)\03-kalifornia-love.mp3