SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Songkong Request for function to check music file integrity on music collections

One way or another in large collections there always seems to be a few corrupt files. Existing programs to check music file integrity don’t work well on large collections and it would be great if this was an integral part of Songkong.

Is this function possible in a future songkong release?


Could this be accomplished through the use of hashes of music files? use FLAC’s native checksum? t’s in the METADATA_BLOCK_STREAMINFO header inside a FLAC file. The FLAC command ilne supports using it to test files:

It’s rather obvious that we don’t need this to be cryptographically sound, so algorithms such as MD5 become wasteful. XXHash may be a nice solution, the hashing speed is ridiculously fast, and it should be reliable enough to fit our needs. Although I’m not sure yet, I think the speed difference between MD5 and XXHash won’t matter much, the disk speeds will be the bottleneck, although we’ll have to wait and see.

Another interesting factor here is how can we store this. I see two ways we can go about this:

  1. We checksum the entire file, which means we can’t store the sum as a metadata tag, rather we will have to do something like create a large file with song->hash association list.
  2. We checksum only the audio data, and here there’s the question if we want to sum the formatted data (FLAC, ALAC) or sum over the PCM stream. Not sure why would we do this over the PCM stream, but just putting it on the table.
    I for one like solution 2 more. It makes it more portable to just have a builtin sum and it’s simpler as well.


Doesn’t really seem like a core feature of SongKong but I won’t reject it yet.