Last active
September 26, 2015 12:37
-
-
Save epayet/f82514c8ea546ac2cf5d to your computer and use it in GitHub Desktop.
Shell script to convert wma files to mp3. Ex: ./conv-script.sh .
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
#!/usr/bin/env bash | |
set +o posix | |
cd $1 | |
find . -type f | grep wma$ > wma-files.txt | |
readarray -t files < wma-files.txt | |
for file in "${files[@]}"; do | |
out=${file%.wma}.mp3 | |
ffmpeg -i "$file" -map_metadata 0:s:0 "$out" | |
rm "$file" | |
done | |
rm wma-files.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment