Created
March 11, 2014 05:45
-
-
Save KingYes/9480100 to your computer and use it in GitHub Desktop.
WMA to MP3 Coverctor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
current_directory=$( pwd ) | |
#remove spaces | |
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; 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 --vbr-new -V4 -m s audiodump.wav -o "$i"; done | |
#convert file names | |
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done | |
#add spaces as origins (if there are spaces) | |
for i in *.mp3; do mv "$i" "`echo "$i" | tr '_' ' '`"; done | |
rm audiodump.wav |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment