Finding Corrupted iTunes files

Joined
Mar 28, 2006
Messages
390
Reaction score
10
Points
18
so my prior external drive on which my entire iTunes library is stored (~400gb) crashed and i recovered it using Revo. Problem is that in the recovery process a sizable number of iTunes audio files got corrupted. The corruption causes them to start to play, then a some point (it varies song to song, but aroiund 30 seconds or so) it stops and goes to the next song. This happened to mp3, apple lossless, aa4 ... it seems format independent.

The songs all "show" as normal ... song length, title, format, etc., all appear correct. It's only when you play them does the corruption appear.

My questions is whether there is any way to automate finding these corrupt files so I can replace the ones I'll miss or just delete them. I've tried a few search scripts but nothing so far.

Any ideas welcome
 
OP
Daddy Elmis
Joined
Mar 28, 2006
Messages
390
Reaction score
10
Points
18
ta DAAAH!!!

So, of course, Doug's Applescripts come to the rescue (I hope) again. He has a script for truncated iTunes files. This apparently can happen in cloud downloads from iTunes, but the phenomenon sounds identical to what I'm experiencing. I'm running the script now (over 13K files) and we'll see what happens.

I'll report the outcome, but props (and donations) to Doug.
 
OP
Daddy Elmis
Joined
Mar 28, 2006
Messages
390
Reaction score
10
Points
18
Doug's script works pretty good. It's fast. However, it seems that it finds new truncated files every time I run it. For example, on the first pass it found something like 60 files (out of over 13,000) that were damaged. However, I knew that some of the bad files were not on the list it found. So I deleted the first batch of "bad" files and ran the script again, and it found more bad files (maybe 30, all of course different than the first pass as I had deleted the first bad batch). Deleted those files, then ran the script again and it found a few more. Seems to find less each time, but always finds more. Can't explain that (and yes, I'm permanently deleting the bad files each time).

Still, it works infinitely better than having to listen to each file manually to see if it's bad.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Let's hope the script is actually finding truncated or corrupted files and not mistakenly "finding" good files. Have you tested any of those that it found before you deleted them?
 
OP
Daddy Elmis
Joined
Mar 28, 2006
Messages
390
Reaction score
10
Points
18
Yes -- I tested each file on the script's first pass to see if it was indeed finding bad files. Everyone it found was bad. The script works, apparently, by placing the iTunes "playhead" at somewhere around 20 second prior to the end of the song. If the song is truncated, it is copied to a new playlist call "truncated."

The script was designed for what is apparently a bug in songs downloaded from iTunes Match where this happens. The defective songs can be re-downloaded I believe.

I don't know what happened in my case other than the recovery software produced the same glitch. Mine generally are not re-downloadable because they were CD rips -- mercifully most seem to be stuff I don't really care to re-rip.

Here's the link to Doug's script: Truncated Tracks Script
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top