I've just started to work out a flac test script and I could use a
little help.
This is what I've initially come up with:
testflacs.sh:
Code:
--------------------
#!/bin/sh
szDate=`/bin/date`
szMusicRoot='/mnt/media/Music'
szErrFile="$szMusicRoot/flac_errors.txt"
echo Recursively testing flacs in $szMusicRoot
echo Flac decoding errors logged to $szErrFile
echo Flac test of $szMusicRoot started at $szDate >"$szErrFile"
/bin/find "$szMusicRoot/" -name *.flac -type f -exec /usr/bin/flac -t -s '{}'
\; 2>>"$szErrFile"
szDate=`/bin/date`
echo Flac tests of $szMusicRoot compleated at $szDate >>"$szErrFile"
echo Done!
--------------------
This finds bad flacs and stuffs flac_errors.txt with info like:
Code:
--------------------
Cantigas de Santa Maria - En nome de Maria - Antequera.bad.flac: *** Got
error code 2:FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH
Cantigas de Santa Maria - En nome de Maria - Antequera.bad.flac: ERROR while
decoding data
state = FLAC__STREAM_DECODER_READ_FRAME
--------------------
So far, so good. That flac file was a 300mb flac that I created and
then changed a single bit in the middle of it using a hex editor.
But what's missing here is the location of the offending flac file.
Can anyone suggest an easy way to get the folder name for the bad flac
file into the output too?
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=60307
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix