Created
July 7, 2010 16:00
-
-
Save ucnv/466869 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
# 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