1SHNTOOL(1)                           local                          SHNTOOL(1)
2
3
4

NAME

6       shntool - a multi‐purpose WAVE data processing and reporting utility
7
8

SYNOPSIS

10       shntool mode ...
11       shntool [CORE OPTION]
12
13

DESCRIPTION

15       shntool  is  a command‐line utility to view and/or modify WAVE data and
16       properties.  It runs in several different operating modes, and supports
17       various lossless audio formats.
18
19       shntool  is comprised of three parts ‐ its core, mode modules, and for‐
20       mat modules.  This helps to make the code easier to maintain,  as  well
21       as  aid other programmers in developing new functionality.  The distri‐
22       bution archive contains a file named 'modules.howto' that describes how
23       to create a new mode or format module, for those so inclined.
24
25
26   Mode modules
27       shntool performs various functions on WAVE data through the use of mode
28       modules.  The core of shntool is simply a wrapper around the mode  mod‐
29       ules.   In  fact,  when  shntool  is run with a valid mode as its first
30       argument, it essentially runs the  main  procedure  for  the  specified
31       mode,  and quits.  shntool comes with several built‐in modes, described
32       below:
33
34
35              len    Displays length, size and properties of PCM WAVE data
36
37              fix    Fixes sector‐boundary problems with CD‐quality  PCM  WAVE
38                     data
39
40              hash   Computes the MD5 or SHA1 fingerprint of PCM WAVE data
41
42              pad    Pads  CD(hyquality files not aligned on sector boundaries
43                     with silence
44
45              join   Joins PCM WAVE data from multiple files into one
46
47              split  Splits PCM WAVE data from one file into multiple files
48
49              cat    Writes PCM WAVE data from one or more files to the termi‐
50                     nal
51
52              cmp    Compares PCM WAVE data in two files
53
54              cue    Generates a CUE sheet or split points from a set of files
55
56              conv   Converts files from one format to another
57
58              info   Displays detailed information about PCM WAVE data
59
60              strip  Strips extra RIFF chunks and/or writes canonical headers
61
62              gen    Generates  CD‐quality  PCM  WAVE  data  files  containing
63                     silence
64
65              trim   Trims PCM WAVE silence from the ends of files
66
67
68       For more information on the meaning of the various command‐line options
69       for each mode, see the MODE‐SPECIFIC OPTIONS section below.
70
71       For  convenience, each mode can specify an alternate name or alias that
72       will invoke it (this feature is currently  only  available  on  systems
73       that  support  symbolic  or hard linking).  In particular, each mode is
74       aliased to 'shn<mode>'.  For instance, running shnlen is equivalent  to
75       running shntool len - thus saving a few keystrokes.
76
77
78   Format modules
79       File formats are abstracted from shntool through the use of format mod‐
80       ules.  They provide a means for shntool  to  tranparently  read  and/or
81       write  different file formats.  This abstraction allows shntool to con‐
82       centrate on its job without worrying about the  details  of  each  file
83       format.
84
85       The following formats are currently supported:
86
87
88              wav    RIFF WAVE file format
89
90              aiff   Audio Interchange File Format (AIFF and uncompressed/sowt
91                     AIFF-C only) (via 'sox'):
92                     <http://sox.sourceforge.net/>
93
94              shn    Shorten low complexity waveform coder (via 'shorten'):
95                     <http://www.softsound.com/Shorten.html>
96                     <http://www.etree.org/shnutils/shorten/>
97
98              flac   Free Lossless Audio Codec (via 'flac'):
99                     <http://flac.sourceforge.net/>
100
101              ape    Monkey's Audio Compressor (via 'mac'):
102                     <http://www.monkeysaudio.com/>
103                     <http://supermmx.org/linux/mac/>
104
105              alac   Apple Lossless Audio Codec (via 'alac'):
106                     <http://craz.net/programs/itunes/alac.html>
107
108              tak    (T)om's lossless (A)udio (K)ompressor (via 'takc'):
109                     <http://www.thbeck.de/Tak/Tak.html>
110
111              ofr    OptimFROG Lossless WAVE Audio Coder (via 'ofr'):
112                     <http://www.losslessaudio.org/>
113
114              tta    TTA Lossless Audio Codec (via 'ttaenc'):
115                     <http://tta.sourceforge.net/>
116
117              als    MPEG-4 Audio Lossless Coding (via 'mp4als'):
118                     <http://www.nue.tu-berlin.de/forschung/projekte/
119                     lossless/mp4als.html>
120
121              wv     WavPack Hybrid Lossless Audio Compression (via  'wavpack'
122                     and 'wvunpack'):
123                     <http://www.wavpack.com/>
124
125              lpac   Lossless Predictive Audio Compression (via 'lpac'):
126                     <http://www.nue.tu-berlin.de/wer/liebchen/lpac.html>
127
128              la     Lossless Audio (via 'la'):
129                     <http://www.lossless-audio.com/>
130
131              bonk   Bonk lossy/lossless audio compressor (via 'bonk'):
132                     <http://www.logarithmic.net/pfh/bonk>
133
134              kxs    Kexis lossless WAV file compressor (via 'kexis'):
135                     <http://www.sourceforge.net/projects/kexis/>
136
137              mkw    MKW Audio Compression format (via 'mkwcon'):
138                     <http://www.etree.org/shnutils/mkwcon/>
139
140              cust   Custom  output  format  module  (output  only, useful for
141                     encoding to a format that shntool does not yet support)
142
143              term   sends output to the terminal
144
145              null   sends output to /dev/null (output only, useful  for  dry‐
146                     runs in several modes, such as fix mode or strip mode)
147
148
149       When reading files for input, shntool automatically discovers which, if
150       any, format module handles each file.  In modes where files are created
151       as  output,  you  can specify what the output format should be ‐ other‐
152       wise, shntool decides for you by selecting the first format  module  it
153       finds that supports output (in a default installation, this will be the
154       wav format).
155
156

CORE OPTIONS

158   Modeless
159       When run without a mode, shntool takes these options:
160
161       -m     Show detailed mode module information
162
163       -f     Show detailed format module information
164
165       -a     Show default format module arguments
166
167       -v     Show version information
168
169       -h     Show a help screen
170
171

GLOBAL OPTIONS

173   All modes
174       All modes support the following options:
175
176       -D     Print debugging information
177
178       -F file
179              Specify a file containing a list of filenames to process.   This
180              overrides any files specified on the command line or on the ter‐
181              minal.
182
183              NOTE: Most modes will  accept  input  filenames  from  a  single
184              source,  according  to  the  following order of precedence: file
185              specified by the -F option, otherwise filenames on  the  command
186              line, otherwise filenames read from the terminal.
187
188       -H     Print times in h:mm:ss.{ff,nnn} format, instead of m:ss.{ff,nnn}
189
190       -P type
191              Specify  progress  indicator  type.   type is one of: {pct, dot,
192              spin, face, none}.  pct shows the completion percentage of  each
193              operation.  dot shows the progress of each operation by display‐
194              ing a '.' after each 10% step toward completion.  spin  shows  a
195              spinning  progress  indicator.   face shows the progress of each
196              operation by displaying six emoticons that  become  increasingly
197              happy  as  the  operation  nears  completion.  none prevents any
198              progress  completion  information  from  being  displayed.   The
199              default is pct.
200
201       -h     Show the help screen for this mode
202
203       -i fmt Specify  input file format decoder and/or arguments.  The format
204              is: "fmt decoder [arg1 ... argN]", and  must  be  surrounded  by
205              quotes.   If  arguments are given, then one of them must contain
206              "%f", which will be replaced with the input filename.  Examples:
207
208              -i 'shn shorten-2.3b'  (use  official  shorten-2.3b  instead  of
209              later versions; leave default arguments untouched)
210
211              -i  'shn  shorten  -x  -d  2048 %f -' (force shorten to skip the
212              first 2048 bytes of each file)
213
214
215       -q     Suppress non‐critical output (quiet mode).  Output that normally
216              goes  to  stderr  will  not  be  displayed, other than errors or
217              debugging information (if specified).
218
219       -r val Reorder input files?  val  is  one  of:  {ask,  ascii,  natural,
220              none}.  The default is natural.
221
222       -v     Show version information
223
224       -w     Suppress warnings
225
226       --     Indicates that everything following it is a filename
227
228   Output modes
229       Additionally,  any mode that creates output files supports the the fol‐
230       lowing options:
231
232       -O val Overwrite existing files?  val is one of: {ask, always,  never}.
233              The default is ask.
234
235       -a str Prefix str to base part of output filenames
236
237       -d dir Specify output directory
238
239       -o str Specify  output file format extension, encoder and/or arguments.
240              Format is:  "fmt [ext=abc] [encoder [arg1 ... argN (%f  =  file‐
241              name)]]",  and  must  be surrounded by quotes.  If arguments are
242              given, then one  of  them  must  contain  "%f",  which  will  be
243              replaced with the output filename.  Examples:
244
245              -o  'shn  shorten  -v2  - %f' (create shorten files without seek
246              tables)
247
248              -o 'flac flake - %f' (use alternate flac encoder)
249
250              -o 'aiff ext=aif' (override default  aiff  extension  of  'aiff'
251              with 'aif')
252
253              -o  'cust  ext=mp3  lame  --quiet  - %f' (create mp3 files using
254              lame)
255
256
257       -z str Postfix str to base part of output filenames
258
259

MODE‐SPECIFIC OPTIONS

261   len mode options
262       -U unit
263              Specifies the unit in which the totals will be printed.  unit is
264              one of: {b, kb, mb, gb, tb}.  The default is b.
265
266       -c     Do not show column names
267
268       -t     Do not show totals line
269
270       -u unit
271              Specifies  the unit in which each file will be printed.  unit is
272              one of: {b, kb, mb, gb, tb}.  The default is b.
273
274       len mode output
275
276              The output of len mode may seem cryptic  at  first,  because  it
277              attempts  to convey a lot of information in just a little bit of
278              space.  But it is quite easy to read once you know what the col‐
279              umns  represent;  and in certain columns, what each character in
280              the column means.  Each column is explained below.
281
282              length Shows the length of the WAVE data, in m:ss.nnn (millisec‐
283                     ond)  format.  If the data is CD‐quality, then m:ss.ff is
284                     shown instead, where ff is a number from 00  to  74  that
285                     best approximates the number of frames (2352‐byte blocks)
286                     remaining after m:ss.  If all files are  CD‐quality,  the
287                     total  length  will be shown in m:ss.ff format; otherwise
288                     it will be in m:ss.nnn format.   NOTE:  CD‐quality  files
289                     are  rounded  to  the  nearest frame; all other files are
290                     rounded to the nearest millisecond.
291
292              expanded size
293                     Shows the total size of all WAVE chunks within  the  file
294                     (header,  data  and  any extra RIFF chunks).  Essentially
295                     this is the size that the file would be if it  were  con‐
296                     verted to .wav format, e.g.  with shntool conv.
297
298                     NOTE:  Do  not rely on this field for audio size!  If you
299                     simply want to know how many bytes  of  audio  are  in  a
300                     file,  run  it  through  info mode, and look at the "data
301                     size" field in its output.
302
303              cdr    Shows properties related to CD‐quality files.  A  'c'  in
304                     the  first slot indicates that the WAVE data is not [C]D‐
305                     quality.  A 'b' in the second slot indicates that the CD‐
306                     quality  WAVE data is not cut on a sector [b]oundary.  An
307                     's' in the third slot indicates that the CD‐quality  WAVE
308                     data is too [s]hort to be burned.
309
310                     A '-' in any of these slots indicates that the particular
311                     property is OK or normal.  An 'x' in any of  these  slots
312                     indicates  that the particular property does not apply to
313                     this file, or cannot be determined.
314
315              WAVE   Shows properties of the WAVE data.  An 'h' in  the  first
316                     slot  indicates  that the WAVE [h]eader is not canonical.
317                     An 'e' in the second slot indicates that  the  WAVE  file
318                     contains [e]xtra RIFF chunks.
319
320                     A '-' in any of these slots indicates that the particular
321                     property is OK or normal.  An 'x' in any of  these  slots
322                     indicates  that the particular property does not apply to
323                     this file, or cannot be determined.
324
325              problems
326                     Shows problems detected with the WAVE header, WAVE  data,
327                     or  the  file  itself.  A '3' in the first slot indicates
328                     that the file contains an ID[3]v2 header.  An 'a' in  the
329                     second   slot  indicates  that  the  audio  data  is  not
330                     block‐[a]ligned.  An 'i' in the third slot indicates that
331                     the  WAVE header is [i]nconsistent about data size and/or
332                     file size.  A 't' in the fourth slot indicates  that  the
333                     WAVE  file  seems  to be [t]runcated.  A 'j' in the fifth
334                     slot indicates that the WAVE file seems  to  have  [j]unk
335                     appended to it.
336
337                     A '-' in any of these slots indicates that the particular
338                     problem was not detected.  An 'x' in any of  these  slots
339                     indicates  that  the particular problem does not apply to
340                     this file, or cannot be determined.
341
342              fmt    Shows which file format handled this file.
343
344              ratio  Shows the compression ratio for this file.
345
346              filename
347                     Shows the name of the file that's being inspected.
348
349
350   fix mode options
351       NOTE: file names for files created in fix mode will  be  based  on  the
352       input file name with the string '-fixed' appended to it, and the exten‐
353       sion will be the default extension of  the  output  file  format.   For
354       example,  with  an  output  file format of shn the file 'foo.wav' would
355       become 'foo-fixed.shn'.  This can be overridden with the -a  and/or  -z
356       global options described above.
357
358       -b     Shift  track  breaks  backward  to the previous sector boundary.
359              This is the default.
360
361       -c     Check whether fixing is needed,  without  actually  fixing  any‐
362              thing.  shntool will exit with status 0 if fixing is needed, and
363              status 1 otherwise.  This can be useful in shell scripts,  e.g.:
364              "if shntool fix -c *; then shntool fix *; else ...; fi"
365
366       -f     Shift track breaks forward to the next sector boundary.
367
368       -k     Specifies  that all files should be processed, even if the first
369              several of them wouldn't be altered, aside from a possible  file
370              format  change.   The  default is to skip the first N files that
371              wouldn't be changed from a WAVE data  perspective  in  order  to
372              avoid unnecessary work.
373
374       -n     Specifies  that  the last file created should not be padded with
375              silence to make its WAVE data size a  multiple  of  2352  bytes.
376              The default is to pad the last file.
377
378       -u     Round track breaks to the nearest sector boundary.
379
380
381   hash mode options
382       -c     Specifies  that  the  composite  fingerprint for all input files
383              should be generated, instead of the default of  one  fingerprint
384              per  file.   The composite fingerprint is simply the fingerprint
385              of the WAVE data from all input files taken as a  whole  in  the
386              order given, and is identical to the one that would be generated
387              from the joined file if the same  files  were  joined  into  one
388              large  file,  with no padding added.  This option can be used to
389              fingerprint file sets, or to identify file sets in  which  track
390              breaks have been moved around, but no audio has been modified in
391              any way (e.g. no padding added, no resampling done, etc.).
392
393       -m     Generate MD5 fingerprints.  This is the default.
394
395       -s     Generate SHA1 fingerprints.
396
397
398   pad mode options
399       NOTE: file names for files created in pad mode will  be  based  on  the
400       input  file name with the string '-prepadded' or '-postpadded' appended
401       to it, and the extension will be the default extension  of  the  output
402       file  format.   For example, with an output file format of shn and pre‐
403       padding specified on the command line, the file 'foo.wav' would  become
404       'foo-prepadded.shn'.   This  can  be  overridden  with the -a and/or -z
405       global options described above.
406
407       Be aware that some output format encoders (e.g.  flac,  ape)  automati‐
408       cally strip headers and/or extra RIFF chunks.
409
410       -b     Specifies  that  the file created should be padded at the begin‐
411              ning with silence to make its WAVE data size a multiple of  2352
412              bytes.
413
414       -e     Specifies that the file created should be padded at the end with
415              silence to make its WAVE data size a  multiple  of  2352  bytes.
416              This is the default action.
417
418
419   join mode options
420       NOTE:  file  names for files created in join mode will be prefixed with
421       'joined.', and the extension will be the default extension of the  out‐
422       put  file  format.   For example, with an output file format of wav the
423       files 'files*.wav' would become 'joined.wav'.  This can  be  overridden
424       with the -a and/or -z global options described above.
425
426       -b     Specifies  that  the file created should be padded at the begin‐
427              ning with silence to make its WAVE data size a multiple of  2352
428              bytes.   Note that this option does not apply if the input files
429              are not CD‐quality, since padding is undefined in that case.
430
431       -e     Specifies that the file created should be padded at the end with
432              silence  to  make  its  WAVE data size a multiple of 2352 bytes.
433              This is the default action.  Note  that  this  option  does  not
434              apply  if  the  input files are not CD‐quality, since padding is
435              undefined in that case.
436
437       -n     Specifies that the  file  created  should  not  be  padded  with
438              silence  to  make  its  WAVE data size a multiple of 2352 bytes.
439              Note that this option does not apply if the input files are  not
440              CD‐quality, since padding is undefined in that case.
441
442
443   split mode options
444       NOTE:  file  names for files created in split mode are of the form pre‐
445       fixNNN.ext, where NNN is the output  file  number,  and  'ext'  is  the
446       default  extension of the output file format.  If an output file format
447       of 'wav' is used, and the prefix is  not  altered  via  the  -n  switch
448       described    below,    then    the    output   file   names   will   be
449       "split-track01.wav", "split-track02.wav", etc.  This can be  overridden
450       with the -a and/or -z global options described above.
451
452       For  information  on  specifying split points, see the Specifying split
453       points section below.
454
455       -c num Specifies the number to start counting from when  naming  output
456              files.  The default is 1.
457
458       -e len Prefix each track with len amount of lead‐in taken from the pre‐
459              vious track.  len must be  given  in  bytes,  m:ss,  m:ss.ff  or
460              m:ss.nnn format.
461
462       -f file
463              Specifies  a  file  from which to read split point data.  If not
464              given, then split points are read from the terminal.
465
466       -l len Specifies that the input file should be split into smaller files
467              based  on multiples of the len time interval.  len must be given
468              in bytes, m:ss, m:ss.ff or m:ss.nnn format.
469
470       -m str Specifies a character manipulation string for  filenames  gener‐
471              ated  from CUE sheets.  These characters, taken one‐by‐one, rep‐
472              resent from/to character translation.  They must  always  be  in
473              pairs.  Some examples:
474
475
476              :-     Translate all instances of ':' to '-'
477
478              :-/-   Translate both ':' and '/' to '-'
479
480              :-/_*x Translate ':' to '-', '/' to '_', and '*' to 'x'
481
482
483       -n fmt Specifies  the  file  count output format.  The default is %02d,
484              which gives two‐digit zero‐padded numbers (01, 02, 03, ...).
485
486       -t fmt Name output files in user‐specified format based  on  CUE  sheet
487              fields.  The following formatting strings are recognized:
488
489
490              %p     Performer
491
492              %a     Album
493
494              %t     Track title
495
496              %n     Track number
497
498
499       -u len Postfix  each  track  with len amount of lead‐out taken from the
500              next track.  len must  be  given  in  bytes,  m:ss,  m:ss.ff  or
501              m:ss.nnn format.
502
503       -x list
504              Only  extract  tracks  in  list  (comma  separated,  may contain
505              ranges).  Examples include:
506
507
508              7      Only extract track 7
509
510              3-5    Only extract tracks 3 through 5
511
512              2-6,9,11-13
513                     Only extract tracks 2 through 6, 9, and 11 through 13
514
515
516       Specifying split points
517              Split points simply mark places within  the  WAVE  data  of  the
518              input file where tracks will be split.  They can be specified in
519              any combination of the following formats:
520
521              bytes  where bytes is a specific byte offset
522
523              m:ss   where m = minutes and ss = seconds
524
525              m:ss.ff
526                     where m = minutes, ss = seconds and ff = frames  (75  per
527                     second, so ff ranges from 00 to 74)
528
529              m:ss.nnn
530                     where  m  =  minutes, ss = seconds and nnn = milliseconds
531                     (will be rounded to closest sector boundary, or the first
532                     sector  boundary  if  the  closest  one happens to be the
533                     beginning of the file)
534
535              CUE sheet
536                     - a simple CUE sheet, in which each  "INDEX  01  m:ss:ff"
537                     line is converted to a m:ss.ff split point
538
539              Split  points must be given in increasing order, and must appear
540              one per line.  If the byte  offset  calculated  from  the  final
541              split  point  equals the input file's WAVE data size, then it is
542              ignored.  Since split points specify locations within the  input
543              file  where tracks will be split, N split points will create N+1
544              output files.  All m:ss formats will  create  splits  on  sector
545              boundaries  whenever the input file is CD‐quality; to force non‐
546              sector‐aligned splits, use the exact byte format.
547
548
549   cat mode options
550       -c     Specifies that extra RIFF chunks should be suppressed  from  the
551              output.  The default is to write the extra RIFF chunks.
552
553       -d     Specifies  that the WAVE data should be suppressed from the out‐
554              put.  The default is to write the data.
555
556       -e     Specifies that the WAVE header should  be  suppressed  from  the
557              output.  The default is to write the header.
558
559       -n     Specifies that the NULL pad byte at end of odd-sized data chunks
560              should be suppressed from the output, if present.   The  default
561              is  to  write  the NULL pad byte.  This option only applies when
562              WAVE data is also written, otherwise it is ignored.
563
564
565   cmp mode options
566       -c secs
567              Sets the number of seconds of audio to use  for  the  byte‐shift
568              comparison  buffer.   This  option  only makes sense with the -s
569              option.  The default is 3 seconds.
570
571       -f fuzz
572              Sets the "fuzz factor" for determining whether byte‐shifted data
573              is  identical.   fuzz  is a positive integer that represents the
574              maximum number of allowable  byte  mismatches  between  the  two
575              files in the area searched by the -s option.  This allows one to
576              check for differing bytes between to files that  (a)  are  byte‐
577              shifted  and (b) contain at least one error in the area searched
578              by the -s option.  The higher the fuzz factor,  the  longer  the
579              search  takes,  so  set  it  low  to  begin  with (8 or so), and
580              increase it in small steps if needed.   NOTE:  this  switch  can
581              only be used with the -s switch.
582
583       -l     List offsets and values of all differing bytes.  Output is simi‐
584              lar to 'cmp -l'; in particular, offsets  are  1‐based.   Can  be
585              used with the -s switch.
586
587       -s     Check  to see whether the WAVE data contained in the input files
588              are identical modulo a byte‐shift.  Currently,  this  will  only
589              detect differences up to the first 529200 bytes (equal to 3 sec‐
590              onds of CD‐quality data).  This can be used to compare WAVE data
591              within a pre‐burned file to WAVE data in the corresponding track
592              ripped from the burned CD, which is useful if the  ripped  track
593              came from a CD burned TAO, and thus might have a 2‐second gap of
594              silence at the beginning.  This option can also help identify  a
595              CD burner/CD reader combined read/write offset.
596
597
598   cue mode options
599       -c     Specifies that a simple CUE sheet should be output.  This is the
600              default action.  NOTE: all input files must  be  CD‐quality  for
601              CUE sheets to be valid.
602
603       -s     Specifies  that  split  points  in  explicit  byte‐offset format
604              should be output.
605
606
607   conv mode options
608       NOTE: file names for files created in conv mode will be named based  on
609       the  input  file  name.  Specifically, if the input file name ends with
610       the default file extension for that file's  format,  then  the  default
611       extension  for the desired output format will replace it; otherwise, it
612       will be appended to it.  For example, for an output format of shn and a
613       wav  input  file  named  'file.wav',  the  converted file will be named
614       'file.shn', since '.wav' is the default extension for the  wav  format.
615       On  the  other  hand, given the same situation above, but with an input
616       file  named   'file.wave',   the   converted   file   will   be   named
617       'file.wave.shn',  since  '.wave'  does  not  match '.wav'.  This can be
618       overridden with the -a and/or -z global options described above.
619
620       Be aware that some output format encoders (e.g.  flac,  ape)  automati‐
621       cally  strip  headers and/or extra RIFF chunks, while others (e.g. sox)
622       might adjust WAVE data sizes in rare instances in order  to  align  the
623       audio on a block boundary.
624
625       -t     Read WAVE data from the terminal.
626
627
628   info mode options
629       This mode doesn't support any additional options.
630
631
632   strip mode options
633       NOTE:  file  names for files created in strip mode will be based on the
634       input file name with the string '-stripped' appended  to  it,  and  the
635       extension will be the default extension of the output file format.  For
636       example, with an output file format of wav  the  file  'bar.shn'  would
637       become  'bar-stripped.wav'.   This can be overridden with the -a and/or
638       -z global options described above.
639
640       Be aware that some output format encoders (e.g.  flac,  ape)  automati‐
641       cally  strip  headers and/or extra RIFF chunks, while others (e.g. sox)
642       might adjust WAVE data sizes in rare instances in order  to  align  the
643       audio on a block boundary.
644
645       -c     Specifies  that  extra  RIFF chunks should not be stripped.  The
646              default is to remove everything that  appears  after  the  first
647              data chunk.
648
649       -e     Specifies  that  WAVE headers should not be made canonical.  The
650              default is to canonicalize headers.
651
652
653   gen mode options
654       NOTE: file names for files created in gen mode will  be  prefixed  with
655       'silence.', and the extension will be the default extension of the out‐
656       put file format.  For example, with an output file format  of  wav  the
657       generated file would become 'silence.wav'.  This can be overridden with
658       the -a and/or -z global options described above.
659
660       -l len Generate files containing len amount of silence.   len  must  be
661              given in bytes, m:ss, m:ss.ff or m:ss.nnn format.
662
663
664   trim mode options
665       NOTE:  file  names  for files created in trim mode will be based on the
666       input file name with the string '-trimmed'  appended  to  it,  and  the
667       extension will be the default extension of the output file format.  For
668       example, with an output file format of shn  the  file  'foo.wav'  would
669       become 'foo-trimmed.shn'.  This can be overridden with the -a and/or -z
670       global options described above.
671
672       -b     Only trim silence from the beginning of files
673
674       -e     Only trim silence from the end of files
675
676

ENVIRONMENT VARIABLES

678       ST_DEBUG
679              If set, shntool will print debugging information.  This is anal‐
680              ogous to the -D global option, with the exception that debugging
681              is enabled immediately, instead  of  when  the  command‐line  is
682              parsed.
683
684       ST_<FORMAT>_DEC
685              Specify  input  file  format  decoder and/or arguments.  Replace
686              <FORMAT> with the format you wish to modify,  e.g.   ST_SHN_DEC.
687              The  format  of  this  variable  is  analagous  to the -i global
688              option, except that the initial format is not  included.   Exam‐
689              ples:
690
691              ST_SHN_DEC='shorten-2.3b'
692
693              ST_SHN_DEC='shorten -x -d 2048 %f -'
694
695
696       ST_<FORMAT>_ENC
697              Specify  output file format extension, encoder and/or arguments.
698              Replace <FORMAT> with  the  format  you  wish  to  modify,  e.g.
699              ST_SHN_ENC.   The format of this variable is analagous to the -o
700              global option, except that the initial format is  not  included.
701              Examples:
702
703              ST_SHN_ENC='shorten -v2 - %f'
704
705              ST_FLAC_ENC='flake - %f'
706
707              ST_AIFF_ENC='ext=aif'
708
709              ST_CUST_ENC='ext=mp3 lame --quiet - %f'
710
711       Note  that command‐line options take precedence over any of these envi‐
712       ronment variables.
713
714

EXIT STATUS

716       Generally speaking, shntool will exit with status 0 upon  success,  and
717       status  1  if  it  encounters an error.  The only exception is when the
718       'quit' option is selected from within the interactive  file  reordering
719       menu, in which case the exist status will be 255.
720
721

NOTES

723       shntool  is a misnomer, since it processes WAVE data, not shorten data.
724       The name is a holdover from its early days as 'shnlen', a program  cre‐
725       ated  specifically to extract information about WAVE data stored within
726       .shn files.
727
728       Aliases for shntool are prefixed with 'shn' instead of 'wav'  to  avoid
729       possible collisions with existing programs.
730
731

AUTHOR

733       Jason Jordan <shnutils at freeshell dot org>
734
735       Please send all bug reports to the above address.
736
737       The    latest   version   of   shntool   can   always   be   found   at
738       <http://www.etree.org/shnutils/> or <http://shnutils.freeshell.org/>.
739
740
742       Copyright (C) 2000-2009 Jason Jordan
743
744       This is free software.  You may redistribute copies  of  it  under  the
745       terms       of       the      GNU      General      Public      License
746       <http://www.gnu.org/licenses/gpl.html>.  There is NO WARRANTY,  to  the
747       extent permitted by law.
748
749

REVISION

751       $Id: shntool.1,v 1.140 2009/03/30 05:59:25 jason Exp $
752
753
754
755shntool 3.0.10                    March 2009                        SHNTOOL(1)
Impressum