Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- require 'rubygems'
- require 'aviglitch'
- a = AviGlitch.open('in.avi')
- a2 = AviGlitch.open('in2.avi')
- d = []
- a.frames.each_with_index do |f, i|
- d.push(i) if f.is_deltaframe?
- end
- d2= []
- a2.frames.each_with_index do |f, i|
- d2.push(i) if f.is_deltaframe?
- end
- d = d|d2
- q = a.frames[0, 5]
- 100.times do
- x = a.frames[d[rand(d.size)], 1]
- q.concat(x * rand(30))
- end
- o = AviGlitch.open q
- o.output('out2.avi')
Add Comment
Please, Sign In to add comment