Fix for MP3 songs not playing in iTunes

Technology | Wednesday 17 September 2008 11:10 pm

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.

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.image

    Here 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, 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 problems wasted a total of 12 hours over the course of week trying to figure this out.

Tags: , , , , ,

23 comments »

  1. golgo hakase — September 20, 2008 @ 1:00 am

    Dude, excellent detective work! I only just today ran across a folder of files that wouldn’t play in iTunes but worked great in Audion (yeah, I’m crossing platforms here). I ran them through MP3Val (I got “MPEG stream error, resynchronized successfully” after the scan, but had to run the repair as well) and they all work perfectly now. The one thing that bummed me was that all the tag info vanished in the rebuilt files. I figure this may be the result of having older-version MP3 tags in the files, but can’t be certain. And it was only a single album that was messed up, so it’s easy to fix. Anyway, extremely glad to have these files working again. You (no pun intended) ROCK! gh

  2. Trevin — September 20, 2008 @ 11:03 am

    golgo: In order to avoid losing ID3 tag info, what you might want to try next time is to use iTunes to “convert” the song tags to ID3 v2.3 first, then follow my step-by-step. If the tags are just ID3v1, I think MP3 Validator will blow them away.

  3. golgo hakase — September 20, 2008 @ 2:19 pm

    Trev, that would work only IF iTunes recognizes the files in the first place. My prob was I couldn’t even get these into iTunes at all. I tried drag-n-drop, Import, and everything else, but it just wouldn’t recognize that these were MP3 files. So now I’m wondering if there’s a nifty little util somewhere that does tag upgrades on batch files (Mac or PC would be OK). I’ve been burning my CD collction for a few years now and I’m guessing that a lot may have 3V1 or even earlier (!) tags attached. Any lines on a tag-conversion util that might help out here? Of course, it’d be even better if Alexey could add this to his handy little utility, but I’m sure he’s got enough to keep him busy as it is. :) Thanks for help again! gh

  4. Trevin — September 20, 2008 @ 3:31 pm

    Golgo: One thing you could try is just to play the song in one of the “modern” media players like Windows Media Player or Winamp or Foobar2000. If you edit the tag in those players, I think that it automatically writes out an ID3v2 tag behind the scenes. Since ID3v2 spec has been around for 5+ years, it makes sense that all these apps assume writing a v2 tag out is safe.

  5. Konrad — September 21, 2008 @ 7:33 pm

    Fixed my problem (also after deleting my library the “bad” mp3s wouldn’t be recognized by Itunes), thank you for finally finding out what is wrong with Itunes and finding a fix.

  6. swiss — September 27, 2008 @ 8:46 am

    dude, nice job! thanks for this post, it helped me after the wmp corrupted some mp3 files of mine .. i should change my os :S

  7. Murilo — October 15, 2008 @ 10:08 pm

    OMG thank you so much! I was freaking out. Out of nowhere I couldn’t play certain songs and I could not figure it out or find any sites that could help me. You saved me man!

  8. Emily — October 18, 2008 @ 5:34 am

    Thanks so much!! It was driving me crazy and i thought I would never hear these songs again….

  9. thiazi — October 18, 2008 @ 5:36 pm

    This was exactly what I was looking for - it amazed me that I had something like 7000 files with issues, which lead to almost 1000 of those not being recognized by iTunes. Thanks for posting this information.

  10. Frankenpunk — October 18, 2008 @ 8:33 pm

    Thanks for doing all that leg work. I’ve been trying to import the remaining 30% of my mp3 library into iTunes for weeks. I tried the whole gamut, but didn’t find this program, didn’t conceive of the problem (corrupt data in such a large portion of the library’s tags?). Well, it’s working for me! Thanks so much.

  11. Pierre — October 20, 2008 @ 3:57 pm

    Thanks so much…. 160go library, so many bad files !
    Do you know how to prevent it from happenning again ?

  12. navid — October 24, 2008 @ 8:54 pm

    thank you so so so very much friend!

  13. Owen — October 26, 2008 @ 12:17 am

    Fantastic. Exactly what i needed. Thanks for taking the time to make this blog. So many threads out there on this topic with no solutions, and all they need is a link to this site.

  14. Jesse — October 27, 2008 @ 7:53 am

    Thanks bro. I appreciate the time you put into this. I was tearing my hair out and cursing Apple for the last few days, trying to fix the problem.

    Excellent work.

    -j.

  15. Mick n Eire — October 29, 2008 @ 8:46 am

    Ahh, Finally someone with more competance than Apple.
    Many thanks for your help.

  16. KA — October 29, 2008 @ 9:46 am

    90% of my 30000 songs still won’t repair, say unknown file format though they end in .mp3

  17. ewing — November 8, 2008 @ 5:35 pm

    My problem with few songs is that they’ve got different time in itunes than in winamp for example.
    I tried mp3 validator, it found the problem, fixed the problem but there is a still problem.

    When I rescan them again, it again says there is an error. Any suggestions?

  18. brgm — November 14, 2008 @ 2:12 am

    This is fantastic !!
    The last few months I spend really a lot of time getting my massive music library 100% organised: correct artists, album names, correct artwork…
    You can imagine the horror when I suddenly discovered that entire albums didn’t play anymore in iTunes. Reimporting them from the original CD seemed the only cure. I really searched the internet for a solution, but could not find anything untill I stumbled upon your page.
    One remark: the MP3 Validator converts the ID3 tag back to v1, and as such deletes the Album artwork.
    Nevertheless, thanks a lot for this!
    B.

  19. Pete — November 20, 2008 @ 12:19 pm

    Excellent!!! Thanks!! It helped me a lot!!!

  20. Tom — November 24, 2008 @ 11:27 pm

    THANK YOU DUDE! It literally took me months to find a solution and you were the savior. No forums, no apple support helped, but your blog helped. Thanks.

  21. Mark — November 25, 2008 @ 4:30 pm

    First class work. Worked a dream. Just wanted to add some keywords for others searching for same issues.
    Unprotected MP3s playing in Windows Media but not in iTunes

  22. 1234 — December 2, 2008 @ 10:46 pm

    THANK YOU THANK YOU THANK YOU! I’ve spent three days pulling my hair out trying to figure out why iTunes would not recognize some files.

    I love you.

  23. Anshu Kapoor — December 3, 2008 @ 11:22 am

    Dude, Thanks a lot for this. Excellent work. I have been beating my head across internet only to come across useless solutions.

    This is the ultimate solution. I download a lot of music and was frustrated to find out that of it is not playing in my iPod.

    Thanks again.

RSS feed for comments on this post. TrackBack URI

Leave a comment