Repairing FLAC files: Difference between revisions
(A handy? guide.) |
mNo edit summary |
||
Line 5: | Line 5: | ||
metaflac --export-tags-to somesong.tags somesong.flac | metaflac --export-tags-to somesong.tags somesong.flac | ||
flac -F -d somesong.flac | flac -F -d somesong.flac | ||
flac --best somsong.wav | flac -f --best somsong.wav | ||
metaflac --import-tags-from somesong.tags somesong.flac | metaflac --import-tags-from somesong.tags somesong.flac | ||
rm somesong.wav somesong.tags | rm somesong.wav somesong.tags |
Revision as of 04:31, 30 July 2014
If a FLAC file is corrupted and you only want to save what exists, rather than re-rip from CD or re-acquire by some other method.
In Linux, for a single file:
metaflac --export-tags-to somesong.tags somesong.flac flac -F -d somesong.flac flac -f --best somsong.wav metaflac --import-tags-from somesong.tags somesong.flac rm somesong.wav somesong.tags
For multiple FLAC files:
Save the tags:
find -name "*.flac" -exec metaflac --export-tags-to '{}'.tags '{}' \;
Decode to WAV:
flac -F -d *.flac
Encode back to FLAC:
flac --best *.wav
Restore the tags:
find -name "*.flac" -exec metaflac --import-tags-from '{}'.tags '{}' \;
Cleanup:
rm *.wav *.tags