Repairing FLAC files: Difference between revisions
(A handy? guide.) |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
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 | ||
Line 21: | Line 21: | ||
Encode back to FLAC: | Encode back to FLAC: | ||
flac --best *.wav | flac -f --best *.wav | ||
Restore the tags: | Restore the tags: |
Latest revision as of 04:32, 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 -f --best *.wav
Restore the tags:
find -name "*.flac" -exec metaflac --import-tags-from '{}'.tags '{}' \;
Cleanup:
rm *.wav *.tags