#97 command line creation/verify ffp

metaflac (8)

There is a option in metaflac to extract md5 checksums from flac files (metaflac --show-md5sum filename list). This is in the documentation as the correct way to create a ffp (flac fingerprint) file. It works for a single file (providing there is no spaces in the filename), or specifically listed flac files, but using a wildcard like *.flac produces an error.
Also creating a flac fingerprint file this way is kind of a hack, and all you get, if you pipe it to a file, is a list of the md5 checksums for all files listed in the argument, with no associated filenames. Everything I've read about ffp says you need the filename too. Conversely using the flac frontend produces a flac fingerprint file in the format:

What we need is a separate tool to create the ffp file. The flac frontend already does this, apparently calling the metaflac subroutine to extract the md5 checksums. Just copy this code over to a new tool, called ffptool. This command line tool needs to be able to take a wildcard as a parameter. Also it needs to verify an existing ffp file.
example1: ffptool --create *.flac > ffp.txt
example2: ffptool --verify ffp.txt
In example2, each file name and it's associated checksum would be extracted from the ffp file, and then compared with the actual checksum of the file.

This would make it easier to create ffp files from a command prompt, without having to resort to th flac front end.


Log in to post a comment.