bin/datamosh in aviglitch-0.1.1 vs bin/datamosh in aviglitch-0.1.2
- old
+ new
@@ -24,24 +24,27 @@
puts opts
exit
end
end
-input = opts.parse!
+input = Dir.glob opts.parse!
if input.empty?
puts opts
exit 1
end
a = AviGlitch.open input.shift
a.glitch_with_index :keyframe do |frame, i|
- (!all && i == 0) ? frame : nil # keep the first frame
+ (!all && i == 0) ? frame : "" # keep the first frame
end
+a.clear_keyframes!(!all ? 1..a.frames.size : nil)
+
input.each do |file|
b = AviGlitch.open file
b.glitch :keyframe do |frame|
- nil
+ ""
end
+ b.clear_keyframes!
a.frames.concat b.frames
end
a.output output