Skip to content

Instantly share code, notes, and snippets.

/aacify.rb Secret

Created March 24, 2016 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/79c841421b5145761393 to your computer and use it in GitHub Desktop.
Save anonymous/79c841421b5145761393 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
dir = File.expand_path(File.join(ARGV.shift.dup || "./", "**.flac"))
puts dir
for file in Dir.glob(dir) do
puts file
`ffmpeg -i "#{file}" -c:a aac_at -aac_at_mode vbr -aac_at_quality 2 "#{file}.m4a"`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment