Question about "compare by content" and new functionality suggestion

Discuss new features and functions
Posts: 3
Joined: 25 Aug 2026

Apesbrain2000

How does the "compare by file content" function work? Does it generate a file hash and compare? What this tells you is that the original and backup do not match; it does not say which one is "correct".

This would be a great new feature for backup of FLAC music files. FLAC files contain internally an MD5 that was generated when the file was created. If FFS would read that and compare to the original and backup, it could determine which way to sync each file in order to retain the original. It could also highlight any files for which the original and backup are both non-matches. This would tell the user that those CDs need to be re-ripped.

From Gemini AI:
FLAC files store an internal 128-bit MD5 signature (often called the FLAC fingerprint) inside the mandatory STREAMINFO metadata block at the beginning of the file.
Posts: 1246
Joined: 8 May 2006

therube

FFS does not use hashes, much less compare to an internally stored MD5 hash in a FLAC file.

MD5 of the unencoded content             : B78F00863CCCB8B4A7B0DB2FAB52123D

Also note that the "unecoded content" is different from the file itself,
as the file (C:\out\out.flac) will have a different (MD5) hash: 28D62A2B8BE6EECACB8E91FCF2DE9EC3.
Posts: 3
Joined: 25 Aug 2026

Apesbrain2000

Thanks for your reply.
Posts: 1246
Joined: 8 May 2006

therube

(Offhand) I'm not even quite sure just what is meant by "unencoded content"?

ffmpeg generates yet different MD5 hashes (depending on just what you hash).

C:\out>ffmpeg -hide_banner -i out.flac -f hash -hash md5 -
MD5=4793ffbd932059b415d07e5c347777bd

C:\out>ffmpeg -hide_banner -i out.flac -map 0:a -f hash -hash md5 -
MD5=924d3b687012a6d68d119c35049a4516
Posts: 19
Joined: 9 Jun 2026

favoredrive

Ask Gemini why it's worthless for comparing FLAC files:
The FLAC audio MD5 hashes only the decoded PCM audio, not the FLAC file itself. Therefore, two files can have the same audio MD5 while differing in:
- tags and cover art,
- encoding settings or compression level,
- padding, stream metadata, or file layout,
- embedded cuesheets and other FLAC metadata.

You can use foobar2000 or just
flac --test file.flac
to verify it:
In test mode, flac acts just like in decode mode, except no output file is written. Both decode and test modes detect errors in the stream, but they also detect when the MD5 signature of the decoded audio does not match the stored MD5 signature, even when the bitstream is valid.