[vorbis] Newbie here/batch encoding

Craig Dickson crdic at yahoo.com
Mon Aug 20 10:22:45 PDT 2001



Joe Sweeney wrote:

> ----- Original Message -----
> From: Jernej Simonèiè <jernej.simoncic at guest.arnes.si>
> To: Joe Sweeney <vorbis at xiph.org>
> Sent: Sunday, August 19, 2001 2:19 PM
> Subject: Re: [vorbis] Newbie here/batch encoding
> 
>  for %f in (*.ogg) do oggenc [options] %f
> 
>  BTW: if you want to use this in batch files, use this syntax:
> 
>  for %%f in (*.ogg) do oggenc [options] %%f
> 
>  And of course, replace [options] with your options.
> 
> -------------
> 
> Sorry to be so dense, Jernej. Would you mind dumbing this down for me a bit?
> I don't understand what %f is.

This is MS-DOS batch language. %f or %%f is a variable in the MS-DOS
shell.

Basically, what's going on here is that oggenc, since it was originally
a Unix program, does not understand wildcard filenames. On Unix, if you
say "oggenc *.wav", the Unix shell expands *.wav into a list of all the
.wav files in the current directory. MS-DOS doesn't do this, so MS-DOS
programs usually have their own code to parse *.wav and turn it into a
list of files.

But if, instead of "oggenc *.wav", you say "for %f in (*.wav) do oggenc %f",
that tells the MS-DOS shell to run oggenc once for each .wav file.

Example. Let's say you have three .wav files, a.wav, b.wav, c.wav. On
Unix, the command "oggenc *.wav" will be expanded to "oggenc a.wav b.wav
c.wav", so a single run of oggenc will encode all three files. On
MS-DOS, "for %f in (*.wav) do oggenc %f" will result in three executions
of oggenc, as follows: "oggenc a.wav", "oggenc b.wav", "oggenc c.wav".
Either way, you get all three .wav files encoded to .ogg, so the
difference isn't significant.

Craig

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list