From 08aa61a60172326f4ea70834cd28817c0c397421 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 3 Nov 2017 18:35:17 +0800 Subject: Move audio scripts into cli/; also delete a dumplicate --- cli/wma2mp3.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 cli/wma2mp3.sh (limited to 'cli/wma2mp3.sh') diff --git a/cli/wma2mp3.sh b/cli/wma2mp3.sh new file mode 100755 index 0000000..db51e56 --- /dev/null +++ b/cli/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 + -- cgit v1.2.2