-
-
Save remino/4464561 to your computer and use it in GitHub Desktop.
Find and convert WMA files into MP3, including audio and metadata, using ffmpeg.
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 | |
if [ $# -lt 1 ]; then | |
echo "Usage: $(basename $0) directory" | |
echo | |
echo "Specify a directory containing wma files to convert into mp3." | |
exit 1 | |
fi | |
find "$1" -iname '*.wma' | while read i; do | |
echo "Converting $i..." | |
ffmpeg -y -i "$i" -ab 196k "${i/%\.[wW][mM][aA]/}.mp3" < /dev/null | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment