Files
dotfiles/vim/wiki/wma2mp3.wiki
T
2014-02-05 14:27:09 +01:00

35 lines
891 B
Plaintext

[[=WMA]] zu MP3 konvertieren mit mplayer und lame=
==Rip with Mplayer / encode with LAME==
{{{class="brush: bash; ; toolbar: false;"
$ for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader $i && lame -m s audiodump.wav -o $i; done
}}}
==convert file names==
{{{class="brush: bash; ; toolbar: false;"
$ for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done
}}}
==code==
{{{class="brush: bash; ; toolbar: false;"
#!/bin/bash
#
# Dump wma to mp3
for i in *.wma
do
if [ -f "$i" ]; then
rm -f "$i.wav"
mkfifo "$i.wav"
mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1 -ao pcm:waveheader:file="$i.wav" "$i" &
dest=`echo "$i"|sed -e 's/wma$/mp3/'`
lame -V0 -h -b 160 --vbr-new "$i.wav" "$dest"
rm -f "$i.wav"
fi
done
}}}
[ [[index|Go home]] ]