Created
December 6, 2011 18:02
-
-
Save aisuii/1439199 to your computer and use it in GitHub Desktop.
KASUI m4a to mp3
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
# coding: utf-8 | |
Dir['*.m4a'].each do |m4a| | |
mp3 = File.basename(m4a, '.m4a') + '.mp3' | |
cmd = "ffmpeg -i '#{m4a}' -acodec libmp3lame -ab 320 -ac 2 '#{mp3}'" | |
puts cmd | |
`#{cmd}` | |
end |
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/sh | |
for m4a in "$@" | |
do | |
title=`basename "$m4a" .m4a` | |
ffmpeg -i "$m4a" -acodec libmp3lame -ab 320 -ac 2 "$title".mp3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment