PDA

View Full Version : Flac error detection



JJZolx
2006-11-06, 11:07
I was just listening to a track played by SlimServer through a Squeezebox. About 40 seconds into the track I heard a terrible audio glitch lasting maybe 1/4 second, but the track kept playing. (Is this the infamous Squeezebox "noise of death"?)

So I stopped the playback and played the same track through Winamp. At the point where the glitch occurred Winamp stopped playing the track completely and threw up a (nonfatal) error message dialog.

If errors like this can be detected in a Flac stream, then shouldn't the Squeezebox or SlimServer display similar behavior and not allow the glitch to be played? I'd prefer it also stop playback of the track when this happens.

John Stimson
2006-11-06, 12:06
Here's an idea: You could write a wrapper for flac that runs 'flac -s -t' and then aborts if there is an error. It could then output an audio stream with you saying "FLAC ERROR", or Number Two's assistant saying "Orange Alert!". If there isn't an error, it could go ahead and decode the file. I think that would require server-side decoding.

As an alternative you could use a script that runs `flac -t` on every FLAC file in your music directory and reports which ones have CRC errors. I've already written such a script. It takes a list of filenames or directory names as an argument and recursively searches down through all subdirectories checking FLAC files.

Usage:
flac-check.pl <file or directory name>

You need to install shellsafe.pm in /usr/local/lib/perl5

JJZolx
2006-11-06, 12:30
Here's an idea: You could write a wrapper for flac that runs 'flac -s -t' and then aborts if there is an error. It could then output an audio stream with you saying "FLAC ERROR", or Number Two's assistant saying "Orange Alert!". If there isn't an error, it could go ahead and decode the file. I think that would require server-side decoding.

As an alternative you could use a script that runs `flac -t` on every FLAC file in your music directory and reports which ones have CRC errors. I've already written such a script. It takes a list of filenames or directory names as an argument and recursively searches down through all subdirectories checking FLAC files.

Usage:
flac-check.pl <file or directory name>

You need to install shellsafe.pl in /usr/local/lib/perl5
Yeah, I suppose I could do that, and I may.

But _if_ error detection on certain types of audio files is possible, and other software can reliably detect these errors and avoid audio glitches, then shouldn't SlimServer/Squeezebox do the same?

Ben Sandee
2006-11-06, 14:33
On 11/6/06, JJZolx <JJZolx.2gv8sb1162841702 (AT) no-mx (DOT) forums.slimdevices.com>
wrote:
>
>
> But _if_ error detection on certain types of audio files is possible,
> and other software can reliably detect these errors and avoid audio
> glitzes, then shouldn't SlimServer/Squeezebox do the same?


I don't see what's to discuss. File a bug, make sure your bad FLAC is
attached and I'm sure SD would love to consider it for a future release.

Ben