By coincidence I wrote a couple posts on this over the last few days for antsmarching.org, but they seem to fit right in here:
SECTOR BOUNDARY ERRORS
It's best to check your shows for "sector boundary errors" (SBEs) before uploading any files. A sector boundary error results when a wav file is not the right length to exactly fill a CD sector (= 1/75th second). Most burning programs will fill the balance of the sector with silence, sometimes creating a microgap. Some burning programs will drop the partial sector altogether. For a little more discussion of SBEs, see
etree's Seeding Guidelines.
SBEs usually result from a wrong setting in an audio editor when the DAT > WAV conversion is done. For example, in Cool Edit, if it's not set to Snap To Frames, it will cut the wav anywhere, not just on a sector boundary. Tracking done using CD Wave will not create SBEs.
You can check for SBEs with
shntool. See the ReadMe and Tutorial files, at that link and in the zip package, for more explanation. SBEs can also be repaired reasonably easy with shntool - it just moves a little bit of each track to fill out enough for a CD sector. But be sure to preview the repair because the tracks MUST be listed in the right track sequence to repair it properly!
And of course, the md5s will change if the SBEs are repaired.
md5 summer is handy for recomputing them.
There is a nearly identical functionality in flac itself to repair SBEs. shntool can also be used to check flac files for SBEs.
You'll want to have shntool, shorten and flac in your system folder (or in a folder that is in your Path) for these commands to work from any folder. You also need cygwin1.dll, which is in the zip packages.
Here are some batch files / command lines for use with shntool,
the items in brackets will vary depending on the files and the user! Whether you use a separate directory is up to you. Whether you need the "no skip" option depends primarily on whether the existing shns have seek tables or not, and whether you know how to add seek tables to any files that are missing them without reprocessing the files. (See below for info on that.) For more information on batch files, see
this link.
To check for SBE's, copy this into a txt file called shnlen.bat:
@echo off
shntool len *.shn > len.txt
start notepad len.txt
To preview what shntool fix will do, copy this into a txt file called shnfix-preview.bat. This assumes the files have names that sort in track order, otherwise you have to specify the order.
@echo off
shntool fix -o shn [-d directory] [-noskip] -p *.shn > shnfix-preview.txt
start notepad shnfix-preview.txt
To use shntool fix, copy this into a txt file called shnfix.bat. This assumes the files have names that sort in track order!
shntool fix -o shn [-d directory] [-noskip] *.shn
SEEK TABLES
You can use shorten and some batch files to
- check to see if a file has seek tables
- append seek tables
- remove seek tables
without going through encoding and decoding them, which can be useful if you are seeding or reseeding a show. See
this link for the latest version of shorten and
this discussion of batch files But bottom line,
people shouldn't be altering the shows. Just live with the way they are seeded.
[See the other posts in this thread!]
Sample batch files, see the link above to help explain:
To see if the shns have seek tables
for %%f in (*.shn) do shorten -i "%%f"
pause
To append seek tables
for %%f in (*.shn) do shorten -k "%%f"
pause
To remove seek tables
for %%f in (*.shn) do shorten -e "%%f"
pause
SHNCLICK
shnclick "is a windows right-click context menu frontend for shntool. It is solely intended to provide quick access to common shntool tasks like checking and fixing sector boundaries on shorten files or stripping excess header info before seeding. ... More advanced useage will require using the command line." Or even better, batch files.
MAKING COMMANDS AVAILABLE FROM THE SHELL (Right-Click)
You can make these commands available by right-clicking on one of the shn or flac files in a folder by doing something like the following. This is how it's done in Windows 2000, presumably XP is similar - if someone can add a discusion of the specifics for XP, that might help:
Open any folder, such as My Computer. Choose Tools, Folder Options, File Types. Find shn (or flac). Click Advanced. That gives you a list of the choice of options that will appear when you right-click on that file type.
Click on New. Under
Action, type the words "Create len file" (without the quotes). In
Application used to perform action, type something like:
C:\Utilities\shnlen.bat "%1"
using the location and name of the batch file that performs the appropriate action - in this example, the file discussed above called "shnlen.bat" in the C:\Utilities folder which runs the shntool len command and puts the contents into a file (which you can keep with the set of shns to show file sizes, times and whether there are errors in the files). Then click OK.
You can repeat this to create multiple right-click menu choices for shn or flac files. For example, "Check for seek tables." If you've got mkwACT and WinAmp installed, "Decode to wav" and "Enqueue" are among the actions already listed here; using Edit you can see how those call the respective programs.
Someone could probably easily write a script to install the batch files and add the shell extensions (ie, the right click features). Not me, unfortunately ...