-
-
Save thomastraum/2781770 to your computer and use it in GitHub Desktop.
Revisions
-
miketucker created this gist
May 23, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ require 'rubygems' require 'streamio-ffmpeg' threads = [] i = 1 Dir.glob('*.avi') do |f| j = i.to_s threads.push Thread.new { begin movie = FFMPEG::Movie.new(File.absolute_path(f)); movie.transcode(j+'.mp4') { |progress| puts j + ": " + progress.to_s } rescue puts "shit!" end } i += 1 end threads.each {|t| t.join }