Linux: Created shntool entry

master
tiyn 1 year ago
parent 1a2fd40ae4
commit efacc50f2c

@ -14,42 +14,5 @@ Another possible tagging software is [MusicBrainz Picard](../picard.md)
### Splitting Flac file according to cue file
An easy way to split flac files according to a [cue file](../cue_sheet.md) is
using `cuebreakpoints` and `shnsplit`.
On most distributions they are in a package with the same name.
The following line of shell command splits a flac file according to a cue file.
The `-o` tag specifies the output file format.
```sh
cuebreakpoints '<cue file>' | shnsplit -o flac '<audio flac file>'
```
Omitting of the `-o` flag will result in output files with the `.wav` filetype.
Alternatively the usage of `cuebreakpoints` can be avoided with the following
command.
```sh
shnsplit -f '<cue file>' -o flac '<audio flac file>'
```
Another option is to use [`cue2tracks`](https://github.com/ar-lex/cue2tracks).
This has the advantage that tags for album title, song name and others are set
while splitting the files.
An example command looks like the following.
The `.flac` file is not mentioned in the command.
```sh
cue2tracks '<cue file>'
```
For any of these commands there can be problems with splitting `.flac` files.
It then is recommended to convert the file to the also lossless `.wav` format,
split the files and convert it back to `.flac`.
High quality flac files with older `.cue` files that use the format `mm:ss:ff`
might split the file at the wrong timings.
The format `mm:ss:ff` is not compatible with the newer versions of
cuebreakpoints, cue2tracks and shnsplit.
To get the correct timings the `.cue` file has to be changed to use the format
`mm:ss:fff`.
It is recommended to use the shnsplit alternative in this case.
`shnsplit` can be used to split flac files.
In the [shnsplit article](/wiki/linux/shnsplit.md) an explanation on this is given.

@ -15,7 +15,7 @@ yay is also a wrapper for pacman so yay can be used instead of pacman to
install and update both AUR and main repository programs.
It features the same syntax.
### Bugfixes
### Troubleshooting
The following section describes problems that can arise when using pacman or
yay.

@ -0,0 +1,74 @@
# shntool
[shntool](http://shnutils.freeshell.org/shntool/) is a multi-purpose data processing utility.
With it audio files of a wide array of codecs - like [flac](/wiki/flac_%28codec%29.md) - can be
edited.
## Setup
shntool can be installed on most distributions by installing the `shntool` package.
## Usage
### Splitting Audio Files According to a CUE File
An easy way to split audio files according to a [cue file](../cue_sheet.md) is
using `shnsplit`.
Alternatively the interface `cuebreakpoints` can be used which uses `shnsplit`.
Note that some codecs require special setup.
These codecs are referenced in the end of this section.
The following line of shell command splits an audio file according to a cue file.
The `-o` tag specifies the output file format - for example `flac`.
```sh
cuebreakpoints '<cue file>' | shnsplit -o '<codec>' '<audio file>'
```
Omitting of the `-o` flag will result in output files with the `.wav` filetype.
Alternatively the usage of `cuebreakpoints` can be avoided with the following
command.
```sh
shnsplit -f '<cue file>' -o '<codec>' '<audio file>'
```
Another option is to use [`cue2tracks`](https://github.com/ar-lex/cue2tracks).
This has the advantage that tags for album title, song name and others are set
while splitting the files.
An example command looks like the following.
The audio file is not mentioned in the command.
```sh
cue2tracks '<cue file>'
```
For any of these commands there can be problems with splitting files.
It then is recommended to convert the file to the also lossless `.wav` format,
split the files and convert it back to the desired codec.
For `ape` files a special package needs to be installed to be able to split them.
This package is called `flacon`.
It is normally used as a GUI for `shntool` but comes with the codecs needed.
It is usually available in a package of the name `flacon`.
On Ubuntu systems the repository first has to be added by running the following command.
```sh
add-apt-repository -y ppa:flacon
```
Afterwards `flacon` can be installed like a normal package.
## Troubleshooting
### Unable to Split Audio Files
This error occurs when
[splitting audio files according to cue files](#splitting-audio-files-according-to-a-cue-file).
High quality flac files with older `.cue` files that use the format `mm:ss:ff`
might split the file at the wrong timings.
The format `mm:ss:ff` is not compatible with the newer versions of
cuebreakpoints, cue2tracks and shnsplit.
To get the correct timings the `.cue` file has to be changed to use the format
`mm:ss:fff`.
It is recommended to use the shnsplit alternative in this case.
Loading…
Cancel
Save