Wednesday, August 29, 2012

If your iTunes songs are getting cut off...

...you may have a very simple solution.

I just moved my iTunes library to a new machine and found that a huge number of my ITMS purchased sons would cut off at odd points in the song (but for songs from the same album THEY ALWAYS CUT OFF AT THE SAME PLACE - oh iTunes how I sometimes hate you... ;) )

Anyhow, I chanced upon a solution to this (which I gleaned from a post 30 posts deep in an apple forum) which requires you to create a new music library and simply import your previous library into it.  This sounds complicated but it is, in fact, quite simple.

To do this, I held down the shift key (either one should work) when starting iTunes and iTunes gave me a little dialog allowing me to create a "new Library" which I did right next to my old one.  Then, after iTunes opened onto this new and empty library, I simply chose File|Library|Import Playlist and located my old library's base "iTunes Music Library.xml" file and imported that - bingo, it imported everything from my previous library.

After validating that this worked, and that my music was now playing properly, I consolidated all my files into my new library folder.

Hope this helps someone the way it helped me.

By the way, I believe that on OSX you hold down the option key when starting iTunes to replicate this approach.

31 comments:

  1. I can't believe that actually worked! How crazy is that!

    Just switched my computer to a system76 laptop running Ubuntu (yes, "My First Linux") and was running iTunes within VMware. I thought it was an after effect of the VM.

    Well, I guess I need to go re-check songs then! Thanks for posting this solution!

    ReplyDelete
  2. I don't know what I did wrong but the new library that I created wasn't empty. It looked like a copy of my original library with the same problem.

    ReplyDelete
  3. Mine did too. You have to copy and paste the xml file in there anyway. Seems to have worked for the songs that were on my computer already, but not for the ones I have on my external hard drive.

    ReplyDelete
  4. Worked you are a genius

    ReplyDelete
  5. Bless you man...it worked for me too

    ReplyDelete
    Replies
    1. Thank you!!!! It worked great! This issue has been driving me nuts for months!

      Delete
  6. Been searching for this fix for a looooong time. THANK YOU

    Was on the phone with apple support with no fixes until they just hung up on me.

    ReplyDelete
  7. so once done, do we delete the old library? sorry im not good with this type of stuff... thanks

    ReplyDelete
    Replies
    1. I know I'm late to the party, but yes, you can delete the old library, it's copied all the songs from your old library into your new one so you don't need the old one anymore.

      Delete
  8. good stuff! worked as described

    ReplyDelete
  9. Just wanted to add another report that this fix WORKED. I've been having trouble with more and more songs since getting an iPhone and trying to sync it to my computer. I created a new library and let the computer scan for media, then let it consolidate everything in the new location. All songs seem to play fine on my phone now. It took me a while to find this post and I'm kind of surprised the solution to the problem isn't more well publicized. Thanks!

    ReplyDelete
  10. yeah, this works but as soon as you import new songs it just does it again. It's too much hassle to wait (takes hours) for the creation of a new library. iTunes really needs to fix this as it's a massive bug which has been around for at least 5 years.

    ReplyDelete
  11. It worked!! Thank you! Saved me from a long night of trying to figure it out and probably failing to do so. Seriously it does work.

    ReplyDelete
  12. Thank you. I have been struggling with this for months. I was about to pull all my hair out.

    ReplyDelete
  13. omg best so good thank you

    ReplyDelete
  14. This problem had been driving me NUTS for 7 months. Your fix worked. THANK YOU, THANK YOU, THANK YOU!

    ReplyDelete
  15. THANK YOU!!!!!!!!!!!!!!!!!! I've been going crazy trying to fix this problem. A few clicks of the mouse and you fixed it. Wishing you many blessings.

    ReplyDelete
  16. " I consolidated all my files into my new library folder" What does this mean and how do you do it? Thanks

    ReplyDelete
    Replies
    1. You don't have to do this, but I recommend it - basically in the full menu, choose 'File' then 'Library' then 'Organize Library' and there should be a checkbox for "Consolidate files" - this means that wherever your music files are - iTunes will copy them into your new iTunes library location. Then you can know that all of your music is consolidated into a single place.

      Delete
  17. Well this deserves a big thank you and a push back up the Google rankings. May I add:
    1) To test whether it's the source files that are damaged, or the database, try playing them on another device (like your iPad), or the Quick View option in OSX finder. If they play through to the end, it's the database that's corrupted.
    2) To create the new library in OSX, it is the Option (alt) key that you hold down.
    3) Before importing the old xml file, make sure you have got all the settings and preferences right - the new library will have returned to default settings. This is particularly important if you've done something like move the music folder onto an external hard drive.
    4) In OSX it will sit there apparently doing nothing (with an activity bar but no progress indicator). Be brave and let it continue. You may want to run it overnight (for large collections) - remember to turn off Sleep options in System Preferences.
    5) If it goes wrong (like me, you didn't change the settings first time round), don't panic, nothing has been deleted, and your original music folders haven't been mucked about with. Just work out what you did wrong, and start again by creating another new Library.
    6) When I ran it, it lost a few pieces of artwork (only a handful in thousands). iTunes claimed at the end that some music was missing (but I haven't any errors and the numbers seem to tally). When you connect devices (like the iPad), you will have to change the settings so that it syncs with the new Library. All my smart playlists survived, but I had to spend time converting them back to the correct way of displaying. It seems that all the metadata (including sort codes) was retained.
    An hour or so after the rebuild was complete, everything was back in order and a week on it's all working fine.

    ReplyDelete
    Replies
    1. How do I get the new library to sync with my iPod (as opposed to the old library)? I've created this new library and imported everything. I *think" I'm syncing correctly but the problem is still there....

      Delete
  18. I have damn near 100k songs in my library! I'm not gonna re-import.... that would take days.

    ReplyDelete
  19. I have damn near 100k songs in my library! I'm not gonna re-import.... that would take days.

    ReplyDelete
  20. 5500+ songs...

    I'd be jamming out on the way to work or something, then BAM! the song would just end. Ugh.

    After all these comments I have no reason to think this isn't going to work, going through the steps as we speak, it's importing so hopefully, fingers crossed, we're going to be good!

    Thanks for this tip, I love my music. And you are correct, it's 'option' button for OSX users. Thanks again!

    ReplyDelete
  21. I tried this, but it wouldn't let me import the new library file. It said the file does not appear to be an exported file. I don't have xml library files. I have an .itl file.

    ReplyDelete
  22. Can anyone help me find the xml library? Running windows 10 on a surface book. Did a search for the iTunes music library but nothing came up. Someone please please give an updated solution! This problem is driving me crazy!!!!

    ReplyDelete
  23. Also, you might want to clear your mp3 files from blame. Download and run 'MP3Val'. Make a backup folder and copy all the suspect songs to it, and run them through mp3val. sometimes garbage(nonsense code) gets affixed to the end of a mp3 file, causing the virtual player(iTunes, Media Player) or physical player(iPod, Galaxy, etc) to become confused as to when the song ends, so it cuts off 1-2 minutes throgh a 4 minute tune. Just throwing it out there.

    ReplyDelete
  24. I did all of this and the songs are still cutting off when I play them on my iPhone. They play all the way through on my PC. Any ideas?

    ReplyDelete
  25. THANK YOU!!!!!!!!!! Apple should pay you :D

    ReplyDelete