Help - Search - Members - Calendar
Full Version: How to use SHNTOOL to split a single wave
Hydrogenaudio Forums > Lossless Audio Compression > Lossless / Other Codecs
maiki
Hi, I've been using Cue Splitter with no problem. However, I would like to try a command line program that could do the job for me, and I have found an interesting application called SHNTOOL. The manual seems too complicated for me though.

Can somebody, please, give me a hint, what exactly should I write in command line to split one big wave file reading a cue sheet?

For instance: how to split a single wave file with: info.cue:

REM GENRE "No Sence"
REM DATE 2000
REM COMMENT "ExactAudioCopy"
PERFORMER "Bloody Bastards"
TITLE "Whooo Hooo"
FILE "BloodyBastards.wav" WAVE
TRACK 01 AUDIO
TITLE "I Know You Gonna Die"
PERFORMER "Bloody Bastards"
INDEX 00 00:00:00
INDEX 01 00:00:32
TRACK 02 AUDIO
TITLE "Slaughter"
PERFORMER "Bloody Bastards"
INDEX 00 02:34:02
INDEX 01 02:34:42
TRACK 03 AUDIO
TITLE "Golden Axe Of Blood"
PERFORMER "Bloody Bastards"
INDEX 00 05:26:62
INDEX 01 05:27:35
maiki
OK, I have tried:

shntool split -f 01.cue 01.wav

I seems to work but I get the very first track, which is too short (0.32)... the second track is 2.34.10 - Cue Splitter generates first track 2.33 with pregap 0.427...

So, should I delete the very first track? It seems too complicated for me... btw SHNTOOL generates one more track than Cue Splitter - has to do with the very first one, OK I think I get the same files apart from the first track from shntool, that should be deleted... Can somebody comment on this please?
shnutils
You can delete the very first track. You can also use the -x option to extract specific tracks, e.g.

CODE
shntool split -f 01.cue -x 2- 01.wav

The numbering can be confusing (I just confused myself wink.gif) but to shntool, split-track00.wav is track 1, split-track01.wav is track 2, etc. So extracting from track 2 onwards should produce the files you want.
greynol
I've been tempted to create a batch file to rename the files after doing this but haven't found a personal need to do so.

If you run into a situation where the very first track is a hidden one and was ripped with a drive that can actually extract it, then you probably won't want to delete it. wink.gif

You might want to have a look at nyaochi's Cuesheet Processor.
maiki
Well, what is the reason I get the first tracks to be so small? I use EAC, and always I get that track. I mean, I ripped a standard audio CD from 1993, no hidden tracks whatsoever...

And thanks for the shntool split -f 01.cue -x 2- 01.wav, it works perfect, just as the cue splitter.

REM DISCID 9B09D20C
REM COMMENT "ExactAudioCopy v0.99pb3"
PERFORMER "Unknown Artist"
TITLE "Unknown Title"
FILE "Doga.wav" WAVE
TRACK 01 AUDIO
TITLE "Track01"
PERFORMER "Unknown Artist"
INDEX 00 00:00:00
INDEX 01 00:00:33
TRACK 02 AUDIO
TITLE "Track02"
PERFORMER "Unknown Artist"
INDEX 00 04:04:30
INDEX 01 04:05:68
TRACK 03 AUDIO
TITLE "Track03"
PERFORMER "Unknown Artist"
INDEX 00 07:52:16
INDEX 01 07:54:55
greynol
It is the additional gap beyond the first two seconds which is often (mistakenly) called the lead-in. Sometimes it may contain a hidden track, which we refer to as HTOA (hidden track-one audio), but usually it's just a small piece of silence. When you rip a disc of separate tracks in the standard way, this portion of this disc is skipped.
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-2008 Invision Power Services, Inc.