bin/wma2mp3

18 lines
432 B
Plaintext
Raw Normal View History

2020-01-26 17:28:29 +01:00
#!/bin/bash
# Dump wma to mp3
# from http://ocaoimh.ie/2005/08/16/how-to-convert-from-wma-to-mp3/
for src in *.wma
do
if [ -f "$src" ]
then
fifo=`echo "$src"|sed -e 's/wma$/wav/'`
rm -f "$fifo"
mkfifo "$fifo"
mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "$src" -ao pcm:file="$fifo" &
dest=`echo "$src"|sed -e 's/wma$/mp3/'`
lame --vbr-new "$fifo" "$dest"
rm -f "$fifo"
fi
done