md5sum

Before using shntool and shorten v3.4, it's a good idea to install an md5 checker at this point. To do this, you'll need to download another tar file:

txtutils-2.0.tar.gz

The installation process is the same as before. If you get this error: "can not guess host type; you must specify one," follow the ./configure command with config.guess, which will trick it to install correctly. To create a plain text md5 checksum file in the same folder as your SHNs, cd to your requested folder and enter md5sum -b *.shn > filename.md5.

To check an md5 that's been saved as a plain text file, cd to your requested folder of SHNs and enter md5sum -c filename.md5. Make sure your .md5 file is in the Unix style line ending format, like so:

fd12957702e798a9272665643dbd3f06  o-head2001-11-11d02t08.shn

In md5s created by Carbon Shorten you'll see that there is an asterik before the filename rather than a space. This is because Shorten will read the SHN as a binary file rather than a text file. Reading it as a text file will have a space before the SHN's filename. I'm still investigating this (yes, still) but the Carbonized version of Shorten can check md5s with either the space or asterik, but 1.1a3 (the version before the Carbonized Shorten, 1.1a4) will only check md5s with the asterik. Shorten may also limit the characters of SHN files to 31 characters whereas the Mac OS is limited to 32. A good thing to remember in making SHNs is to limit the characters used in a filename as much as possible *and to follow etree's guidelines for seeding.*

Here are the main steps to fix your sector-boundary inflicted SHN files and how to encode to the seekable version of Shorten.

Repairing sector boundaries

At any point you can type shntool -h and it will give you a list of things shntool can do:

shntool refers to these as modes. You can type shntool (mode) -h at any time where (mode) is any option listed and further options can be used.

This is a really neat and totally useful feature in shntool. You can see detailed info about your .wav and .shn files by typing (remember to cd to your requested SHN folder) shntool info (name of the shn file), for instance: shntool info vb2001-12-31d1t01.shn. Alternately, you can view info about a batch of .wav or .shn files by typing shntool info *.shn (or shntool info *.wav). This will list info on all shorten or wave files in your current directory or folder. As you can see from these SHNs that I downloaded from GDLive, all of them have sector boundary issues:


file name:                    gd66-07-17d1t01.shnhandled by:                   shn format modulelength:                       4:44.62WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400 block align:                  4header size:                  44 bytesdata size:                    50242300 byteschunk size:                   50242430 bytestotal size (chunk size + 8):  50242438 bytesactual file size:             28222209 (compressed)compression ratio:            56.17% of original sizeCD-quality properties:CD quality:                   yes   cut on sector boundary:     no   long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:   inconsistent header:        no   file probably truncated:    n/a  junk appended to file:      n/a 

file name:                    gd66-07-17d1t02.shnhandled by:                   shn format modulelength:                       3:26.58WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44bytes data size:              36474244 byteschunk size:                   36474374 bytestotal size (chunk size + 8):  36474382 bytesactual file size:             20967181 (compressed)compression ratio:            57.48% of original sizeCD-quality properties:  CD quality:                 yes  cut on sector boundary:     no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a

file name:                    gd66-07-17d1t03.shnhandled by:                   shn format modulelength:                       2:32.31WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    26886540 byteschunk size:                   26886670 bytestotal size (chunk size + 8):  26886678 bytesactual file size:             17664657 (compressed)compression ratio:            65.70% of original sizeCD-quality properties:  CD quality:                 yes  cut  on sector boundary:    no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a   

file name:                    gd66-07-17d1t04.shnhandled by:                   shn format modulelength:                       4:54.12WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    51888988 byteschunk size:                   51889118 bytestotal size (chunk size + 8):  51889126 bytesactual file size:             29734381 (compressed)compression ratio:            57.30% of original sizeCD-quality properties:  CD quality:                 yes  cut  on sector boundary:    no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a

file name:                     gd66-07-17d1t05.shnhandled by:                   shn format modulelength:                       2:27.37WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    26017060 byteschunk size:                   26017190 bytestotal size (chunk size + 8):  26017198 bytesactual file size:             15527153 (compressed)compression ratio:            59.68%  of original sizeCD-quality properties:  CD quality:                 yes  cut  on sector boundary:    no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a

file name:                    gd66-07-17d1t06.shnhandled by:                   shn format modulelength:                       4:06.10WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    43418376 byteschunk size:                   43418506 bytestotal size (chunk size + 8):  43418514 bytesactual file size:             24425117 (compressed)compression ratio:            56.26% of original sizeCD-quality properties:  CD quality:                 yes  cut  on sector boundary:    no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a

file name:                    gd66-07-17d1t07.shnhandled by:                   shn format modulelength:                       2:40.63WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    28371628 byteschunk size:                   28371758 bytestotal size (chunk size + 8):  28371766 bytesactual file size:             15731989 (compressed)compression ratio:            55.45% of original sizeCD-quality properties:  CD quality:                 yes  cut  on sector boundary:    no  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          yesPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a[localhost:~/documents/gd66-07-17_sssb.shnf] root#

If you're familiar with seeding, you know how important it is that SHNs are cut (i.e., tracked ) on sector boundaries. Luckily we have shntool which can fix improperly cut .shn and .wav files and can split a large audio file into separate tracks that are automatically cut on sector bondaries (see this page).

Please note that fixing sector boundaries will generate a different md5 signature. The SHNs above have matching md5s as listed in etree's SHNs in circulation database. Once I've fixed them they will generate different md5s. So it's up to you: would you rather have matching md5s or no clicks in between tracks? I say "no clicks, please!"

1. Your first step is to find out which options you have for fixing bad SHNs. Remember to cd to the .shnf you want to work with and enter in: shntool fix -h. Your options will be shown. They are pretty much self-explanatory. I've stuck with the defaults.

2. Now let's fix these SHNs. At the command prompt I've entered shntool fix -o shn -s b *.shn - -o shn will make my output format SHN, -s b will move the track breaks backward to the previous multiple of the block size, and *.shn will do these things to all of my SHNs in my current folder that Terminal is accessing. shntool will not repair SHNs with correct sector boundaries.

 

Now let's see what it's done:

 

As you can see shntool fixed all of the SHNs in gd66-07-17_sssb.shnf and mysteriously added 208 zero-bytes to Track 7. Since this was the default in shntool I don't think it's anything to worry about. Now running the same info test on my SHNs gives me this back:


file name:                    gd66-07-17d1t01-fixed.shnhandled by:                   shn format modulelength:                       4:44.61WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    50241072 byteschunk size:                   50241108 bytestotal size (chunk size + 8):  50241116 bytesactual file size:             28221557 (compressed)compression ratio:            56.17% of original sizeCD-quality properties:  CD quality:                 yes  cut on sector boundary:     yes  long enough to be burned:   yesWAVE properties:  non-canonical header:       no  extra RIFF chunks:          noPossible problems:  inconsistent header:        no  file probably truncated:    n/a  junk appended to file:      n/a

file name:                    gd66-07-17d1t02-fixed.shnhandled by:                   shn format modulelength:                       3:26.58WAVE format:                  0x0001 (Microsoft PCM)channels:                     2bits/sample:                  16samples/sec:                  44100average bytes/sec:            176400rate (calculated):            176400block align:                  4header size:                  44 bytesdata size:                    36474816 byteschunk size:                   36474852 bytestotal size (chunk size + 8):  36474860 bytesactual file size:             20967285 (compressed)compression ratio:            57.48% of original sizeCD-quality properties:   CD quality:                 yes   cut on sector boundary:     yes   long enough to be burned:   yesWAVE properties:   non-canonical header:       no   extra RIFF chunks:          noPossible problems:   inconsistent header:        no   file probably truncated:    n/a   junk appended to file:      n/a     

And so forth. Notice that shntool made additional SHNs by writing the new file with a -fixed after the filename and before the extension. The next step is to create a new md5 file.

Here are the md5s md5sum created by entering in md5sum -b *.shn:

Once you've got shntool figured out, now's the time to learn and use Shorten v3.4.

>>Continue>>

>>Contents>>