mp3val special unicode edition
The other day I was looking through my MP3 collection and found that for some reason, iTunes was showing several tracks as having a time of 0:00 and refusing to play them. Fearing that my files were bad, I tried them in VLC and SongBird and they played without any problem. A definite WTF moment.
Some web searching later, I found that this is not an uncommon problem and that you can use a free tool called mp3val to validate and fix these problem files. I began using it and it was working great except for a "small" problem: it refused to read files that had any multi-byte characters in the filename. Oops.
I spent a few hours hacking together a solution that will read filenames with multi-byte characters without any issue. The logging is horked, and it doesn't seem to work with the mp3val front-end software (that probably needs some refactoring as well, but I'm too lazy to do that at the moment), but it gets the job done and seems to work perfectly at its job, and that's fixing busted MP3s.
I've provided my modified sources and the executable for those who just want to fix their stuff without fiddling with it. Link is at the end of this post.
This is provided as-is with no warranties or guarantees. Use at your own risk! Don't blame me if this hoses up your MP3s. :) I've only tested and built this on Windows, so I have no idea if these changes are portable to other OSes or not. Sorry.
As to what originally hosed these files, I blame Picard as that was the last thing I ran against these files before iTunes started pitching a fit, but it could have just as easily been iTunes.

Leave a comment