Created
May 2, 2015 05:18
-
-
Save dgrant/22ffb4538019a7e2dec6 to your computer and use it in GitHub Desktop.
Convert .m4a to .mp3
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 | |
# | |
# Dump m4a to wav (first step in conversion) | |
mkdir -p output | |
for i in *.mp3 | |
do | |
mplayer -ao pcm:file="output/${i%.mp3}.wav" "$i" | |
done | |
# Convert wav to mp3 | |
for i in output/*.wav | |
do | |
lame --preset fast standard "$i" "${i%.wav}.mp3" | |
done | |
rm -rf output/*.wav |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment