Guest User

Untitled

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