diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-03-31 10:57:34 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-03-31 10:57:34 +0800 |
commit | c9c896dea2ba43551c4e10bd49666105449e9bd7 (patch) | |
tree | e94b73f17b2d776c2acd4c9549657f500c3dc7ce /audio/wma2mp3.sh | |
parent | 2b6cb9b655a53d43b32a8a211287c82f4f59999a (diff) | |
download | atoolbox-c9c896dea2ba43551c4e10bd49666105449e9bd7.tar.bz2 |
add all scripts/tools
Diffstat (limited to 'audio/wma2mp3.sh')
-rwxr-xr-x | audio/wma2mp3.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/audio/wma2mp3.sh b/audio/wma2mp3.sh new file mode 100755 index 0000000..db51e56 --- /dev/null +++ b/audio/wma2mp3.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# convert *.wma to *.mp3 + +current_directory=$( pwd ) + +#remove spaces +for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done + +#remove uppercase +for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done + +#Rip with Mplayer / encode with LAME +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 +for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done + +rm audiodump.wav + |