Skip to content

Instantly share code, notes, and snippets.

@nickel
Created August 18, 2009 16:26
Show Gist options
  • Save nickel/169812 to your computer and use it in GitHub Desktop.
Save nickel/169812 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
if ARGV[0].nil? || ARGV[1].nil?
puts "Error. Uso: #{$0} wmv_folder/ flv_folder/"
end
Dir.open(ARGV[0]).entries.sort.each do |entry|
if [".", ".."].include? entry
next
end
file_wmv = "#{ARGV[0]}/#{entry}"
file_flv = "#{ARGV[1]}/#{entry.split(".").first}.flv"
`ffmpeg -i #{file_wmv} -sameq -acodec libmp3lame -ar 22050 -ab 96000 -deinterlace -nr 500 -s 1024x768 -r 20 -g 500 -me_range 20 -b 270k -deinterlace -f flv -y #{file_flv}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment