Help - Search - Members - Calendar
Full Version: linux cue splitting
Hydrogenaudio Forums > Lossless Audio Compression > Lossless / Other Codecs
filR
i am trying to split a flac (or wav ...) file according to a .cue sheet under linux.
anyone know a tool that can master this task automatically ?

ps // anyone manage to input cue time information (eg 03:38:55) to "wavsplit" (a bash script should be simple to write then ..)
pps // what windoze program is there ? can eac do this ? (might have to fiddle around with eac under wine then ..)
YinYang
Cuetools and Shnsplit IIRC.

Do some googling on cuetools.
filR
QUOTE (YinYang @ Jul 18 2004, 06:23 PM)
Cuetools and Shnsplit IIRC.
*


"cuebreakpoints -f SEXSEXSEX.cue | shnsplit SEXSEXSEX.flac"
did the trick. thx!

ps // yeah baby yeah @ gentoo
crazee_canuck
QUOTE (YinYang @ Jul 18 2004, 10:23 PM)
Cuetools and Shnsplit IIRC.

Do some googling on cuetools.


Thank you YinYang and filR, this thread was very helpful.

QUOTE ("filR")
"cuebreakpoints -f SEXSEXSEX.cue | shnsplit SEXSEXSEX.flac"


It seems that now the -f parameter isn't needed for cuebreakpoints
ak
Hm, cuebreakpoints seems to be abandoned from cuetools, as 'shnsplit < foo.cue' suppose to do the same (never did for me though).

In most cases plain sed can do the same, e.g
> sed '/INDEX 01/!d; s/.*01 //g' foo.cue

A very basic setup, I use (stored in ~/.bashrc)

CODE
splitcue()
{
       [ -z "$1" -o -z "$2" ] && echo "Need at least 2 params" ||
       sed -n '/TRACK 02/,$p' "$1" | sed '/INDEX 01/!d; s/.*01 //g' |
       shnsplit -o cust ext=mpc \
               { mppenc `[ -n "$4" ] && echo "--quality $4"` - %f } \
               `[ -n "$3" ] && echo -d "$3"` "$2"
}

then

> splitcue foo.cue bar.flac [output dir] [quality for mppenc]
scube
QUOTE (ak @ Dec 3 2004, 02:53 AM)
Hm, cuebreakpoints seems to be abandoned from cuetools, as 'shnsplit < foo.cue' suppose to do the same (never did for me though).


When I found out that shnplit had cue file support, I removed cuebreakpoints (cuetools-0.6). shnplit's cue support is very picky (the very first word in the cuesheet must be FILE), so I put it back in the following versions.

The latest version is cuetools-1.2 and it is hosted on BerliOS.
ak
Oh boy, I never noticed announcement about migration to berlios at sf.net rolleyes.gif , thanks for pointing that.
jcoalson
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue

Josh
ponchorage
QUOTE (jcoalson @ Dec 29 2004, 11:19 AM)
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue

Josh
*


Have you thought about making this so that you could use an external cue sheet?
jcoalson
QUOTE (ponchorage @ Dec 29 2004, 04:08 PM)
QUOTE (jcoalson @ Dec 29 2004, 11:19 AM)
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue
*

Have you thought about making this so that you could use an external cue sheet?
*

hadn't occurred to me... why not just import the cuesheet into the FLAC file?

Josh
iconoclast
QUOTE (jcoalson @ Dec 29 2004, 11:19 AM)
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue
*


That's handy. much nicer than having to use --skip --until pairs. Thanks Josh!

What about for splitting though? If I want 10 single song flacs out of my one cd image flac, this new feature would require decoding and reencoding.

The cuebreakpoints/shnsplit combo mentioned earlier in this thread works well, but requires renaming and retagging the results. Anyone know an easy way to split tracks out of a multi-song image without having to rename/retag the resulting files by hand? (I imagine the lack of a standard form of tagging multi-song flacs is an impediment here, but it doesn't hurt to ask.)
ponchorage
QUOTE (iconoclast @ Jan 4 2005, 04:30 PM)
QUOTE (jcoalson @ Dec 29 2004, 11:19 AM)
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue
*


That's handy. much nicer than having to use --skip --until pairs. Thanks Josh!

What about for splitting though? If I want 10 single song flacs out of my one cd image flac, this new feature would require decoding and reencoding.

The cuebreakpoints/shnsplit combo mentioned earlier in this thread works well, but requires renaming and retagging the results. Anyone know an easy way to split tracks out of a multi-song image without having to rename/retag the resulting files by hand? (I imagine the lack of a standard form of tagging multi-song flacs is an impediment here, but it doesn't hurt to ask.)
*


You can use foobar to do this. Just load up the cue sheet for the image or the image itself if you've embedded it. Select all the songs (or just the ones you want individual files of) then right-click and choose "Convert" and make sure you have FLAC selected as the output format.
jcoalson
QUOTE (iconoclast @ Jan 4 2005, 07:30 PM)
QUOTE (jcoalson @ Dec 29 2004, 11:19 AM)
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue
*


That's handy. much nicer than having to use --skip --until pairs. Thanks Josh!

What about for splitting though? If I want 10 single song flacs out of my one cd image flac, this new feature would require decoding and reencoding.
*

yes, currently no tool that I know of can split FLAC without re-encoding. but it is possible.

Josh
scooley
QUOTE (jcoalson @ Dec 29 2004, 12:19 PM) *
BTW there is a new --cue option in flac 1.1.1 that will work if the cue sheet is stored in the FLAC file:

http://flac.sourceforge.net/documentation....lac_options_cue

Josh

Ok, from what I understand this allows you to encode flac files using the cue sheet to define points within that flac file that can mark the beginnging and ending of tracks. Is there any third party software support for this feature? Perhaps a player that can skip to the next track using this data? Or software tools to burn discs with seperate tracks using this metadata? Am I misunderstanding this completely?
scooley
To answer my own post:

I think that the linux player kaffeine makes use of this metadata. I just opened the file using kaffeine, and then clicked a button that said "encode audio cd" and wala, it had that file seperated into tracks. I'll try out some other programs.

EDIT: Nevermind! this wasn't what I thought it was. I haven't found any software that supports this other than flac itself... so far.
spitzwegerich
It is also possible to split a wav file accordung to a cue sheet using bchunk.

But it has the same problem as the solution here:
How do I automatically rename the split files to the track titles provided by the cue sheet? Or better: Automatic renaming to a format string like <track number>-<track title>.
scooley
QUOTE (spitzwegerich @ Apr 25 2006, 05:22) *
It is also possible to split a wav file accordung to a cue sheet using bchunk.

But it has the same problem as the solution here:
How do I automatically rename the split files to the track titles provided by the cue sheet? Or better: Automatic renaming to a format string like <track number>-<track title>.



Not a solution to your problem, but I wanted to advise you that if you are using bchunk to listen very carefully to the very beginning of the first track on each cd you split. I was using bchunk and made the strange discovery that bchunk introduced a chirping sound to the first part of the first song on a split cd. View this thread: http://www.hydrogenaudio.org/forums/index....showtopic=43801

I'd like to know if you experience the same problem.

The way that I was reapplying tag info to the resulting files was with easytag. It wasn't very efficient, and there is probably a better way, but I would open the directory where the newly split/encoded files were within easytag, highlight all of the tracks, misc/cddatabasesearch click "manual search" tab, search cddb for the appropriate cd, then apply the information to all tracks highlighted. It will then retag and rename all of the songs for you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.