shntool-split
Split large audio files into tracks
TLDR
View documentation for the original command
SYNOPSIS
shntool split -f
PARAMETERS
-f
Specifies the cuesheet file to use for splitting. The cuesheet file contains the track start times and metadata.
-t
Defines the filename template for the output files. This allows you to customize the naming convention of the split tracks. The template accepts various placeholders, such as %n (track number), %t (track title), %a (artist), etc. See shntool documentation for the complete list.
The input audio file to be split. This can be a single file containing multiple tracks.
-o [flac|wav|aiff|raw|auto]
Specifies the output format. 'auto' attempts to infer the format from the input file.
-d
Specifies a custom decoder command to use. This is needed if the input file is not natively supported. Example: `-d 'ffmpeg -i - -acodec pcm_s16le -f wav -'`. Consult `shntool ref` for examples.
-e
Specifies a custom encoder command to use. The default encoder depends on the output format.
-m
Specifies command to create a m3u or playlist file. Example '-m "m3u=shntool cue2m3u -f %c %d"'
-T
Defines template for metadata tags written to output file.
-z
Preserves the original input file's modification time.
-x
Delete source file after succesful split.
-q
Quiet mode. Suppresses non-error messages.
DESCRIPTION
The `shntool split` command is a powerful utility for splitting large audio files into smaller, more manageable tracks. It's commonly used with lossless audio formats like FLAC, WAV, and SHN, but also supports other formats via external decoders. The tool uses a cuesheet (.cue) file, which contains track start times and metadata, to determine the split points. It creates individual audio files for each track defined in the cuesheet. The command allows for control over filename formatting, tagging, and automatic renaming of files based on cuesheet information. It's a vital tool for archiving and managing digital music collections, especially for splitting large albums ripped as a single file into individual tracks.
CAVEATS
The accuracy of the split depends entirely on the accuracy of the cuesheet. Incorrect cuesheet data can result in improperly split tracks. Some cuesheets might be incompatible. Requires proper decoder if the input file format is not directly supported by `shntool`.
TEMPLATE PLACEHOLDERS
Filename templates use placeholders to represent track information. Common placeholders include: %n (track number), %t (track title), %a (artist), %p (performer), %g (genre), %l (album title), %y (year), %c (cuesheet filename), %d (directory), and %N (track number padded with zeroes).
See shntool documentation for the complete list.
EXIT STATUS
The command returns 0 on success, and a non-zero value on failure. Failures can be caused by invalid options, missing files, incorrect cuesheet format, or decoder errors.
HISTORY
The `shntool` suite emerged as a powerful toolset for manipulating lossless audio files. `shntool split` became a fundamental component for managing large audio files ripped as single tracks. It gained popularity as archival practices evolved to incorporate exact audio copies into digital collections. Development focuses on improving encoding, decoding, file handling, and integration with external tools.
SEE ALSO
shntool(1), cuetools(1), mkcue(1)