You are not logged in.
Pages: 1
I had to split alot of Music CDs today (different filetypes) and created a simple script to automate & speed up the process.
Dunno if there already exists a programm for this but maybe some of you find it useful as well.
The script is a frontend for: cuetools shntool mp3splt
supported filetypes: ape flac mp3 ogg tta wv wav
It splits the image in single files and tags them using the infos provided in the cue file.
ape and wav files will be converted to flac.
Usage: cuesplit /path/to/dir
The default path is the current directory.
cuesplit.sh
#!/bin/sh
# frontend for: cuetools, shntool, mp3splt
# optional dependencies: flac, mac, wavpack, ttaenc
# v1.3 sen
SDIR=`pwd`
if [ "$1" = "" ]
then
DIR=$SDIR
else
case $1 in
-h | --help )
echo "Usage: cuesplit [Path]"
echo " The default path is the current directory."
exit
;;
* )
DIR=$1
esac
fi
echo -e "\
Directory: $DIR
________________________________________
"
cd "$DIR"
TYPE=`ls -t1`
case $TYPE in
*.ape*)
mkdir split
shnsplit -d split -f *.cue -o "flac flac -V --best -o %f -" *.ape -t "%n %p - %t"
rm -f split/00*pregap*
cuetag.sh *.cue split/*.flac
exit
;;
*.flac*)
mkdir split
shnsplit -d split -f *.cue -o "flac flac -V --best -o %f -" *.flac -t "%n %p - %t"
rm -f split/00*pregap*
cuetag.sh *.cue split/*.flac
exit
;;
*.mp3*)
mp3splt -no "@n @p - @t (split)" -c *.cue *.mp3
cuetag.sh *.cue *split\).mp3
exit
;;
*.ogg*)
mp3splt -no "@n @p - @t (split)" -c *.cue *.ogg
cuetag.sh *.cue *split\).ogg
exit
;;
*.tta*)
mkdir split
shnsplit -d split -f *.cue -o "flac flac -V --best -o %f -" *.tta -t "%n %p - %t"
rm -f split/00*pregap*
cuetag.sh *.cue split/*.flac
exit
;;
*.wv*)
mkdir split
shnsplit -d split -f *.cue -o "flac flac -V --best -o %f -" *.wv -t "%n %p - %t"
rm -f split/00*pregap*
cuetag.sh *.cue split/*.flac
exit
;;
*.wav*)
mkdir split
shnsplit -d split -f *.cue -o "flac flac -V --best -o %f -" *.wav -t "%n %p - %t"
rm -f split/00*pregap*
cuetag.sh *.cue split/*.flac
exit
;;
* )
echo "Error: Found no files to split!"
echo " --> APE, FLAC, MP3, OGG, TTA, WV, WAV"
esac
exitedit: Just had to split a tta file and updated the script.
edit2: better file naming for flac files
edit3: parses additional flac encoder settings: -V --best
Last edited by sen (2010-05-16 05:13:00)
deviantART | GitHub | Last.fm
Offline
I had to split alot of Music CDs today (different filetypes) and created a simple script to automate & speed up the process.
Dunno if there already exists a programm for this but maybe some of you find it useful as well.The script is a frontend for: cuetools shntool mp3splt
supported filetypes: ape flac mp3 ogg wv wavIt splits the image in single files and tags them using the infos provided in the cue file.
ape and wav files will be converted to flac.Usage: cuesplit /path/to/dir
The default path is the current directoty.cuesplit.sh
#!/bin/sh # frontend for: cuetools, shntool, mp3splt # optional dependencies: flac, mac, wavpack SDIR=`pwd` if [ "$1" = "" ] then DIR=$SDIR else case $1 in -h | --help ) echo "Usage: cuesplit [Path]" echo " The default path is the current directory." exit ;; * ) DIR=$1 esac fi echo -e "\ Directory: $DIR ________________________________________ " cd "$DIR" TYPE=`ls -t1` case $TYPE in *.ape*) cuebreakpoints *.cue | shnsplit -a track -o flac *.ape cuetag.sh *.cue track*.flac exit ;; *.flac*) cuebreakpoints *.cue | shnsplit -a track -o flac *.flac cuetag.sh *.cue track*.flac exit ;; *.mp3*) mp3splt -no "@n @p - @t (split)" -c *.cue *.mp3 cuetag.sh *.cue *split\).mp3 exit ;; *.ogg*) mp3splt -no "@n @p - @t (split)" -c *.cue *.ogg cuetag.sh *.cue *split\).ogg exit ;; *.wv*) cuebreakpoints *.cue | shnsplit -a track -o flac *.wv cuetag.sh *.cue track*.flac exit ;; *.wav*) cuebreakpoints *.cue | shnsplit -a track -o flac *.wav cuetag.sh *.cue track*.flac exit ;; * ) echo "Error: Found no files to split!" echo " --> APE, FLAC, MP3, OGG, WV, WAV" esac exit
Thanks, very nice job....
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
This is excellent -- thanks a ton.
Offline
Tanks a lot ![]()
Offline
Offline
Thanks a lot for this; I was really missing something with a Medieval CUE Splitter functionality.
One dozy question though: Do the scripts / programs it calls make flac encode with the highest compression level?
Offline
Thanks a lot for this; I was really missing something with a Medieval CUE Splitter functionality.
One dozy question though: Do the scripts / programs it calls make flac encode with the highest compression level?
Actually I didn't know if you can parse encoder settings via shnsplit but it is possible and thanks to you I looked into this.
The default flac encoding settings are this:
flac -s -o %fSo the default flac compression level of 6 was used (8 being the highest available).
I've updated the script and added the flac encoder settings -V (verification) and --best (highest available compression level - currently 8).
deviantART | GitHub | Last.fm
Offline
Major thanks for this gem. I posted a link to this thread on the APE+CUE Splitting wiki page here: https://wiki.archlinux.org/index.php/AP … _Splitting
Last edited by wsduvall (2011-02-22 16:08:53)
My 5 node 9 CPU cluster: www.amenrecluster.com
OS: Arch Linux
Machines:Fujitsu T4210 and IBM eServer xSeries 335
Offline
Thank you.
An entire multi-track audio CD may be ripped to a single audio file and a cue sheet. However software audio players and hardware digital audio players often treat each audio file as a single playlist entry, which can make it difficult to select and identify the individual tracks. A common solution is to split the original audio file into a series of separate files, one per track.
There is a step by step on how to split FLAC, MP3, APE, WAV, DTS, WMA, OGG, etc accompanied with CUE file on Mac and Windows which informs us a method of writting a CUE file by yourself:
CUE file looks like this:
PERFORMER "Rainer Kubmaul; Sonja Prunnbauer"
TITLE "Paganini - Sonatas for Violin and Guitar"
FILE "Paganini.-.Sonatas.for.Violin.and.Guitar.flac" WAVE
TRACK 01 AUDIO
TITLE "01. I. Allegro Spiritoso"
PERFORMER "Rainer Kubmaul, Sonja Prunnbauer"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "02. II. Adagio Assai Espressivo"
PERFORMER "Rainer Kubmaul, Sonja Prunnbauer"
INDEX 01 07:21:00
TRACK 03 AUDIO
TITLE "03. III. Rondeau"
PERFORMER "Rainer Kubmaul, Sonja Prunnbauer"
INDEX 01 10:37:00
Offline
Pages: 1