From: llornkcor <[EMAIL PROTECTED]>
Subject: Re: Command Line Processing
On Wed, 20 Oct 1999, you wrote:
> From: "Chad E." <[EMAIL PROTECTED]>
> Subject: Command Line Processing
>
> Can someone please tell me what the best way/tool to use if I want to covert
> wav files to RealMedia audio. I would like to be able to script the process
> from VB or PERL, so a command line that will allow me to specify the source
> file and destination file location is needed.
>
> What is the best method of doing this?
Here's a way that I do it
#!/usr/bin/perl
if ($ARGV) {
$filename=$ARGV[0];
} else {
$filename = cwd();
}
if ($^O eq 'MSWin32') {
## if MSWin32 path to RMBatch.exe using MS correct dir slashes
## and quotes around dir names with spaces
$realProducer = "C\:\\\"Program Files\"\\Real\\RealProducerPlus\\RMBatch.exe";
}else {
$realProducer = '/usr/local/bin/realproducer';
}
my $tmpFilename = $filename;
if ($^O eq 'MSWin32') {
my $pat1="\/";
my $pat2 = "\\";
$tmpFilename =~s/$pat1/$pat2/g;
my @new = split /\./,$tmpFilename;
my $outFile = $new[0];
$temp = "$realProducer \/I $tmpFilename \/O
$outFile\.rm \/T 1 \/A 2 \/F 0";
} else {
my @new = split /\./,$filename;
my $outFile = $new[0];
$temp = "$realProducer \-i $filename \-o $outFile\.rm \-y
1 \-z 0 \-t 1 \-a 3 \-f 0 \-c 1999 \-g 5";
}
$SndCommand = $temp;
system("$temp");
LP
*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites.
If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:
unsubscribe realforum
or from another account, besides the address you subscribed with:
unsubscribe realforum <[EMAIL PROTECTED]>