lenmodeoptions-Uunit
Specifies the unit in which the totals will be printed. unit is one of: {b, kb, mb, gb, tb}. The
default is b.
-c Do not show column names
-t Do not show totals line
-uunit
Specifies the unit in which each file will be printed. unit is one of: {b, kb, mb, gb, tb}. The
default is b.
lenmodeoutput
The output of len mode may seem cryptic at first, because it attempts to convey a lot of
information in just a little bit of space. But it is quite easy to read once you know what the
columns represent; and in certain columns, what each character in the column means. Each column
is explained below.
length Shows the length of the WAVE data, in m:ss.nnn (millisecond) format. If the data is CD‐
quality, then m:ss.ff is shown instead, where ff is a number from 00 to 74 that best
approximates the number of frames (2352‐byte blocks) remaining after m:ss. If all files
are CD‐quality, the total length will be shown in m:ss.ff format; otherwise it will be in
m:ss.nnn format. NOTE: CD‐quality files are rounded to the nearest frame; all other files
are rounded to the nearest millisecond.
expandedsize
Shows the total size of all WAVE chunks within the file (header, data and any extra RIFF
chunks). Essentially this is the size that the file would be if it were converted to .wav
format, e.g. with shntoolconv.
NOTE: Do not rely on this field for audio size! If you simply want to know how many bytes
of audio are in a file, run it through info mode, and look at the "data size" field in its
output.
cdr Shows properties related to CD‐quality files. A 'c' in the first slot indicates that the
WAVE data is not [C]D‐quality. A 'b' in the second slot indicates that the CD‐quality WAVE
data is not cut on a sector [b]oundary. An 's' in the third slot indicates that the CD‐
quality WAVE data is too [s]hort to be burned.
A '-' in any of these slots indicates that the particular property is OK or normal. An 'x'
in any of these slots indicates that the particular property does not apply to this file,
or cannot be determined.
WAVE Shows properties of the WAVE data. An 'h' in the first slot indicates that the WAVE
[h]eader is not canonical. An 'e' in the second slot indicates that the WAVE file contains
[e]xtra RIFF chunks.
A '-' in any of these slots indicates that the particular property is OK or normal. An 'x'
in any of these slots indicates that the particular property does not apply to this file,
or cannot be determined.
problems
Shows problems detected with the WAVE header, WAVE data, or the file itself. A '3' in the
first slot indicates that the file contains an ID[3]v2 header. An 'a' in the second slot
indicates that the audio data is not block‐[a]ligned. An 'i' in the third slot indicates
that the WAVE header is [i]nconsistent about data size and/or file size. A 't' in the
fourth slot indicates that the WAVE file seems to be [t]runcated. A 'j' in the fifth slot
indicates that the WAVE file seems to have [j]unk appended to it.
A '-' in any of these slots indicates that the particular problem was not detected. An 'x'
in any of these slots indicates that the particular problem does not apply to this file, or
cannot be determined.
fmt Shows which file format handled this file.
ratio Shows the compression ratio for this file.
filename
Shows the name of the file that's being inspected.
fixmodeoptions
NOTE: file names for files created in fix mode will be based on the input file name with the string
'-fixed' appended to it, and the extension will be the default extension of the output file format. For
example, with an output file format of shn the file 'foo.wav' would become 'foo-fixed.shn'. This can be
overridden with the -a and/or -z global options described above.
-b Shift track breaks backward to the previous sector boundary. This is the default.
-c Check whether fixing is needed, without actually fixing anything. shntool will exit with status 0
if fixing is needed, and status 1 otherwise. This can be useful in shell scripts, e.g.: "if
shntool fix -c *; then shntool fix *; else ...; fi"
-f Shift track breaks forward to the next sector boundary.
-k Specifies that all files should be processed, even if the first several of them wouldn't be
altered, aside from a possible file format change. The default is to skip the first N files that
wouldn't be changed from a WAVE data perspective in order to avoid unnecessary work.
-n Specifies that the last file created should not be padded with silence to make its WAVE data size
a multiple of 2352 bytes. The default is to pad the last file.
-u Round track breaks to the nearest sector boundary.
hashmodeoptions-c Specifies that the composite fingerprint for all input files should be generated, instead of the
default of one fingerprint per file. The composite fingerprint is simply the fingerprint of the
WAVE data from all input files taken as a whole in the order given, and is identical to the one
that would be generated from the joined file if the same files were joined into one large file,
with no padding added. This option can be used to fingerprint file sets, or to identify file sets
in which track breaks have been moved around, but no audio has been modified in any way (e.g. no
padding added, no resampling done, etc.).
-m Generate MD5 fingerprints. This is the default.
-s Generate SHA1 fingerprints.
padmodeoptions
NOTE: file names for files created in pad mode will be based on the input file name with the string
'-prepadded' or '-postpadded' appended to it, and the extension will be the default extension of the
output file format. For example, with an output file format of shn and pre‐padding specified on the
command line, the file 'foo.wav' would become 'foo-prepadded.shn'. This can be overridden with the -a
and/or -z global options described above.
Be aware that some output format encoders (e.g. flac, ape) automatically strip headers and/or extra RIFF
chunks.
-b Specifies that the file created should be padded at the beginning with silence to make its WAVE
data size a multiple of 2352 bytes.
-e Specifies that the file created should be padded at the end with silence to make its WAVE data
size a multiple of 2352 bytes. This is the default action.
joinmodeoptions
NOTE: file names for files created in join mode will be prefixed with 'joined.', and the extension will
be the default extension of the output file format. For example, with an output file format of wav the
files 'files*.wav' would become 'joined.wav'. This can be overridden with the -a and/or -z global
options described above.
-b Specifies that the file created should be padded at the beginning with silence to make its WAVE
data size a multiple of 2352 bytes. Note that this option does not apply if the input files are
not CD‐quality, since padding is undefined in that case.
-e Specifies that the file created should be padded at the end with silence to make its WAVE data
size a multiple of 2352 bytes. This is the default action. Note that this option does not apply
if the input files are not CD‐quality, since padding is undefined in that case.
-n Specifies that the file created should not be padded with silence to make its WAVE data size a
multiple of 2352 bytes. Note that this option does not apply if the input files are not CD‐
quality, since padding is undefined in that case.
splitmodeoptions
NOTE: file names for files created in split mode are of the form prefixNNN.ext, where NNN is the output
file number, and 'ext' is the default extension of the output file format. If an output file format of
'wav' is used, and the prefix is not altered via the -n switch described below, then the output file
names will be "split-track01.wav", "split-track02.wav", etc. This can be overridden with the -a and/or
-z global options described above.
For information on specifying split points, see the Specifyingsplitpoints section below.
-cnum Specifies the number to start counting from when naming output files. The default is 1.
-elen Prefix each track with len amount of lead‐in taken from the previous track. len must be given in
bytes, m:ss, m:ss.ff or m:ss.nnn format.
-ffile
Specifies a file from which to read split point data. If not given, then split points are read
from the terminal.
-llen Specifies that the input file should be split into smaller files based on multiples of the len
time interval. len must be given in bytes, m:ss, m:ss.ff or m:ss.nnn format.
-mstr Specifies a character manipulation string for filenames generated from CUE sheets. These
characters, taken one‐by‐one, represent from/to character translation. They must always be in
pairs. Some examples:
:- Translate all instances of ':' to '-'
:-/- Translate both ':' and '/' to '-'
:-/_*x Translate ':' to '-', '/' to '_', and '*' to 'x'
-nfmt Specifies the file count output format. The default is %02d, which gives two‐digit zero‐padded
numbers (01, 02, 03, ...).
-tfmt Name output files in user‐specified format based on CUE sheet fields. The following formatting
strings are recognized:
%p Performer
%a Album
%t Track title
%n Track number
-ulen Postfix each track with len amount of lead‐out taken from the next track. len must be given in
bytes, m:ss, m:ss.ff or m:ss.nnn format.
-xlist
Only extract tracks in list (comma separated, may contain ranges). Examples include:
7 Only extract track 7
3-5 Only extract tracks 3 through 5
2-6,9,11-13
Only extract tracks 2 through 6, 9, and 11 through 13
Specifyingsplitpoints
Split points simply mark places within the WAVE data of the input file where tracks will be split.
They can be specified in any combination of the following formats:
bytes where bytes is a specific byte offset
m:ss where m = minutes and ss = seconds
m:ss.ff
where m = minutes, ss = seconds and ff = frames (75 per second, so ff ranges from 00 to 74)
m:ss.nnn
where m = minutes, ss = seconds and nnn = milliseconds (will be rounded to closest sector
boundary, or the first sector boundary if the closest one happens to be the beginning of
the file)
CUEsheet
- a simple CUE sheet, in which each "INDEX 01 m:ss:ff" line is converted to a m:ss.ff split
point
Split points must be given in increasing order, and must appear one per line. If the byte offset
calculated from the final split point equals the input file's WAVE data size, then it is ignored.
Since split points specify locations within the input file where tracks will be split, N split
points will create N+1 output files. All m:ss formats will create splits on sector boundaries
whenever the input file is CD‐quality; to force non‐sector‐aligned splits, use the exact byte
format.
catmodeoptions-c Specifies that extra RIFF chunks should be suppressed from the output. The default is to write
the extra RIFF chunks.
-d Specifies that the WAVE data should be suppressed from the output. The default is to write the
data.
-e Specifies that the WAVE header should be suppressed from the output. The default is to write the
header.
-n Specifies that the NULL pad byte at end of odd-sized data chunks should be suppressed from the
output, if present. The default is to write the NULL pad byte. This option only applies when
WAVE data is also written, otherwise it is ignored.
cmpmodeoptions-csecs
Sets the number of seconds of audio to use for the byte‐shift comparison buffer. This option only
makes sense with the -s option. The default is 3 seconds.
-ffuzz
Sets the "fuzz factor" for determining whether byte‐shifted data is identical. fuzz is a positive
integer that represents the maximum number of allowable byte mismatches between the two files in
the area searched by the -s option. This allows one to check for differing bytes between to files
that (a) are byte‐shifted and (b) contain at least one error in the area searched by the -s
option. The higher the fuzz factor, the longer the search takes, so set it low to begin with (8
or so), and increase it in small steps if needed. NOTE: this switch can only be used with the -s
switch.
-l List offsets and values of all differing bytes. Output is similar to 'cmp -l'; in particular,
offsets are 1‐based. Can be used with the -s switch.
-s Check to see whether the WAVE data contained in the input files are identical modulo a byte‐shift.
Currently, this will only detect differences up to the first 529200 bytes (equal to 3 seconds of
CD‐quality data). This can be used to compare WAVE data within a pre‐burned file to WAVE data in
the corresponding track ripped from the burned CD, which is useful if the ripped track came from a
CD burned TAO, and thus might have a 2‐second gap of silence at the beginning. This option can
also help identify a CD burner/CD reader combined read/write offset.
cuemodeoptions-c Specifies that a simple CUE sheet should be output. This is the default action. NOTE: all input
files must be CD‐quality for CUE sheets to be valid.
-s Specifies that split points in explicit byte‐offset format should be output.
convmodeoptions
NOTE: file names for files created in conv mode will be named based on the input file name.
Specifically, if the input file name ends with the default file extension for that file's format, then
the default extension for the desired output format will replace it; otherwise, it will be appended to
it. For example, for an output format of shn and a wav input file named 'file.wav', the converted file
will be named 'file.shn', since '.wav' is the default extension for the wav format. On the other hand,
given the same situation above, but with an input file named 'file.wave', the converted file will be
named 'file.wave.shn', since '.wave' does not match '.wav'. This can be overridden with the -a and/or -z
global options described above.
Be aware that some output format encoders (e.g. flac, ape) automatically strip headers and/or extra RIFF
chunks, while others (e.g. sox) might adjust WAVE data sizes in rare instances in order to align the
audio on a block boundary.
-t Read WAVE data from the terminal.
infomodeoptions
This mode doesn't support any additional options.
stripmodeoptions
NOTE: file names for files created in strip mode will be based on the input file name with the string
'-stripped' appended to it, and the extension will be the default extension of the output file format.
For example, with an output file format of wav the file 'bar.shn' would become 'bar-stripped.wav'. This
can be overridden with the -a and/or -z global options described above.
Be aware that some output format encoders (e.g. flac, ape) automatically strip headers and/or extra RIFF
chunks, while others (e.g. sox) might adjust WAVE data sizes in rare instances in order to align the
audio on a block boundary.
-c Specifies that extra RIFF chunks should not be stripped. The default is to remove everything that
appears after the first data chunk.
-e Specifies that WAVE headers should not be made canonical. The default is to canonicalize headers.
genmodeoptions
NOTE: file names for files created in gen mode will be prefixed with 'silence.', and the extension will
be the default extension of the output file format. For example, with an output file format of wav the
generated file would become 'silence.wav'. This can be overridden with the -a and/or -z global options
described above.
-llen Generate files containing len amount of silence. len must be given in bytes, m:ss, m:ss.ff or
m:ss.nnn format.
trimmodeoptions
NOTE: file names for files created in trim mode will be based on the input file name with the string
'-trimmed' appended to it, and the extension will be the default extension of the output file format.
For example, with an output file format of shn the file 'foo.wav' would become 'foo-trimmed.shn'. This
can be overridden with the -a and/or -z global options described above.
-b Only trim silence from the beginning of files
-e Only trim silence from the end of files