Skip to content

@ucnv /colorcrashing.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
# 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')
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.