Help - Search - Members - Calendar
Full Version: FLAC with embedded cuesheet
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
Pages: 1, 2, 3
VCSkier
the part i edited in eac-wv.bat now reads
CODE
SET pathToWavPack=C:\WINDOWS\system32\WAVPACK.EXE
SET pathToTag=C:\WINDOWS\system32\TAG.EXE
REM =====================================================
REM  PLEASE EDIT THE PATHS TO THE STORAGE FOLDER
REM  NB: If you paths below contain spaces do *not*
REM      surround the path in quotes
REM =====================================================
SET rootFolder=C:\

eac-wv.bat, eac-wvp, tag.exe, and wavpack.exe are all in C:\WINDOWS\system32

"program, including path, used for compression" in eac's external compression options is "C:\WINDOWS\system32\cmd.exe"

and the additional command line options are
CODE
/c "C:\WINDOWS\system32\eac-wv.bat" %o %s %d "%a" "%g" "%m" "%y"


and still the incorrect syntax message. any other suggestions?
Synthetic Soul
QUOTE(VCSkier @ Mar 25 2005, 11:42 PM)
my command line is now
CODE
/c "C:\WINDOWS\system32\eac-wv.bat" %o %s %d "%a" "%g" "%m" "%y"
both tag.exe and wavpack.exe are in "c:\program files\exact audio copy." should these be moved to system32 also?  in eac-wv.bat, the paths to both of these are in qoutes, beacuse there are spaces in the path.  is that right?

also, does it matter where i tell eac to save the image and cuesheet?  because your batch file moves it anyway, right?

anyways, thanks for the help

Remove the quotes from "C:\WINDOWS\system32\eac-wv.bat". For some reason quoting a path that doesn't need quotes caused me problems while testing (I don't know what EAC is doing with this string).

You shouldn't need to put TAG and MAC in system32 - but then again it won't hurt, and it does mean you can easily call them from any folder for manual use.

No, it doesn't matter where you save the image - all references in the script to the files are dynamic, so paths don't matter. You don't need to call it CDImage either (at least theoretically).

QUOTE(VCSkier @ Mar 26 2005, 12:49 AM)
the part i edited in eac-wv.bat now reads
CODE
SET pathToWavPack=C:\WINDOWS\system32\WAVPACK.EXE
SET pathToTag=C:\WINDOWS\system32\TAG.EXE
REM =====================================================
REM  PLEASE EDIT THE PATHS TO THE STORAGE FOLDER
REM  NB: If you paths below contain spaces do *not*
REM      surround the path in quotes
REM =====================================================
SET rootFolder=C:\

eac-wv.bat, eac-wvp, tag.exe, and wavpack.exe are all in C:\WINDOWS\system32

"program, including path, used for compression" in eac's external compression options is "C:\WINDOWS\system32\cmd.exe"

and the additional command line options are
CODE
/c "C:\WINDOWS\system32\eac-wv.bat" %o %s %d "%a" "%g" "%m" "%y"


and still the incorrect syntax message.  any other suggestions?

I think (hope) tha if you remove the quotes from your command line you should be there.

CODE
/c C:\WINDOWS\system32\eac-wv.bat %o %s %d "%a" "%g" "%m" "%y"


Try also using:

CODE
SET rootFolder=C:


not

CODE
SET rootFolder=C:\
VCSkier
thanks a million synthetic soul! it works perfectly now. i apprecieate all this work youve done so much. thanks
Synthetic Soul
Ah! Good news. smile.gif

I can get these things to work fine on my PC - but trying to ensure they work in any setup seems very difficult. It's very dificult to work out where the problems are occurring between EAC and CMD really - and debugging seems to not follow a logical path.

Putting everything in system32 is definately the safest option - and as I say, it has other benefits for TAG and WAVPACK also.

Let me know how you get on.

FYI: this is how my eac-enc.bat is setup to run on my PC:

CODE
SET pathToMac="C:\Program Files\Monkey's Audio\MAC.EXE"
SET pathToTag="C:\DOS\TAG.EXE"
SET pathToPar2="C:\DOS\PAR2.EXE"
REM =====================================================
REM  PLEASE EDIT THE PATHS TO THE STORAGE FOLDERS
REM  NB: if you paths below contain spaces do *not*
REM      surround the path in quotes
REM =====================================================
SET apeFolder=E:\CDBackup\APE
SET csvLogFolder=E:\CDBackup\Log

CODE
/c C:\dos\eac-enc.bat %o  %s  %d  "%a"  "%g" %hHIGH%h %lLOW%l 28
VCSkier
yeah, it works great now. my root folder is now E:\Music, and i removed the quotes from my command line in eac. now it reads
CODE
/c C:\WINDOWS\system32\eac-wv.bat %o %s %d "%a" "%g" "%m" "%y"

i did notice tho, that if there are other random files in the root folder, all of them are moved into the artist\album directory. this is not a problem now that i have my new, and final setup w/ a dedicated hdd for music, but rather just something i noticed during testing.

anyways, thanks again. i love my new setup. biggrin.gif
VCSkier
one quick question, if i decide to convert these files to flac, monkey's audio, la, or optimfrog, what would the result be? im guessing for flac the embedded cue sheet would be lost, but what about monkey's, la, or optimfrog? they support ape tags, right? also, im guessing the external cue sheets would no longer work for any of them, but what would i have to do the make the external cue sheets work w/ the new files?

btw, converting to flac would only be for compatibility reasons, and the others would be if hdd space ever becomes an issue for me again. for now, i couldn't be happier with wavpack. its truly the best for me. cool.gif
Synthetic Soul
QUOTE(VCSkier @ Mar 27 2005, 05:51 PM)
i did notice tho, that if there are other random files in the root folder, all of them are moved into the artist\album directory.  this is not a problem now that i have my new, and final setup w/ a dedicated hdd for music, but rather just something i noticed during testing.

Yeah, this is by design. The idea is that you run it like you do, creating the initial image and cue in their own specific folder. I guess I could change it to move just certain files, but it's a lot easier to just move the whole lot. I work in E:\CDBackup, and then the script moves everything to E:\CDBackup\Ape - so basically E:\CDBackup (and any subfolders) is purely for my backup system.

QUOTE(VCSkier @ Mar 28 2005, 03:27 AM)
one quick question, if i decide to convert these files to flac, monkey's audio, la, or optimfrog, what would the result  be?  im guessing for flac the embedded cue sheet would be lost, but what about monkey's, la, or optimfrog?  they support ape tags, right?  also, im guessing the external cue sheets would no longer work for any of them, but what would i have to do the make the external cue sheets work w/ the new files?

I assume you are talking about using Foobar for this (if not you will lose any tags). I would expect that Foobar will retain all tags... but I've never tried it. Give it a go and let us know. Even FLAC should retain the CUESHEET APEv2 tag as a VORBIS tag (but not a FLAC meta block). This is Foobar being clever, not the encoders.

Editing the cuesheet is a piece of cake. You can edit a cuesheet in Notepad. Very near the top you should see a line like:

CODE
FILE "CDImage.wv" WAVE

Just change that to point to CDImage.flac, CDImage.ape, CDImage.la, etc.
VCSkier
cool, thanks. and yes, i use foobar2000.
VCSkier
ok, i have a badly scratched cd that i wont be able to get a perfect rip on. i want to use deglitch to fix some errors in it, but i then want it archived like all of my other cd's. can i still use your batch files to do this? i was thinking maybe after the standard process is completed, decoding the wavpack image to wav w/ foobar2000, running deglitch, and then encoding back to the wavpack image, again using foobar2000. would that retain the embedded cue sheet and everything? if not, is there a better way to do this?

edit: better yet, is there a way to just encode to a wav image using the standard wav image procedure in eac, and later process the image w/ your batch file to embed the cue sheet and whatnot?
Synthetic Soul
QUOTE(VCSkier @ Apr 5 2005, 08:22 PM)
ok, i have a badly scratched cd that i wont be able to get a perfect rip on.  i want to use deglitch to fix some errors in it, but i then want it archived like all of my other cd's.  can i still use your batch files to do this?  i was thinking maybe after the standard process is completed, decoding the wavpack image to wav w/ foobar2000, running deglitch, and then encoding back to the wavpack image, again using foobar2000.  would that retain the embedded cue sheet and everything?  if not, is there a better way to do this?

You would lose the tags doing it this way.

QUOTE(VCSkier @ Apr 5 2005, 08:22 PM)
edit:  better yet, is there a way to just encode to a wav image using the standard wav image procedure in eac, and later process the image w/ your batch file to embed the cue sheet and whatnot?

I guess one way would be to call eac-wv.bat from the command line manually, so you would have a command line something like:

CODE
eac-wv.bat "CDImage.wav" "E:\Music\CDImage.wav" "E:\Music\CDImage.wv.wv" "<artist>" "<album>" "<genre>" "<year>"
  1. Make sure your WAVE file has the path "E:\Music\CDImage.wav".
  2. You will need a dummy log file with the path "E:\Music\<album>.log" (if the album name contains illegal filename characters replace them with spaces). Alternatively change the line IF NOT EXIST "%~dp3%logFilename%" GOTO WaitForLogFile in eac-wvp.bat to REM IF NOT EXIST "%~dp3%logFilename%" GOTO WaitForLogFile temporarily
I think this should work. Never tried it. Probably should have.
VCSkier
QUOTE(Synthetic Soul @ Apr 5 2005, 05:07 PM)
You will need a dummy log file with the path "E:\Music\<album>.log" (if the album name contains illegal filename characters replace them with spaces).
*


can this be the real log file from the eac creation of the cd image, and then will that real log file be included in the output?
Synthetic Soul
QUOTE(VCSkier @ Apr 6 2005, 02:19 AM)
can this be the real log file from the eac creation of the cd image, and then will that real log file be included in the output?

Yeah, that would be good.

As long as this:

eac-wv.bat "CDImage.wav" "E:\Music\CDImage.wav" "E:\Music\CDImage.wv.wv" "<artist>" "<album>" "<genre>" "<year>"

... is the same as this:

"E:\Music\<album>.log"

... (considering illegal characters are replaced by a space) it will all work as it normally does.


Synthetic Soul
Oh, another thing:

The batch files will expect the CUE to be called CDImage.wv.cue, not CDImage.cue.

After you create your WAVE + CUE in EAC I would do the following:
  • Open CDImage.cue in Notepad
  • Amend the line that points to CDImage.wav to point to CDImage.wv
  • Save the new cue as CDImage.wv.cue
VCSkier
hmmm.... im considering the practicality of keeping the original, external cue sheets. i really like the embedded sheets, but dont really see any real purpose for keeping the original, external ones, considering i just use foobar2k. am i wrong? is there some purpose for keeping it?

in one aspect, it is nice to not have it, because when i send a whole directory to fb2k, i have duplicates of everything... not a big problem, but i was just thinking about it. is that something that i could easily change in the batch file, so that after it embeds the cue sheet, it would delete the external one? ive been looking at your batch files alittle, and its pretty intersting... im trying to learn. smile.gif
Synthetic Soul
I back my archives up on DVD. I decided that 30K of cuesheet isn't going to make a big dent in my disc space, so that's why I just keep it all. I still like to embed the cuesheet as then the only file that really matters to me is my APE (your WV) file. Keeping the external cuesheet means that I can easily (without having to retrieve it) use my CUE+APE to burn to CD in EAC.

If you don't want the cuesheet, or if you want to be selective about the files that get moved to the <artist>\<album> folder you have two main choices - both involve editing eac-wvp.bat (as I expect you are now aware, after your investigation).

The line that needs to change is:

CODE
MOVE "%~dp3*.*" "%rootFolder%\%artistFolder%\%albumFolder%" >NUL


If you want to be selective about the files you move you could do something like:

CODE
REM Move .wv file(s)
MOVE "%~dp3*.wv" "%rootFolder%\%artistFolder%\%albumFolder%" >NUL
REM move .log file(s)
MOVE "%~dp3*.log" "%rootFolder%\%artistFolder%\%albumFolder%" >NUL


I.e.: have a line per file extension.

An alternative is to still let the script move everything, but delete the cuesheet first:

CODE
REM Delete cuesheet
DEL "%~dp3%~n1.cue"
REM Move all remaining files
MOVE "%~dp3*.*" "%rootFolder%\%artistFolder%\%albumFolder%" >NUL


I'm not sure if you are using the version that uses TAG to embed the logfile (I stupidly forgot to update the version number on the script) - but if you are you could delete that also:

CODE
REM Delete cuesheet
DEL "%~dp3%~n1.cue"
REM Delete EAC log file
DEL "%~dp3%logFilename%"
REM Move all remaining files
MOVE "%~dp3*.*" "%rootFolder%\%artistFolder%\%albumFolder%" >NUL
VCSkier
hey, thanks for the info. i had forgotten about ripping... duh. for ease of ripping to cd's, i think im going to leave the external cue sheets for now, but its good to know how to stop making them if i ever change my mind (if burrrn or eac's burner start supporting embedded cue sheets). thanks again
Synthetic Soul
QUOTE(VCSkier @ Apr 14 2005, 11:30 AM)
for ease of ripping to cd's, i think im going to leave the external cue sheets for now, but its good to know how to stop making them if i ever change my mind (if burrrn or eac's burner start supporting embedded cue sheets).  thanks again

There's little reason why not to keep them really. However, remember: you can always extract the cuesheet from the tag using the likes of Foobar or Tag.
VCSkier
QUOTE(Synthetic Soul @ Apr 5 2005, 05:07 PM)
I guess one way would be to call eac-wv.bat from the command line manually, so you would have a command line something like:

CODE
eac-wv.bat "CDImage.wav" "E:\Music\CDImage.wav" "E:\Music\CDImage.wv.wv" "<artist>" "<album>" "<genre>" "<year>"
[list=1]
[*]Make sure your WAVE file has the path "E:\Music\CDImage.wav".
[*]You will need a dummy log file with the path "E:\Music\<album>.log" (if the album name contains illegal filename characters replace them with spaces).
*



ok, i finally got around to doing this. as you might have seen from my other thread, i had to rip w/ my friends plextor and plextools. first i tried ripping to individual files, and then i decided to go w/ a whole image, because i wanted it to be uniform w/ the rest of my backups. ive followed your directions exactly. i renamed the plextools log file to <album>.log, renamed my image to cdimage.wav, and created a cue sheet w/ eac for a single wav file. i checked to make sure it plays the cdimage.wav correctly in fb2k. then i edited it, so it's file line reads:
CODE
FILE "CDImage.wv" WAVE

and saved it as CDImage.wv.cue

i then put all three files, CDImage.wav, CDImage.wv.cue, and <album>.log, in E:\Music, and ran your (synthetic soul's) batch files.

eac-wv.bat runs, but the compression window never comes up; the image is never compressed. the last line on eac-wv.bat reads "error in tag spec: Cuesheet=@E:\Music\CDImage.cue !"

eac-wvp.bat then opens, asks me to close EAC's completion dialogue then press any key. i press any key, then it lets me know that the log file exists, and then endlessly repeats "Waiting for "E:\Music\CDImage.wv.wv" to be renamed to "CDImage.wv"..."

im sure it is something i am doing wrong... sorry. thanks for being so patient with me though.
Synthetic Soul
No, I don't think it's you. I think this is due to this EAC .wv -> .wv.wv thing.

Please try:

CODE
eac-wv.bat "CDImage.wv.wav" "E:\Music\CDImage.wav" "E:\Music\CDImage.wv.wv" "<artist>" "<album>" "<genre>" "<year>"


(eac-wv.bat "CDImage.wv.wav" ...)

It looks like it failed because WavPack was looking for "E:\Music\CDImage.cue". Because of this CDImage.wv.wv was not created, which caused the subsequent error.
VCSkier
thanks so much. it worked great
Synthetic Soul
QUOTE(VCSkier @ Apr 18 2005, 01:40 PM)
thanks so much.  it worked great

Cool.

BTW, I must thank you also, as your question prompted me to create my batch files EAC-ENC-GO.BAT & EAC-POST-GO.BAT which I now use to tap into my batch files EAC-ENC.BAT & EAC-POST.BAT "mid-process". It's working really well.

That's what I like about donating to a forum (or any form of conversation I suppose): it gets you thinking about things that you might not otherwise.
VCSkier
synthetic soul, what would be the easiest way to convert an individual track from one of my backed-up cd's to say, mp3? i generally use fb2k for my converting, but when i do that w/ an image and embedded cue sheet, i get an unusual output. it gives me a single file with an embedded cue sheet, causing the single file to display as several tracks in fb2k... i achieve this by loading one of the images w/ embedded cue sheets in fb2k, and then right clicking on the specific track i want to convert, and going to convert... what should i do differently?
Synthetic Soul
This is slightly annoying. It happens as Foobar copies all tags from the source to the destination file - including the unwanted CUESHEET tag.

All I would do is take the MP3 track(s) back into Foobar and remove the CUESHEET tag (Right-click > Properties... > click on CUESHEET tag in Metadata window > click Remove > click Update file button).

You've given me another idea though.

I could write a batch file that would use Tag to remove the CUESHEET tag from any file dropped onto it, or any files within a folder dropped onto it.

Would that be of any use to you?

I could upload it to my site with the rest.
VCSkier
QUOTE(Synthetic Soul @ Apr 22 2005, 05:39 AM)
You've given me another idea though.

I could write a batch file that would use Tag to remove the CUESHEET tag from any file dropped onto it, or any files within a folder dropped onto it.

Would that be of any use to you?
*


lol, yeah, that is really lazy on my part, but that would make things very convienent. smile.gif man, with your batch file writing skills, you think you could write one so i didn't have to go to classes anymore? any maybe boost my gpa a few points while youre at it. wink.gif
VCSkier
one more quick question, how do i make use of the md5 hashes in wavpack? i know they are used for verifying integrity of the files, but how do i do that?

edit: typo
Synthetic Soul
OK. Please download REMOVE-CUESHEET.BAT.

NB: I get around this by using LAME to do the tagging. I get LAME to do it as I like the "ID3v1 and only ID3v2 if required" ethos. However, the added benefit of this is that I only get the tags I specify.

Here's my LAME command for Diskwriter:

CODE
-V5 --athaa-sensitivity 1 --tn "%tracknumber%" --tt "%title%" --ta "%artist%"
--tl "%album%" --ty "%date%" --tc "-V5 --athaa-sensitivity 1" - %d


More details on my site.

I'm afraid I don't know anything about the WavPack MD5. Basically I think the idea is you would use a application to find the MD5 hash of your WAVE (either encoded or decoded) and compare it to the MD5 hash stored in WavPack to make sure they are equal (and therefore the data is the same).
florent
Neil (Synthetic Soul), thank you very much for your work (tag, batch files and guide) which could well be what I've been looking for.

I have made amendments to your batch files to fit my needs : addition of Genre and Year tags, done this myself before I found this topic (heh) and changed the directory structure to "Artist\Year - Album Title".

Now I am looking for a way to include Replaygain tagging before creating the PAR2 files, any idea on how this could be done ? I usually Replaygain my audio with foobar and have no idea how to do it through a command line batch file...

I'm also quite disturbed by the recent discussions on Wavpack. I thought I had settled for Flac, then your guide convinced me of turning to Ape, and now it seems you would rather use Wavpack ? Like you I'd like to build a backup of my collection, so I'm really interested in good compression ratio. Are you still using Ape or have you turned over to WV ?

Thanks once again for your great work !
Synthetic Soul
QUOTE(florent @ Apr 29 2005, 01:21 PM)
Neil (Synthetic Soul), thank you very much for your work (tag, batch files and guide) which could well be what I've been looking for.

I'm very glad they may be of use to other people.

QUOTE(florent @ Apr 29 2005, 01:21 PM)
Now I am looking for a way to include Replaygain tagging before creating the PAR2 files, any idea on how this could be done ? I usually Replaygain my audio with foobar and have no idea how to do it through a command line batch file...

The only suggestion I can make here is to point out that WavPack may soon have have its own replaygain console application (there was a response from bryant on this somewhere confirming, but I can't find it), and FLAC will let you store replaygain info also.

It wouldn't be much effort to change the scripts to use WavPack, FLAC, or any other encoder. You could probably simplify the scripts by using WavPack as you wouldn't need Tag (you could even reference the files I did for VCSkier). There's no definite date on WavPacks' RG tool though as far as I know.

QUOTE(florent @ Apr 29 2005, 01:21 PM)
I'm also quite disturbed by the recent discussions on Wavpack. I thought I had settled for Flac, then your guide convinced me of turning to Ape, and now it seems you would rather use Wavpack ? Like you I'd like to build a backup of my collection, so I'm really interested in good compression ratio. Are you still using Ape or have you turned over to WV ?

I am still using APE, but keeping a close watch on WavPack.

I think you should remember that your archive does not need to all be in the same format. If you decide on APE and then decide to switch to WavPack 200 CDs on, it really is no big deal. I should try to remember this also. wink.gif

I haven't made the switch to WavPack as I just don't really see a huge advantage at the moment. I really like the way (David) bryant does things, and WavPack has some very nice features, like self-tagging from files, but it's not enough to make me switch. I have a lot on my plate at the moment and my system is working very well for me - it is very little effort to back up a CD - so I've little inclination to make changes. If I suddenly get some free time I may investigate WavPack more, and adapt my scripts so they are all ready to use.

The only thing I want to change my backup process at the moment is a Plextor drive. I want one so bad. crying.gif

Edit: found the post by bryant.
VCSkier
ok, ive got a new question. if i wanted to transcode my images to a different codec byt keep them as images, or even just w/ different settings with wavpack (like -hxm instead of -hm), what would i need to do? the other day i converted my collection to .ape w/ foobar2000 just to see the size differences and the output was individual files for each song, with the embedded cue sheet, causing problems when i played them in fb2k. so is there a way to convert a wavpack image w/ embedded cue sheets and whatnot to another identical lossless image, while keeping all of the tags?

edit: typos and clarifications
Synthetic Soul
I don't really know of the best way to go about this.

I always use Foobar for transcoding - but I realise that the usual benefit of embedded cuesheet handling turns out to make problems in this situation.

I can think of two alternatives:

1. I'm sure I've read about people exporting the tags to a text file, transcoding (probably XXX > WAV > YYY) and then tagging from the text file.

2. dbPowerAmp. I don't use it - but I think it transcodes from one format to another, will retain tags, but won't be confused by the cuesheet tag.

Personally, I would probably remove the cuesheet tag, transcode in Foobar, then replace it.

There is also the possibility of using Foobar and choosing Convert > Run conversion, single file output. I would want to test the results of this, but it's likely it will work as required.
VILLA21
@synthetic-soul: Thanks for the guide, i've already ripped 100+ CDs. I just noticed that in EAC options -->Tools 'Do not open external compressor window' has to be unchecked, otherwise EAC only ripps the CD in wav. It's better to mention that in the guide to the EAC configuration section.
Cheers! smile.gif
Synthetic Soul
Thanks for the recognition, and suggestion.

FYI, I am actually using REACT now. I find it easier to maintain than the batch files, and it has other benefits like F10 to start the process, and auto-closing dialogues.
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.