public
Created

  • Download Gist
colorcrashing.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# color crashing effect
require 'aviglitch'
 
a = AviGlitch.open ARGV.shift
deltas = []
a.frames.each_with_index do |f, i|
deltas.push(i) if f.is_deltaframe?
end
 
q = a.frames[0, 5] # keep first frames.
100.times do
x = a.frames[deltas[rand(deltas.size)], 1]
q.concat(x * rand(50))
end
 
AviGlitch.open(q).output('out.avi')

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.