Technologie & techniek

Verifying FLAC files

Having everything in a digital form can have it downsides just like having your music on CD’s for example. Things may go wrong a give you bad data. Rhythmbox for example was complaining that a FLAC file couldn’t be recognized. This could be a corrupted FLAC file or that Gstreamer, the backend behind Rhythmbox, contained a bug.

After reading the manpage for FLAC it appears that there is a way to analyze a FLAC file. In the example below a FLAC file is being tested and it converts any warning into an error.

$ flac -w -t The\ Cranberries\ -\ 09\ -\ Copycat.flac 

flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

The Cranberries - 09 - Copycat.flac: ok

The file seems to be correct and starts the job to find the issue in Gstreamer or Rhythmbox.