lesliek
Group: Members
Posts: 91
Joined: Feb. 2006 |
|
Posted: May 21 2006,09:45 |
|
Well, I've now had some time to play with this and have reached the following point:
#!/bin/bash
sed -i "s/libOSS.so/libdisk_writer.so/g" ~/.xmms/config
#process=xmms #t=`pidof $process`
for i in *.wma do filename=`basename "$i" .wma` echo "Ripping $i" xmms "$i" #kill $t killall xmms lame "${i/wma/wav}" "${i/wma/mp3}"
done
sed -i "s/libdisk_writer.so/libOSS.so/g" ~/.xmms/config
I already knew that the opening and closing lines worked properly to change the XMMS output plugin from OSS to Disk Writer and then back again and so I didn't try jot's alternative. I did, however, use his line for lame, changing the 1 to an i, since I'd already been using i.
The most serious problem I have with the rest of the script is that I can't yet stop XMMS from within the script. I tried mikshaw's suggestion of killall xmms (the way the script above is written). It didn't work for me.
I tried something else from a bash script I found on the Web called kill-process.sh, which I've commented out above, namely:
process=xmms t=`pidof $process` kill $t
It didn't work for me either and I don't understand enough about these things to know why not.
One other problem is less serious.
I'm left at the end of the process with three files, Beethoven.wma (a minute long extract I already had, which I'm using for test purposes), Beethoven.wav and Beethoven.mp3.
In his post, jot mentioned xmmsctrl. I had tried that, but with disastrous results. For a reason I've now repressed, I'd decided I couldn't try to get anything useful out of the rpm of it, so I thought I'd try to compile the source code. To do that, I needed to download a dsl (gcc?). After I'd done that and rebooted, I ran out of space while the extensions were being loaded at bootup and had to use a rescue disk to get rid of the new dsl before I could get things back on track.
I'd appreciate very much any advice about how I can stop xmms from within the script and also about how I can automatically get rid of any .wav files produced in the course of the conversion process.
Many thanks for the help already extended,
Leslie
PS As two of the lines in the script appear above, they're not quite correctly formatted. I can't figure out how to fix them in this post. Apologies for that.
|