Skip to content

@ideaoforder /mp32ogg.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby script to convert dir of mp3s to oggs
#!/usr/bin/env ruby
require 'rubygems'
@dir = ARGV[0]
@i = 0
Dir.glob("#{@dir}/*.mp3").each do |mp3|
ogg = mp3.gsub('mp3', 'ogg')
system "ffmpeg -i \"#{mp3}\" -acodec libvorbis -ac 2 \"#{ogg}\""
@i += 1
end
puts "Converted #{@i} mp3s to ogg format!"
@sergiotapia

Thanks for sharing, helped me out big time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.