Log in

View Full Version : How can i encode many files using command-line tool?


junglemike
31st May 2006, 18:04
Hellow fellas. I'm hoping anybody can help me.
I curretnly trying to compress an audio book (in wav format) to free speex audio compression codec. I've read the manual, found out the best settings for me, and can sucessfully compress a single file like that : speexenc.exe" -w --bitrate 12 --vbr -comp 6 input.wav output.spx
The problem is that audio book devided to hundreds small files , like part0015.wav, part0016.wav. etc, I was thinking to writing .bat file to do all this in one go, but it would require for me to type hundreds of pathnames of files.

I was wondering is there any easier way to do this?
TIA.

foxyshadis
31st May 2006, 18:19
You can use nt commands in the batch file:

for %%f in (*.wav) do speexenc.exe -w --bitrate 12 --vbr -comp 6 %%f %%~dpnf.spx

There's a lot of ways you can customize it, see:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

junglemike
1st June 2006, 18:01
thanks much for the reference. I'm alredy on it.

junglemike
17th June 2006, 22:49
Hey, Foxy, your advice was extremely helpful. I'm now using for command and it makes my life easier.
Maybe you could help me w/ relevant issue.
I want to know if there is a way to generating an .avs script for multiple .avi files. , considering files are of exact format, and scripts are all identical except for input filenames of course.
Is it possible?

foxyshadis
17th June 2006, 23:34
Try this:
http://forum.doom9.org/showthread.php?p=520674

It can be modified for multiple avis in one avs, if that's what you're looking for instead.

junglemike
17th June 2006, 23:40
You're DA MAN, as always :-)