Difference between revisions of "CUE Splitting"

From ArchWiki
Jump to: navigation, search
m (add ja link)
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Audio/Video]]
+
[[Category:Multimedia]]
{{Poor writing|[[Help:Style|Style]] problems}}
+
[[ja:CUE による分割]]
 
This article describes how to split audio files using CUE metadata.
 
This article describes how to split audio files using CUE metadata.
  
 
==Installation==
 
==Installation==
  
{{Merge|List of applications}}
+
To split audio files you need {{Pkg|shntool}}. To split CD images in ISO or raw format you need {{Pkg|bchunk}}.
  
To split audio files you need {{Pkg|shntool}}.
+
The WAV format is supported natively for both input and output. To decode or encode files in other format you need an appropriate decoder. For example: {{Pkg|flac}}, {{pkg|mac}}, or {{Pkg|wavpack}}.
  
To split iso or bin files you need {{Pkg|bchunk}}.
+
To tag audio files you need extra tools, such as {{Pkg|cuetools}}, {{Pkg|mp3info}}, or {{Pkg|vorbis-tools}}.
  
To read some audio files you may need an appropriate decoder. For example: {{Pkg|flac}} or {{Pkg|wavpack}}.
+
==Splitting==
  
To encode files to any format other than wav you need to install encoders. For example: {{Pkg|flac}}, {{Pkg|lame}}, or {{Pkg|vorbis-tools}}.
+
To split an audio file accompanied by a CUE sheet into tracks in ''.wav'' format, use the ''shnsplit'' command:
 +
$ shnsplit -f file.cue file.ape
  
To tag audio files you need extra tools such as: {{Pkg|cuetools}}, {{Pkg|mp3info}}, or {{Pkg|vorbis-tools}}.
+
To split ''.bin'' file with CUE sheet into tracks in ''.wav'' format:
 +
$ bchunk -v -w file.bin file.cue out
  
==Splitting==
+
Format for output file names can be specified with the {{ic|-t}} option ({{ic|%n}} for track number, {{ic|%t}} for title):
 +
$ shnsplit -f file.cue -t "%n %t" file.ape
  
To split a disc audio file accompanied by a cue sheet use the shnsplit command:
+
''shnsplit'' supports on-the-fly encoding to many lossless formats (see {{ic|shntool(1)}} for the full list). For example to encode split tracks in the FLAC format:
  shnsplit -f file.cue file.ape
+
$ shnsplit -f file.cue -o flac file.ape
  
To split bin files with cue sheets use:
+
Encoding options, including the encoder itself, can be specified with the {{ic|-o}} parameter (see {{ic|shntool(1)}} for details):
  bchunk -v -w file.bin file.cue out
+
$ shnsplit -f file.cue -o "flac flac -s -8 -o %f -" file.ape
  
All these commands produce .wav files. You probably want to compress the audio files with formats like flac or mp3.
+
The formats supported by ''shntool'' and default encoder options can be view with the {{ic|shntool -a}} command. If the desired format is not supported by ''shntool'', it can be specified manually. For example, to encode split tracks directly into the Ogg Vorbis format:
 +
$ shnsplit -f file.cue -o "cust ext=ogg oggenc -b 192 -o %f -" file.ape
  
shnsplits gives the possibility to convert on the fly to most lossless formats, like flac. It can be used like so:
+
==Tagging==
  shnsplit -f file.cue -o flac file.ape
 
If you need more control over the conversion you may change the converter parameters inline:
 
  shnsplit -f file.cue -o "flac flac -s -8 -o %f -" file.ape
 
Even better, automatically name split files with track number and title:
 
  shnsplit -f file.cue -t "%n %t" -o "flac flac -s -8 -o %f -" file.ape
 
  
The formats shnsplit supports can be view using the command
+
You will need {{Pkg|cuetools}} to use ''cuetag.sh''.
  shntool -a
 
  
==Tagging==
+
To copy the metadata from a CUE sheet to the split files you can use:
 +
$ cuetag.sh file.cue *.mp3
  
You'll need {{Pkg|cuetools}} to use cuetag.sh.
+
or if you need to select only certain files:
 +
$ cuetag.sh file.cue track01.mp3 track02.mp3 track03.mp3 track04.mp3
  
To copy the metadata from a cue sheet to the splitted files you can use:
+
''cuetag.sh'' supports id3 tags for ''.mp3'' files and vorbis tags for ''.ogg'' and ''.flac'' files.
  cuetag.sh file.cue *.mp3
 
or if you need to select only certain files:
 
  cuetag.sh file.cue track01.mp3 track02.mp3 track03.mp3 track04.mp3
 
 
cuetag.sh supports id3 tags for .mp3 files and vorbis tags for .ogg and .flac files.
 
  
 
==Alternatives==
 
==Alternatives==
  
 
* This is a script that splits and converts files to tagged FLAC: https://bbs.archlinux.org/viewtopic.php?id=75774.
 
* This is a script that splits and converts files to tagged FLAC: https://bbs.archlinux.org/viewtopic.php?id=75774.
* You can also try the [https://aur.archlinux.org/packages/split2flac/ split2flac] or [https://aur.archlinux.org/packages/split2flac-git/ split2flac-git] script from the [[AUR]].
+
* You can also try the {{AUR|split2flac}} or {{AUR|split2flac-git}} script from the [[AUR]].
* You may also use [https://aur.archlinux.org/packages/flacon/ flacon] or [https://aur.archlinux.org/packages/flacon/ flacon-git] , a graphical Qt program that splits, converts and tags album audio files into song audio files.
+
* You may also use {{AUR|flacon}} or {{AUR|flacon-git}}, a graphical Qt program that splits, converts and tags album audio files into song audio files. It also features automatic character set detection for CUE files.
 +
* To avoid quality loss from transcoding mp3 files, {{Pkg|mp3splt-gtk}} or {{Pkg|mp3splt}} may be used to directly split mp3 files either manually or automatically with a provided cuesheet. Batch mode processing is also available.
  
 
==References==
 
==References==
* [http://en.wikipedia.org/wiki/Monkey%27s_Audio What is APE?]
+
* [[wikipedia:Monkey's Audio|What is APE?]]
* [http://en.wikipedia.org/wiki/Cue_file What is CUE?]
+
* [[wikipedia:Cue_file|What is CUE?]]
 
* [[Rip Audio CDs]]
 
* [[Rip Audio CDs]]

Latest revision as of 13:20, 14 February 2017

This article describes how to split audio files using CUE metadata.

Installation

To split audio files you need shntool. To split CD images in ISO or raw format you need bchunk.

The WAV format is supported natively for both input and output. To decode or encode files in other format you need an appropriate decoder. For example: flac, mac, or wavpack.

To tag audio files you need extra tools, such as cuetools, mp3info, or vorbis-tools.

Splitting

To split an audio file accompanied by a CUE sheet into tracks in .wav format, use the shnsplit command:

$ shnsplit -f file.cue file.ape

To split .bin file with CUE sheet into tracks in .wav format:

$ bchunk -v -w file.bin file.cue out

Format for output file names can be specified with the -t option (%n for track number, %t for title):

$ shnsplit -f file.cue -t "%n %t" file.ape

shnsplit supports on-the-fly encoding to many lossless formats (see shntool(1) for the full list). For example to encode split tracks in the FLAC format:

$ shnsplit -f file.cue -o flac file.ape

Encoding options, including the encoder itself, can be specified with the -o parameter (see shntool(1) for details):

$ shnsplit -f file.cue -o "flac flac -s -8 -o %f -" file.ape

The formats supported by shntool and default encoder options can be view with the shntool -a command. If the desired format is not supported by shntool, it can be specified manually. For example, to encode split tracks directly into the Ogg Vorbis format:

$ shnsplit -f file.cue -o "cust ext=ogg oggenc -b 192 -o %f -" file.ape

Tagging

You will need cuetools to use cuetag.sh.

To copy the metadata from a CUE sheet to the split files you can use:

$ cuetag.sh file.cue *.mp3

or if you need to select only certain files:

$ cuetag.sh file.cue track01.mp3 track02.mp3 track03.mp3 track04.mp3

cuetag.sh supports id3 tags for .mp3 files and vorbis tags for .ogg and .flac files.

Alternatives

  • This is a script that splits and converts files to tagged FLAC: https://bbs.archlinux.org/viewtopic.php?id=75774.
  • You can also try the split2flacAUR or split2flac-gitAUR script from the AUR.
  • You may also use flaconAUR or flacon-gitAUR, a graphical Qt program that splits, converts and tags album audio files into song audio files. It also features automatic character set detection for CUE files.
  • To avoid quality loss from transcoding mp3 files, mp3splt-gtk or mp3splt may be used to directly split mp3 files either manually or automatically with a provided cuesheet. Batch mode processing is also available.

References