Guest User

Untitled

a guest
Apr 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.43 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. require 'rubygems'
  4. require 'aviglitch'
  5.  
  6.  
  7. a = AviGlitch.open('in.avi') # Rewr
  8. a2 = AviGlitch.open('in2.avi')
  9. d = []
  10. a.frames.each_with_index do |f, i|
  11.   d.push(i) if f.is_deltaframe?    
  12. end
  13. a2.frames.each_with_index do |f, i|
  14.   d.push(i) if f.is_deltaframe?    
  15. end
  16. q = a.frames[0, 5]
  17. 100.times do
  18.   x = a.frames[d[rand(d.size)], 1]
  19.   q.concat(x * rand(30))
  20. end
  21. o = AviGlitch.open q
  22. o.output('out2.avi')
Add Comment
Please, Sign In to add comment