Sha256: 706a2b4995ca28e58a5cbc8af42bb3aeb99c36feda9374b1c19079a0affc99b6

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

#!/usr/bin/env ruby
# Generate datamoshing

require 'rubygems'
require 'aviglitch'

if ARGV.size < 1 || ARGV.first == '--help'
  puts <<-BANNER.gsub(/^\s+/, '')
    Usage: #{File.basename $0} INPUT [OUTPUT]
    Generate a datamoshing video from INPUT to OUTPUT (./out.avi by default).
  BANNER
  exit 0
end

input, output = ARGV

a = AviGlitch.new input
a.glitch_with_index :keyframe do |frame, i|
  if i == 0  # keep the first frame
    frame
  else
    "\000" * frame.size
  end
end
a.write(output || 'out.avi')

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
ucnv-aviglitch-0.0.1 bin/datamoshing
aviglitch-0.0.1 bin/datamosh