Created
August 18, 2009 16:26
-
-
Save nickel/169812 to your computer and use it in GitHub Desktop.
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
#! /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