Help - Search - Members - Calendar
Full Version: How to batch encode several Wav+Cuesheets?
Hydrogenaudio Forums > Lossless Audio Compression > WavPack
Yamou
Sorry if I am repeating some one else's question; if so, please direct me to thread. I have a bunch of wav cd images with cue sheets and status reports, all in the same folder with wavpack files. Is there a way - with additional "tag-ware" or something - to automate the compression of the wav files with embedded cuesheets?

All files (wav,cue) are identically named --> Made In Japan (disc 1).wav and Made In Japan (disc 1).cue
So far the only options have been for me to:
- batch encode all the .wav files to wavpack and then embed the cue sheets one by one in Foobar2000, or
- keep one .wav file and its related .cue file in Wavpack.exe's working directory; then remove the resulting compressed file (w/ embedded cue sheet) and the actual remaining cue sheet; and so forth for each album

Is there a simpler way so that I do not have to do this manually for each album? I'd appreciate if anyone could help.

Merci d'avance.


Note: I have been following this forum for a couple of years now as a guest and finally decided to join so I could ask questions. With enough info, I could play around with scripts or whatever solution might enable me to do this.
bryant
Hmm, I don't think there's a real easy way to do that. The command to do one album would be:

> wavpack "Made In Japan (disc 1).wav" -w "CUESHEET=@Made In Japan (disc 1).cue"

So you could create a batch file to do several, but you'd have to enter the names for each one.

Someone more experienced with batch files would probably be able to create a batch file that was smart enough to do this automatically (with "for / each" or whatever it is).

Right now you can use a wildcard in the name of the cue file, but it only works if there's only one match. Maybe it would be nice (and intuitive) if it would also work if there were many matches but one of the matches was the same name as the input file. Then you could do a whole folder of these with one command; I think about that as a feature.

In the meantime, sorry I couldn't help more. sad.gif

David
Egor
Use this script to encode your files:
CODE
set encoder="E:\audio\wavpack\wavpack.exe"
for /r "." %%d in (.) do (cd %%d & for %%f in (*.wav) do %encoder% "%%f" -w "CUESHEET=@%%~nf.cue" )

Copy contents to a text file, change the path to wavpack.exe and save it as "encode.cmd" to the folder with your wav files to encode, run by simply double-clicking. The script will look in the base and all subfolders recursively and encode all wav files with corresponding cuesheets.
Yamou
Thanks Egor,

It seems to work well so far with the three I have tried.

Thanks a ton!
Yamou
Just a note to say that so far, I have been encoding over 100 wav+embedded cue files using the .cmd file recommended by Egor. It works perfectly well; the only thing that has happened occasionally is a "wavpack and encountered an error and needs to close..." popup window when the .cue file is missing. But the command just moves on to the next file in the and the process continues just fine.

So thanks again, Egor. I thought I would add this positive feedback in case other users may be thinking about the same or similar situation.
dv1989
I usually keep all of my image files in the same folder and do something along the lines of

CODE
ren *.cue *.wav.cue
for %1 in (*.wav) do wavpack -hmw "CUESHEET=@%1.cue" %1


I think it works quite well, although Egor has obviously found a slightly similar way through a better knowledge of batch scripting!
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.