How to diagnose/repair bad FLAC files?
January 13, 2019 7:41 AM   Subscribe

I was trying to listen, on my iMac (10.14.1) to some FLAC files I'd gotten a while back and never tried. While some are fine, others stop 30 seconds in or fade out halfway through. I've tried playing them on VOX and VLC, and the result is the same on both.

Is there a Mac app to scan a folder of music to identify bad files and/or to repair these corrupted files?

Thanks in advance
posted by the sobsister to Computers & Internet (5 answers total)
 
If the files are corrupted you won't be able to repair them unless you had previously created redundancy files from good sources.

You can integrity check your current files with the official flac command line tool.

If they all have the standard .flac file extension and are all in a single directory try the command
flac -st -- *.flac 2> ~/badflacs.txt
that should create a text file in your home folder with a list of errors encountered.

Most likely you have them sorted by albums across many different directories, in that case navigate to the highest level folder where you keep your music and try something like
find . -iregex '.*\.flac$' -print0 | xargs -0 -- flac -st -- 2> ~/badflacs.txt

However, the fading out halfway thorugh sounds more like you have good files that just were never complete to begin with.
posted by Bangaioh at 9:51 AM on January 13, 2019 [1 favorite]


Response by poster: Bangaioh,

Thank you. I've never used the FLAC command line tool. Is this something I'd invoke via Terminal, or is it a separate installation? Sorry, this is uncharted territory for me.
posted by the sobsister at 10:31 AM on January 13, 2019


Perhaps try downloading Audacity and see if will import the file. If it's just a tiny section that's corrupted it's pretty easy to use the audio editing tools to snip small section.
posted by sammyo at 11:28 AM on January 13, 2019


Best answer: Is this something I'd invoke via Terminal, or is it a separate installation?
Yes, you use it in the terminal and you must install it first. I don't know how to do so on a Mac, maybe with Homebrew?

There are probably graphical programs to diagnose your files, if you were using Windows I'd recommend foobar2000 with the integrity verifier but unfortunately the experimental Mac version can't use components.
posted by Bangaioh at 11:31 AM on January 13, 2019


Response by poster: Thank you. I'll give that a try.
posted by the sobsister at 3:04 PM on January 13, 2019


« Older Phono preamp question   |   Advice on Auto Financing Options? Newer »
This thread is closed to new comments.