Tag Archives: mp3 tag validator

Fix for MP3 songs not playing in iTunes

The problem

About a month ago, while at work listening to music on my iPhone 3G, I noticed that certain songs weren’t playing.  The iPhone would pause for a brief moment at the start of the song and then skip to the next one.  It happens so quickly that if you weren’t looking at the screen you wouldn’t notice it.

At first, I thought it was an issue specific to the iPhone.  However, when I tried to play those same songs on iTunes 7.x, they would also refuse to play.   Since I am almost always playing music on “shuffle” (random) mode, it’s easy to see why I didn’t notice this earlier.  In fact, I had no idea how long this was occurring.

The odd thing was that these same songs would play in other media players like Windows Media Player, Winamp and Foobar2000.  It was just iTunes, and consequently the iPhone, that was giving me problems.

After researching the problem by scouring the web, I found that this was in fact a common problem hitting a lot of users.  I read a ton of suggestions, some dating back quite a few years.  Here are some of the suggestions that I found and tried in desperation:

  • Deleted the ID3v2 tag and rebuilt it
  • Disabled “Allow applications to take exclusive control of this device” from the advanced properties of my sound card
  • Re-installed DirectX
  • Removed song from iTunes Library and Re-added it
  • Completely uninstall iTunes and re-install it

None of these worked and I was making no progress.   I even tried upgrading to iTunes 8 hoping that it would be one of the hidden bug fixes.  Unfortunately, the new version of iTunes didn’t help.

Finding a solution

After quite a few more days of troubleshooting and experimenting, I finally stumbled upon the solution.  It turns out that the MP3s that wouldn’t play had out of spec MPEG headers, which I verified and repaired using a freeware tool called MP3 Validator.

(Update (2/5/2009): In the comments, “Chris” found an app that apparently works for Mac users called ID3 Editor.  Warning, I have not tried this app myself, just passing on teh recommendation. If it works for you, drop a comment a let me know.)

(Update (2/28/2009): In the comments, Vince determined that ID3 Editor on the Mac did not fix the problem.  So Mac users, don’t try that app.  Instead, the best method is to find a friend on with a PC!)

(Update (5/29/2009): In the comments, bowlerboy_jmb found out that there is indeed a Mac OS X equivalent for MP3Val called MP3 Scan + Repair which uses the same engine as the MP3Val program mentioned in this post! Mac users rejoice!

I scanned my entire library of music and turned out that about 60% of my music collection suffered from this problem.  Since only a subset of these songs wouldn’t play in iTunes (but would play fine in others), it seems that while iTunes is tolerant of some MPEG header errors it is not as forgiving as all other media players I tried.  Since I”m positive these songs played on older version of iTunes 7, something must have changed under the covers along the way in later iTunes update.

After scanning and repairing all the afflicted songs in my library, all my music happily plays in iTunes (and my iPhone).

Step-by-step guide on how to fix your music

Here’s a quick guide on how to fix this problem using free tools in case you’re suffering from the same problem.  I’ll show you how to fix one song, then you can use the same technique on your entire library if you need to.

  1. Download MP3 Tag Validator and extract it to a folder on your PC.  It doesn’t require any installation.
  2. To start the program, just run mp3val-frontend.exe. You’ll be shown a simple application window:image
  3. (Optional) First thing I did was to enable the option Keep file timestamps since I didn’t want all the timestamps to change from the repair.  Go to File | Preferences and make your configuration look like this:
    image
  4. Find one of the songs that won’t play in iTunes and add it to the MP3 Validator window.  You can either drag-and-drop it into the main program window, or you can go to File | Add File(s).  For me, one of the songs was Stealth by Way Out West. image
  5. We’ll now run a scan of the file first, to see if you are suffering from an MPEG header problem.  Click Actions | Scan all. The app is quite fast and you’ll get a modal confirmation dialog almost right away.  Dismiss it with OK.
  6. In order to see the results of the scan, you have to select the song in the main window, and then you’ll see status messages from the scan in the status area.imageHere is a copy and paste of the output, from which I’ve bolded the specific MPEG errors that are present in the file:

    Analyzing file “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″…
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″ (offset 0xa301a3): Garbage at the end of the file
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: Wrong number of MPEG frames specified in Xing header (13122 instead of 13056)
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: Wrong number of MPEG data bytes specified in Xing header (10711873 instead of 10658221)
    INFO: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: 13056 MPEG frames (MPEG 1 Layer III), +ID3v1+ID3v2, Xing header
    Done!

  7. Now that we’ve verified there are indeed MPEG header errors, let’s fix them.  Click Actions | Repair all files.  Similar to the scan we did in step 6, you’ll see a modal confirmation dialog informing you the repair was completed.  After dismissing the dialog, select the song and you’lll see a more detailed confirmation of the repair in the status area:

    Analyzing file “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″…
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″ (offset 0xa301a3): Garbage at the end of the file
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: Wrong number of MPEG frames specified in Xing header (13122 instead of 13056)
    WARNING: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: Wrong number of MPEG data bytes specified in Xing header (10711873 instead of 10658221)
    INFO: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: 13056 MPEG frames (MPEG 1 Layer III), +ID3v1+ID3v2, Xing header
    Rebuilding file “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″…
    FIXED: “D:\Music\iTunes\iTunes Music\Way Out West\Intensify\06 Stealth.mp3″: File was rebuilt
    Done!

  8. You should now be able verify that the song now plays in iTunes.  Since MP3 Tag Validator doesn’t rename the file, you won’t even have to re-import the song into your iTunes library.

In the default configuration, MP3 Tag Validator keeps a backup of the original song in the same directory with the added file extension .bak. If your library was as big as mine and spread over countless sub-directories, you’ll want to clean this up to reclaim the disk space.  In Vista (or Windows 7), this was really easy using the file search in Windows Explorer.  All you have to do is run a search in the root of your music folder for “ext:*.bak” (without the quotes) and you’ll get search results for all the backup files that were made. Just select them all and delete them and you’ll reclaim all the disk space.

image

Alternatively, you can configure MP3 Tag Validator to delete the backup files when it successfully finishes repairing the files, but I opted against this as I wanted to be absolutely certain the repaired files were OK before deleting the originals.

I really hopes this helps and saves time for at least one other person out there.  I probably wasted a total of 12 hours over the course of week trying to figure this out.