Created
December 7, 2011 09:20
-
-
Save meleyal/1442130 to your computer and use it in GitHub Desktop.
Convert MP3s to OGG with 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
# INSTRUCTIONS | |
# - Put this file into a directory containing mp3s | |
# - Open in TextMate + run it (cmd+r) | |
dir = File.dirname(__FILE__) | |
mp3s = File.join(dir, "**", "*.mp3") | |
Dir.glob(mp3s) do |f| | |
p "Encoding file #{f}" | |
p "creating ogg..." | |
p `ffmpeg -i "#{f}" -acodec libvorbis "#{f.gsub('.mp3', '.ogg')}"` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment