On Sat, 2003-03-15 at 02:05, Paul Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Fri, Mar 14, 2003 at 09:38:23PM -0800, Jack Pistachio wrote:
> > Anyone know of a plugin to play *.wma files in xmms?
> > Or howabout a way to convert this proprietary madness to
> > ogg format?
>
> mencoder might be able to do it for you.
I made this script a few months ago to automatically convert a whole
bunch of wma files to ogg. I had problems with mencoder as well, so
instead it uses mplayer to play the file to a wav, and then encodes the
wav using oggenc. This was never really intended to leave my hard drive,
so the term "user friendly" is foreign to it. :) But being that it's 22
lines long, it should be easy enough to figure out. :) I'll put in some
comments on things that are likely to need to be changed:
-----encodeme.pl-----
#!/usr/bin/perl
#You should just run this from the directory where the files
#you want to convert are located. But you can also optionally
#just specify the path here.
opendir (ENCDIR, "./");
@dirlist = grep {/\.wma$/} readdir (ENCDIR);
closedir ENCDIR;
#These are just used for specifying the names to use when encoding
#to ogg. You can change them to whatever you want.
$album = "The Eminem Show";
$artist = "Eminem";
foreach (@dirlist) {
# These next two lines are very specific to the filenames you're using.
# If you know a little bit of perl, you can modify them for your use.
# Otherwise, I'd suggest just doing it by hand.
$tracknum = substr($_,0,2);
$trackname = substr($_,3,-4);
print "Converting $_ to WAV...";
`mplayer -ao pcm -aofile encodeme.wav "$_" 2>/dev/null`;
print "done!\n";
print "Encoding to ogg:\n";
print " Number: $tracknum\n";
print " Track : $trackname\n";
`oggenc -a $artist -N $tracknum -t "$trackname" -l "$album" -n "\%a -
\%t.ogg" encodeme.wav`;
print "done!\n\n";
}
-----end encodeme.pl-----
Good luck. :)
--
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837
Attachment:
signature.asc
Description: This is a digitally signed message part