Last active
May 1, 2016 08:51
-
-
Save piffy/9d2be7c0a424e40561be3cc115ff6dc1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
#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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment