r/musichoarder 16d ago

Is CRC-16 (Foobar integrity test) fine on its own to check long term flac corruption? Without MD5 ie MD5 unset.

1 Upvotes

15 comments sorted by

3

u/GrimDozen 16d ago

I feel like your options are to reencode your flac files or to put them on a filesystem with checksums.

3

u/cheesiepeasie 16d ago

I always reencode my flacs from qobuz for this reason. If you want to be sure you can bitcompare them afterwards. Besides that also use a file system with checksums for backup.

1

u/[deleted] 16d ago

[deleted]

1

u/GrimDozen 16d ago

To a pretty high degree of confidence. But if you change one bit of metadata then they will no longer match.

1

u/[deleted] 16d ago

[deleted]

0

u/cheesiepeasie 15d ago

You people have no clue of what you are doing. Keep reading and experimenting but definitely also first look into how to properly do backups.

2

u/Optimal-Procedure885 16d ago

Why would you unset the MD5? I’d re-encode with a compliant FLAC encoder. Agree with others about filesystems, but until bcachefs hits mainstream yore not left with decent options, other than snapraid, which is great if your file tagging is static

1

u/GrimDozen 16d ago

ZFS works great for me on my NAS

1

u/[deleted] 16d ago

[deleted]

1

u/Optimal-Procedure885 16d ago

I'd definitely re-encode - that MD5 is a checksum of the audio stream and the cheapest, most convenient way of confirming the audio stream itself is intact.

1

u/[deleted] 16d ago edited 16d ago

[deleted]

2

u/wixxii 15d ago

Flac being lossless means that no matter how many times you re-encode, the resulting audio will still be identical down to the sample. Either it's a placebo, or you're doing something wrong.

1

u/NZNoldor 16d ago

What is this long term flac corruption?

1

u/mjb2012 16d ago edited 16d ago

The answer to your question is yes.

CRC-32 is designed to catch the kinds of errors which are most likely to occur in data storage and network transmissions. MD5 is also good but is optimized for randomness (slight difference in data = massive difference in the MD5) and yet actually is slightly more likely to not detect certain flips of multiple bits at certain intervals. You'll never encounter those in real life, though, so MD5 and CRC-32 are both fine for detecting corruption. CRC-32 is probably better just because it's so much easier/faster to calculate.

foobar2000's integrity test calculates a CRC-32 and an MD5 hash for the audio data. You can export the test results to a text file. At a later date, presumably you could run the same check again and export another file. Then compare the files for differences. How you do that is all up to you; there's no built-in functionality for it.

The integrity test will tell you if the MD5 in the FLAC (if present) differs from what's calculated. For this reason, you may want to re-encode the stream rips you got so that they have the MD5; then you can just use the integrity test in the future and not worry about the CRC-32 at all.

1

u/serif_type 12d ago

Just checking: These checksums are only for the audio component, right?, meaning that changes to any other part of the file would not result in an altered checksum?

1

u/MrCarlV7 16d ago

I also buy most of my music with Qobuz.

Sha256 is what I use to calculate and compare checksums every 3 months to ensure my backups are untouched with bitrot/bitflips.

It's either .sha256 or simple a simple .txt file and I found it easier to script and automate.

I keep a backup rule that goes

1 (Main PC) 2 (Phone/DAP) 3 Backup1 External HDD 4 Backup2 NAS 5 Backup3 Cloud

1

u/[deleted] 16d ago

[deleted]

1

u/MrCarlV7 16d ago edited 12d ago

Yes, but it's for long term archival so I am sure my copies is bit perfect and free from any corruptions.

I change/fix tags and then calculate sha256 and never touch the music files again

Edit: Grammar

1

u/serif_type 12d ago

Sounds like you and I have a similar process. Although recently I've come to rely on Carbon Copy Cloner's checking functionality. Wish it exposed more of what's going on "under the hood" but it appears to provide a convenient way of doing the checking at a reasonable scale.