Skip to content

Instantly share code, notes, and snippets.

@ucnv
Created July 7, 2010 16:00
Show Gist options
  • Save ucnv/466869 to your computer and use it in GitHub Desktop.
Save ucnv/466869 to your computer and use it in GitHub Desktop.
# 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