HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: TheSpeedoBeast on 2007-07-26 02:48:39

Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 02:48:39
I have a pretty big collection right now and used the single large flac +cue file method for the first half of my collection, and the multiple flac file method for the second half of it ala AutoFLAC (by the way, there isn't anything majorly wrong with AutoFLAC with the way it stores file information or anything, is there? Or is there a better alternative? I noticed that it hasn't been updated in a while, so I always get nervous when that happens).

What I am wondering, is if loading all of the .cue files into foobar2000 and converting to flac files (thus giving me multiple files instead of one large one) is a valid way of splitting up flac files in .cue form. Will I use anything super-important (gaps, etc) from my music if I split everything up that way? Or is there a better way to do this? Thanks guys, I love it every time I come back to these forums.
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-26 04:22:35
What I am wondering, is if loading all of the .cue files into foobar2000 and converting to flac files (thus giving me multiple files instead of one large one) is a valid way of splitting up flac files in .cue form.

The conversion would be 1:1 lossless, if that's what you're wondering.

Will I [lose] anything super-important (gaps, etc) from my music if I split everything up that way? Or is there a better way to do this?

CUE Tools (http://www.hydrogenaudio.org/forums/index.php?showtopic=50113) will definitely retain all gap +etc. information. I'm not sure if foobar can do a proper cue sheet conversion.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 04:40:42
Thanks for the reply. Anyone have any insight as to  if foobar is able to retain gaps, as cuetools does?
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 06:09:21
Also, I don't know how I feel about Cue Tools, because I would have to add silence to every one of my FLAC files just to make it compatible with the program (it needs to be a multiple of 588 samples in length). Not only would that change my files from the original, but it would take HOURS to do. Thanks for the input so far, keep it coming. Thanks guys.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-26 06:21:56
 
These files must not be from CD then.
Title: Splitting large flac+cue into mutiple flac files
Post by: Synthetic Soul on 2007-07-26 07:55:21
Thanks for the reply. Anyone have any insight as to  if foobar is able to retain gaps, as cuetools does?
foobar will split on the INDEX 01 entries, essentially leaving you with gaps appended to the previous track.
Title: Splitting large flac+cue into mutiple flac files
Post by: kjoonlee on 2007-07-26 11:05:06

These files must not be from CD then.

Could be from live recordings, e.g. etree. ~~~~
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 13:50:07
No, they are from actual cds.... you think something is not right with the audio files themselves then? Any way to check? I am really paranoid about my music files' integrity.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-26 17:01:00
No, they are from actual cds.... you think something is not right with the audio files themselves then? Any way to check? I am really paranoid about my music files' integrity.
No, if the images were correctly extracted from CDs then your assumption that you would have to add silence to them just to make it compatible with CUE Tools is what is not right here. 

I wrote a batch file that converts single image CUE sheets into noncompliant ones (and corrected gaps as well), BTW...
http://www.hydrogenaudio.org/forums/index....st&p=436081 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=46355&view=findpost&p=436081)
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-26 17:10:36
Sounds like missing offset samples were not filled up with silence during the ripping process.* (This doesn't mean there's something necessarily wrong with your files. They simply aren't padded)

CUE Tools gives an error when attempting to convert such a FLAC image, if the image was not encoded with the "--sector-align" option. Though you can still use it to convert the cue sheet only, if you wish. (Output Style= Gaps Appended)

*edit:
If you have EAC logs, check:
Code: [Select]
Other options      : 
    Fill up missing offset samples with silence : Yes
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-26 17:30:35
Good point!

There's also the possiblity that he ripped to a compressed image and EAC was configured with a compression offset.

Hopefully neither were the case or TheSpeedoBeast will have some work on his hands if he wants to use CUE Tools.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 18:11:10
I will post a log from that series of rips as soon as I get home... I used WACK to help me in creating this series of rips: http://www.freewebs.com/ponchorage/wack/docs.html (http://www.freewebs.com/ponchorage/wack/docs.html)

Which told me to use Copy Image & Create CUE Sheet --> Compressed to rip the CD. Which it looks like you said is not a good thing. Let me know what you think about this one...
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-26 18:23:30
No... a compression offset is bad if used in this case. There's nothing wrong with using an external compressor per se.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-26 18:29:09
Ahhhh, I read greynol's post wrong. Sorry for the confusion. I will post my log (do you need anything else to help me troubleshoot this?) from those rips later. Thanks guys, you are all a huge help!
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 00:13:54
EAC extraction logfile from 17. August 2005, 23:37 for CD
Eve 6 / Eve 6

Used drive  : _NEC    DVD_RW ND-3520AW  Adapter: 0  ID: 0
Read mode  : Secure with NO C2, accurate stream, NO disable cache
Read offset correction : 48
Overread into Lead-In and Lead-Out : No

Used output format : C:\eac\wack\Wack.exe  (User Defined Encoder)
                    128 kBit/s
                    Additional command line options :  %s %o %d "%a" "%g" "%y" "%m"
                    Use compression offset : 0

Other options      :
    Fill up missing offset samples with silence : Yes
    Delete leading and trailing silent blocks : No
    Native Win32 interface for Win NT & 2000


Range status and errors
Selected range
    Filename C:\Documents and Settings\Shook\Desktop\iuh.wack.wav

    Peak level 100.0 %
    Range quality 99.9 %
    CRC 352E783A
    Copy OK

No errors occured

End of status report
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-27 01:32:12
There's also the possiblity that he ripped to a compressed image and EAC was configured with a compression offset.

No... a compression offset is bad if used in this case. There's nothing wrong with using an external compressor per se.

Use compression offset : 0
...and there it is.

Having it selected means that it's configured, regardless of the fact that it's set to zero.

Every rip you've done to flac with this setting enabled has had 4608 samples of silence added at the end.

Bummer!

The good news is they're easily removed by decoding with flac using the following command-line option:
--until=-4608
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 02:03:18
Do you mean reencoding with flac? You scared me with the 'bummer', but the 'good news' really improved the moment : -)

Thanks so much, I will let you know how goes it.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 03:45:05
All right, I ran a test run of flac on one of my files, and it gave me some errors. Is that ignorable, or should I be concerned? (Ignore the scripting stuff, just look at the flac options: [flac -1Vf --until=-4608 (Filename.flac)]

shook@shook-desktop:~/Desktop$ find /home/shook/Desktop/ -name '*.flac' -exec flac -1Vf --until=-4608 {} \;

flac 1.1.4, Copyright © 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

Third Eye Blind - Third Eye Blind.flac: WARNING, can't use existing seektable in input FLAC since the input size is changing or unknown, dropping existing SEEKTABLE block...
Third Eye Blind - Third Eye Blind.flac: Verify OK, wrote 430134668 bytes, ratio=1.039

Also, can anyone confirm or deny that foobar2000 can make perfect transitions to multiple-file setups instead of monolithic? And whether I do monolithic or not, should I reencode my files with the --until=-4608 flag? Sorry for all the ?'s, I can make a new thread if necessary.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-27 05:55:47
There's probably a way to go from flac to flac, but I'm suggesting you go from flac to wave:

flac -d --until=-4608 <file.flac>

If you want to go from flac to flac, check with Synthetic Soul.  I'm sure there are plenty of others who can help, but he's the guy who regularly gives consistently good advice.

EDIT: I did try the following:

flac --until=-4608 -o "file(re-encode).flac" "file.flac"

It gave be the same warning that you got, but still transcoded ok.
Title: Splitting large flac+cue into mutiple flac files
Post by: Synthetic Soul on 2007-07-27 08:20:18
I wouldn't suggest anything better than greynol's:

Code: [Select]
FLAC --until=-4608 -o out.flac in.flac

One of the beauties of 1.1.3 I think.

I would say that the warning FLAC is giving should not be a concern; it states that it is due to the length changing, which we know about, as we are specifying it.

I assume that FLAC would write a new seektable.  If not, the only other suggestion I can make is to also use METAFLAC to rebuild the seektable.  The default (http://flac.sourceforge.net/documentation_tools_flac.html#flac_options_seekpoint), when encoding, is a seekpoint every 10 seconds, so:

Code: [Select]
FLAC --until=-4608 -o out.flac in.flac & METAFLAC --add-seekpoint=10s out.flac

Best to just use FLAC to re-encode a file and then use METAFLAC to check that a seektable exists.  I very much expect it will.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 16:47:14
Thanks for all your help guys, I really appreciate it. Seriously. I just have two more (hopefully) questions about all this before I let you go.

Would you suggest reencoding those files with the --until=-4608 flag regardless if I use CUE tools or not? In other words, would that make my files more 'accurate'?

Also, back to foobar2000, it seems like that is the 'easiest' method (but not necessarily the 'best'), since it automatically preserves tags and everything, and it seems like gaps also get preserved. Can anyone confirm that foobar2000 is a good way of converting between files, or should I stick with CUE Tools? Thanks in advance everyone.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-27 16:54:13
Would you suggest reencoding those files with the --until=-4608 flag regardless if I use CUE tools or not? In other words, would that make my files more 'accurate'?
It's only extra silence at the end, but if you're interested in having them as accurate as possible then I'd say yes.  This is much more dire of a problem when people rip as individual tracks (especially when gapless playback is needed).

I absolutely trust foobar2000 to split images, but be aware that any data before the 01 index of the first track that is not null will not be preserved.  This is true for any other program that is instructed to split with gaps appended to the previous track.  EAC can split images too, btw; they just need to be in wave format.

What prompted you to enable the compression offset?  Did you find this in an online guide?  If so I would raise hell over it!
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 17:37:13
All right, so I have the potential of losing some information if I use foobar... is there any way to circumvent this? Or is CUE Tools the only way? If I keep the old cuesheet around, would that suffice? Sorry for all the questions, but I spend DAYS building up my collection, and I don't want to put it in an early grave.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-27 17:58:45
All right, so I have the potential of losing some information if I use foobar... is there any way to circumvent this? Or is CUE Tools the only way? If I keep the old cuesheet around, would that suffice? Sorry for all the questions, but I spend DAYS building up my collection, and I don't want to put it in an early grave.
foobar2000 won't be able to do this unless you trick it by providing a modified cue sheet.  When using an original unmodified cue sheet, you'll need to use a program that is capable of splitting index-based or with gaps prepended to the next track.

Usually the index before the first track which is commonly referred to as HTOA (hidden track one audio) is just digital silence (null samples) and can be preserved with a simple pregap line in the cue sheet.  When it isn't digital silence, you won't be able to retain it by keeping the old cue sheet around; the data must be extracted.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-27 19:15:48
Haha, so much to think about : -)

I guess that I will open this thread to this: "what would you guys personally do?"
Title: Splitting large flac+cue into mutiple flac files
Post by: yocalif on 2007-07-28 02:51:32
Newbie Flac and EAC user questions.

1. What is best method to convert single flac to individual flac tracks?  (this is mainly for just playing in audio player, however I absolutely want to convert to individual tracks, not simply play single flac tracks using cue sheet.)
What is best method if I wanted to reproduce the original CD or is there enough info here?

I rip to using EAC/Autoflac
I play Flac using Winamp

See Sample single Flac cue sheet below.
(I did not rip this file, I d/l it.)


2. When editing Flac tracks with MP3tag, (i.e. no tag info only file names), does this mess up the flac file in a way that will not match the attached cue sheet.  (Again this is for downloaded stuff, all my cd rips have the tags).


Any help is greatly appreciated!

Sample Single Flac's cue sheet.
REM DISCID 4C0ACD06
REM COMMENT "ExactAudioCopy v0.95b4"
PERFORMER "Carlos Santana & Buddy Miles"
TITLE "Carlos Santana & Buddy Miles! Live!"
FILE "Carlos Santana & Buddy Miles - Carlos Santana & Buddy Miles! Live!.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Marbles"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Lava"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 01 04:18:25
  TRACK 03 AUDIO
    TITLE "Evil Ways"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 00 06:28:64
    INDEX 01 06:31:42
  TRACK 04 AUDIO
    TITLE "Faith Interlude"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 01 13:07:72
  TRACK 05 AUDIO
    TITLE "Them Changes"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 01 15:20:45
  TRACK 06 AUDIO
    TITLE "Free Form Funkafide Filth"
    PERFORMER "Carlos Santana & Buddy Miles"
    INDEX 00 21:10:43
    INDEX 01 21:12:07
Title: Splitting large flac+cue into mutiple flac files
Post by: Synthetic Soul on 2007-07-28 06:47:19
1.  Reread this thread.  Also take a look at the wiki (http://wiki.hydrogenaudio.org/index.php?title=Cuesheet#Splitting).  foobar is the easiest, but as greynol points out in this thread you may lose HTOA tracks if you have any.  I can't think of an easy way to know without looking at all your cuesheets individually - you need to see whether TRACK 01 INDEX 01 is more than two seconds into the audio (see example below, and wiki) - in which case TRACK 01 INDEX 00 has some audio data, which you may want.  ACDIR can prepend that data onto track 1, or as greynol suggests you can create a new cuesheet that sets TRACK 01 INDEX 00 as TRACK 01 INDEX 01, TRACK 02 INDEX 01 as TRACK 03 INDEX 01, etc.

Edit: I have used this technique before, and just created a secondary small cuesheet with two tracks - the first being the HTOA track, and the second being all the  other tracks.  E.g.:

Code: [Select]
PERFORMER "Bloc Party"
TITLE "Silent Alarm"
FILE "Bloc Party - Silent Alarm.flac" WAVE
TRACK 01 AUDIO
   TITLE "Like Eating Glass"
   PERFORMER "Bloc Party"
   INDEX 00 00:00:00
   INDEX 01 03:22:70
TRACK 02 AUDIO
   TITLE "Helicopter"
   PERFORMER "Bloc Party"
   INDEX 00 07:42:69
   INDEX 01 07:44:69
...

... to:

Code: [Select]
PERFORMER "Bloc Party"
TITLE "Silent Alarm"
FILE "Bloc Party - Silent Alarm.flac" WAVE
TRACK 01 AUDIO
   TITLE "HTOA Track"
   PERFORMER "Bloc Party"
   INDEX 01 00:00:00
TRACK 02 AUDIO
   TITLE "All Other Tracks"
   PERFORMER "Bloc Party"
   INDEX 01 03:22:70

2.  Having crappy tags won't affect the integrity of the audio data.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-30 00:29:44
Ohhhh.... good, I thought I was getting yelled at for not reading this thread thoroughly enough. I just got hijacked : -)

I just realized (397 albums later) that my cue files aren't even in the proper format (didn't preserve index 0 at all... and I thought that I researched this to death), so the cue files are all screwed up anyway. So I am pretty sure that I won't be harmed at all by just reencoding everything through foobar. Really sucks that I just tainted 397 albums because I messed up a cuesheet setting.... ugh. I guess that I will just do that from here on out. Real downer though. Here's a sample, in case you care.

REM GENRE Rock
REM DATE 2002
REM DISCID DB0BA20E
REM COMMENT ExactAudioCopy v0.95b2
PERFORMER "Nirvana"
TITLE "Nirvana"
REM REPLAYGAIN_ALBUM_GAIN -8.69 dB
REM REPLAYGAIN_ALBUM_PEAK 1.000000
FILE "Nirvana - Nirvana.flac" WAVE
  TRACK 01 AUDIO
    TITLE "You Know You're Right"
    REM REPLAYGAIN_TRACK_GAIN -8.84 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "About A Girl"
    REM REPLAYGAIN_TRACK_GAIN -8.53 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 03:38:02
  TRACK 03 AUDIO
    TITLE "Been A Son"
    REM REPLAYGAIN_TRACK_GAIN -10.59 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 06:27:15
  TRACK 04 AUDIO
    TITLE "Sliver"
    REM REPLAYGAIN_TRACK_GAIN -9.37 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 08:51:10
  TRACK 05 AUDIO
    TITLE "Smells Like Teen Spirit"
    REM REPLAYGAIN_TRACK_GAIN -8.86 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 11:05:12
  TRACK 06 AUDIO
    TITLE "Come As You Are"
    REM REPLAYGAIN_TRACK_GAIN -8.00 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 16:06:37
  TRACK 07 AUDIO
    TITLE "Lithium"
    REM REPLAYGAIN_TRACK_GAIN -8.61 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 19:45:40
  TRACK 08 AUDIO
    TITLE "In Bloom"
    REM REPLAYGAIN_TRACK_GAIN -8.26 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 24:02:52
  TRACK 09 AUDIO
    TITLE "Heart-Shaped Box"
    REM REPLAYGAIN_TRACK_GAIN -9.33 dB
    REM REPLAYGAIN_TRACK_PEAK 0.999084
    INDEX 01 28:17:50
  TRACK 10 AUDIO
    TITLE "Pennyroyal Tea"
    REM REPLAYGAIN_TRACK_GAIN -7.48 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 33:00:10
  TRACK 11 AUDIO
    TITLE "Rape Me"
    REM REPLAYGAIN_TRACK_GAIN -8.27 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 36:37:60
  TRACK 12 AUDIO
    TITLE "Dumb"
    REM REPLAYGAIN_TRACK_GAIN -7.41 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 39:29:10
  TRACK 13 AUDIO
    TITLE "All Apologies"
    REM REPLAYGAIN_TRACK_GAIN -7.97 dB
    REM REPLAYGAIN_TRACK_PEAK 1.000000
    INDEX 01 42:03:40
  TRACK 14 AUDIO
    TITLE "The Man Who Sold The World"
    REM REPLAYGAIN_TRACK_GAIN -7.21 dB
    REM REPLAYGAIN_TRACK_PEAK 0.999878
    INDEX 01 45:51:37


:-(
Title: Splitting large flac+cue into mutiple flac files
Post by: Synthetic Soul on 2007-07-30 08:01:58
I just realized (397 albums later) that my cue files aren't even in the proper format (didn't preserve index 0 at all... and I thought that I researched this to death), so the cue files are all screwed up anyway.
Have you checked many cuesheets?  IIRC there is no way that you could ignore INDEX 00 entries, not all cuesheets have them.  It may be worth checking a few more.

I could be hideously wrong of course, but I can't yet think how you would have specified not to include them; unless the component that wrote your RG info removed them?
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-30 15:20:43
I believe that there is a setting in EAC for 'compatible/noncompatible' (etc) cuesheets. I don't know if anyone else has come across this, but I apparently chose the wrong option. Argh.
Title: Splitting large flac+cue into mutiple flac files
Post by: Synthetic Soul on 2007-07-30 16:03:37
You can produce non-compliant cuesheets with EAC, but only for multi-track ripping.

I still suggest that you examine a few more.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-30 17:06:16
Ok, I will grep that in linux when I get home.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 00:15:05
Argh... sorry, I keep trying to outsmart you, and you keep shooting me down. I thought that INDEX 00's are always in those files. It turned out that I looked at like 5 of my old files with no 00 index, and 5 new files with it, and assumed that all of my old ones were wrong because none had INDEX 00 in them. Just probability working against me, I guess. I will keep you posted with any questions once I reencode all of my old files with the offset flag. Thanks for everything.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 05:51:48
I made a special version of CUE Tools that can ignore the extra samples at the end so you don't have to fix all the files before converting the cuesheets.  See the CUE Tools thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=50113).
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 15:29:27
Thanks, but my computer at home is working as we speak : -) it should be almost done by the time I get back (just finished the F's last night)

Once those are done, however, does cue tools conversion method save pregaps? (Between index 00 and 01 on track 1?) Or is there no good way to automatically retain pregap information?
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 18:17:26
The cuesheets it produces are the same as what EAC produces, that is, it is only possible to keep the audio for index 0 on track 1 for the "single file" or "gaps prepended" ("corrected" as EAC calls it) styles.  For "gaps appended" ("noncompliant") and of course for "gaps left out", index 0 of track 1 is written to the cuesheet as "PREGAP" which indicates that silence should be inserted at that area.

So, if you convert between "single file" and "gaps prepended", this audio will be preserved, otherwise it is discarded.

It would be possible to keep index 0 track 1 audio in a separate file for the "gaps appended" style.  For example, right now EAC and CUE Tools write "gaps appended" cuesheets like this:

Code: [Select]
FILE "01-McFly-5_Colours_In_Her_Hair.flac" WAVE
  TRACK 01 AUDIO
    PREGAP 02:22:07
    INDEX 01 00:00:00


But they could be written as:

Code: [Select]
FILE "01-McFly-(Hidden_Track).flac" WAVE
  TRACK 01 AUDIO
    INDEX 00 00:00:00
FILE "01-McFly-5_Colours_In_Her_Hair.flac" WAVE
    INDEX 01 00:00:00


CUE Tools is able to read cuesheets like this, but who knows if any other applications would be able to read this format.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 19:04:42
So essentially, if you use CUE Tools to split the files up, you will end up with all the data there, but you don't know if anything can play the cuesheet directly. If I am only worried about playing the the .flac file itself, as opposed to the .flac file through the cuesheet, will that work for me in that case?

Also, there is no way for CUE Tools to automatically tag the files, is there? Because that would take literally DAYS to manually tag 400 albums. If that is true, I might have to unfortunately use foobar to convert my monolithic files to individual tracks, and just risk losing all of my pregap information... any input? Thanks guys, you have been a huge help.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 19:14:12
No... with the current versions of CUE Tools, you will lose index 0 track 1 if you split the files using the gaps appended style.  I only said it would be possible to keep all the data in this case, but CUE Tools currently cannot write cuesheets like this (it can read them though).

And unfortunately CUE Tools is not able to read or write tags.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 19:28:13
Ohhhhhhh, I thought you were saying that it HAD a prepend gaps option. My bad, that makes sense though. I think I am just going to try to find a sample file with a large pregap and futz with it until I can reliably hold onto that data. Thanks guys, and I will keep checking back if anyone has any additional suggestions.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 19:35:19
It does have a prepend gaps option but I'm not sure if you would want to use this.  It does preserve index 0 track 1 and it is well supported in programs that read cuesheets.  But the gaps are put at the beginning of every track.  For example if there is a 2 second gap between track 6 and 7, the gap would be put at the beginning of track 7.  Usually though the gap is either silence or part of the end of track 6, so it IMHO it doesn't sound good to put it at the beginning of the file for track 7.  This is why people prefer to use the gaps appended (noncompliant) style cuesheets.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-31 19:37:57
...not to mention this doesn't mimmic the way a cd player works when you skip to track 7.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 19:47:10
X-o
I am now officially at a loss as to what to do... I'll be busy rereading the thread a few times now. I thought this might make sense once I re-encoded those files with the offset, but no such luck yet... the prepending argument does make sense though, I just have to figure out how I am going to implement this split.

edit:
Basically, everything would work fine with foobar except for the fact that the first gap won't be preserved... I don't know why I am posting this, mostly just thinking to myself.

edit2:
Stop me if this sounds like a bad idea, but I think that I am going to start out by simply converting everything that doesn't have index 00 entries in them just by giving them to foobar2000 as is... that will drastically reduce my list of files that I have to mess with pregaps for. I will figure out the rest as them come... feel free to let me know about any more cool tips/tricks for this though, I will be checking the post. Thanks everyone!
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 20:20:30
Stop me if this sounds like a bad idea, but I think that I am going to start out by simply converting everything that doesn't have index 00 entries in them just by giving them to foobar2000 as is... that will drastically reduce my list of files that I have to mess with pregaps for. I will figure out the rest as them come... feel free to let me know about any more cool tips/tricks for this though, I will be checking the post. Thanks everyone!

Sounds good to me.  CDs with index 0 track 1 are rare so I don't worry about it much.  Out of my 79 CDs, only 4 have this.  2 of those are just completely silent during index 0, so only the other 2 actually contain hidden audio data.

I think the idea of the noncompliant noncompliant () cuesheets for these rare cases seems pretty good, I will see about adding support for writing these to the next version of CUE Tools.

EDIT:  @greynol, I see you mentioned this type of cuesheet a while back.  Have you tested reading them in Burrrn, EAC, or anything else?
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-31 20:33:27
Usually the index before the first track [...] is just digital silence (null samples) and can be preserved with a simple pregap line in the cue sheet.

Indeed. Just split everything with gaps appended, which will probably be correct 99.99% of the time. It's easier to deal with the other 0.01% later.

You can use foobar, but it's not going to generate a new cue sheet which holds the PREGAP...
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 20:41:54

Usually the index before the first track [...] is just digital silence (null samples) and can be preserved with a simple pregap line in the cue sheet.

Indeed. Just split everything with gaps appended, which will probably be correct 99.99% of the time. It's easier to deal with the other 0.01% later.

You can use foobar, but it's not going to generate a new cue sheet which holds the PREGAP...


So if I don't use foobar, CUE Tools is my only option? I would use it but it is going to be a royal headache to have to redo all of those tags! Maybe do the conversion in foobar AND CUE Tools, and just use the cuesheet from CUE Tools?
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-31 20:53:23


Usually the index before the first track [...] is just digital silence (null samples) and can be preserved with a simple pregap line in the cue sheet.

Indeed. Just split everything with gaps appended, which will probably be correct 99.99% of the time. It's easier to deal with the other 0.01% later.

You can use foobar, but it's not going to generate a new cue sheet which holds the PREGAP...


So if I don't use foobar, CUE Tools is my only option? I would use it but it is going to be a royal headache to have to redo all of those tags! Maybe do the conversion in foobar AND CUE Tools, and just use the cuesheet from CUE Tools?


Im sorry, I forgot about one thing... the silence will still actually exist in the audio, as split by either foobar or CUE Tools it seems. So having the PREGAP in the cue wouldn't be sufficient ; that gap would also have to be removed from track one's audio.



One big question is - after your tracks are split, do you still need a cue sheet?
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 21:06:10
Pfffff....... I've got nothing now.......

There's no way to create a CD from flac files if I were to get rid of the cue file, at least to my knowledge... so unless there is another way, yeah, I would need the cuesheet.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 21:15:25
Im sorry, I forgot about one thing... the silence will still actually exist in the audio, as split by either foobar or CUE Tools it seems. So having the PREGAP in the cue wouldn't be sufficient ; that gap would also have to be removed from track one's audio.

Are you saying that if you used CUE Tools with gaps appended option or foobar2000 to split, hidden audio before track 1 would remain in the output audio?  This is not true with CUE Tools, it does remove that audio, and I'm pretty sure foobar2000 does as well (at least when I play a cuesheet with HTOA it skips that part, I assume the same thing would happen when writing to separate files).
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 22:07:31
edit:see below. Too many fast replies : -0
Title: Splitting large flac+cue into mutiple flac files
Post by: Cosmo on 2007-07-31 22:08:17
Are you saying that if you used CUE Tools with gaps appended option or foobar2000 to split, hidden audio before track 1 would remain in the output audio?

Yeah, somehow thats what I was thinking. Sorry! Thanks for the quick correction!

Yeah, so it seems good enough to use foobar to convert the audio and CUE tools to convert the cue.
At least EAC would support such a cue, if nothing else.

The albums that have actual non-null audio in the track one pregap will need special handling...
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 22:13:58
So, unless anyone objects, here is my final procedure for everything but the index 00 cuesheets: using foobar, I will convert all of my monolithic files to track-by-track files. I will then load that cuesheet into CUE Tools to get the cuesheet for those albums. I will figure out the index 00 files as I get to them. This should work... right?
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-07-31 22:18:39
@TheSpeedoBeast: Sounds fine, you would just have to make sure the filenames that CUE Tools writes in the cuesheet match up with the files that foobar2000 produces.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-07-31 22:20:16
Yeah, I figure if I ever need to burn a CD from the Cuesheet, the data will be there, all I will have to do is change the generic names (00.flac, etc) to the actual names (01 - filename.flac) at that time instead of having to do all 400 of those manually.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-07-31 23:02:17
I think the idea of the noncompliant noncompliant () cuesheets for these rare cases seems pretty good, I will see about adding support for writing these to the next version of CUE Tools.

EDIT:  @greynol, I see you mentioned this type of cuesheet a while back.  Have you tested reading them in Burrrn, EAC, or anything else?

Yeah, I refer to them as modified noncompliant: a hybrid of the individual indices and noncompliant cues.  EAC (the only program I use to burn audio) has no trouble with them.  I'd be surprised if Burrrn couldn't use them.

Hybrid cues can be pretty useful.  In order to do some recent testing, I decided to create a two-file image cue where the first file was the first track with which I had two different versions (and two different cues to reference each).  Anyway, I had to learn how to use the munge command so that I could shift all the timing back.  I started with a single-file image cue which had at least 40 different indices and there was no way I was going to change them all by hand.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-08-01 16:25:31
Is there any way to script CUE Tools to do, say, an entire directory of flac files instead of having to do all 400 individually? Just let me know. Thanks.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-01 16:33:38
Not now, but let me think if there is something quick I could change to allow it.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-01 17:36:09
What is the folder structure going to look like for the input and output CUEs?  For example:

In: E:\FLACs\Artist-Album\SomeName.cue
Out: E:\FLACsSplit\Artist-Album\SomeName.cue

What is yours going to look like?
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-08-01 17:40:06
I am almost sure that it is as such:
In: /          (all the cues+flacs are in one folder)
Out: /Artist/Album
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-02 00:52:08
I spent a while today making the way the output path is generated a lot more flexible.  It can now be created using a custom format, you could do something like:

C:\NewCUEs\%D\%C\%D - %C.cue

And CUE Tools would replace %C with the artist (from the PERFORMER tag in the input cuesheet), %D with the album title.  So it would generate something like this for you:

C:\NewCUEs\Opeth\Blackwater Park\Opeth - Blackwater Park.cue

Also, you are able to use parts of the original directory and filename if you want.  I'll describe that later when I release it.

Now I just have to build in some kind of batch mode, I don't think that will take too long if I keep it simple.  I'll try to get it released sometime (late) tonight.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-02 05:08:49
EDIT: Link removed, 1.9.0 has been released.

Select "Use custom format" and put:

Code: [Select]
%1:-1\%D\%C\%F.cue


A brief explanation of what this means:  %a:b where a and b are numbers means to use a range of elements from the original directory name.  For example, if the original cuesheet is in E:\Stuff\CUEs, element 1 is E:, 2 is Stuff, and 3 is CUEs.  Negative numbers start from the end, so -1 is CUEs, -2 is Stuff, and -3 is E:.  So %1:-1 means the first through the last.  I think I should make %0 a shorthand for that.  Anyway, the rest is pretty simple:  %D is artist, %C is album, and %F is the original cuesheet filename without extension.  So, in the same folder as your original cuesheets, CUE Tools will create a subfolder for each artist, another inside those for each album, and use the same filename as the original cuesheet.

Change any other settings how you want them (I guess "Create CUE sheet only (no audio files)", Gaps appended, and then however you want the audio filenames inside the cuesheet).  Then click "Batch..." and select your folder, and let it do it's thing.
Title: Splitting large flac+cue into mutiple flac files
Post by: TheSpeedoBeast on 2007-08-02 13:37:04
Wow, you are a stud! I will let you know how it works! I never expected to get this kind of support. Thanks a lot though, that's very generous of you.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-02 16:59:50
No problem.  I should mention that the remove special characters and spaces to underscores settings also apply to %D and %C in the folder names so you can uncheck those depending on how you want the folders named.
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-04 04:16:36
I've added a few more features.  The first is a tool to correct the filenames within cuesheets based on the audio files present in the same folder.  I've already written an explanation so I'll just copy/paste it:

Quote
Drop CUE sheets here to correct the audio filenames contained inside. The audio files must be located in the same folder as the CUE sheet. The number of audio files in that folder must match the number of files referenced by the CUE sheet. The audio files must be named such that when sorted they are in order by track number.

The second feature is the option to preserve the HTOA (track 1 index 0) when converting to non-compliant (gaps appended) cuesheets.  If present, the HTOA is written out to a separate file and referenced in the cuesheet instead of using a PREGAP line.

Both features are done and completely tested, I just have to do some work on the GUI before I can release it.
Title: Splitting large flac+cue into mutiple flac files
Post by: greynol on 2007-08-04 04:36:48
 

You're on a roll!!!

Are you checking the HTOA track to see that it contains non-null samples?
Title: Splitting large flac+cue into mutiple flac files
Post by: Moitah on 2007-08-04 04:53:49
No, right now it always writes the file.  But I'll think about doing that.

EDIT:  CUE Tools 1.9.0 has been released.