Sha256: 55c1d7ef10910d4a094438e19ec83b6715ba4d1f4bc3aa46ffafd1c910baac1c

Contents?: true

Size: 911 Bytes

Versions: 1

Compression:

Stored size: 911 Bytes

Contents

require 'aviglitch/base'
require 'aviglitch/frame'
require 'aviglitch/frames'

# AviGlitch provides the ways to glitch AVI formatted video files.
#
# == Synopsis:
#
# You can manipulate each frame, like:
#
#   avi = AviGlitch.open '/path/to/your.avi'
#   avi.frames.each |frame|
#     if frame.is_keyframe?
#       frame.data = frame.data.gsub(/\d/, '0')
#     end
#   end
#   avi.output '/path/to/broken.avi'
#
# Using the method glitch, it can be written like:
#
#   avi = AviGlitch.open '/path/to/your.avi'
#   avi.glitch(:keyframe) do |data|
#     data.gsub(/\d/, '0')
#   end
#   avi.output '/path/to/broken.avi'
#
#--
# It does not support AVI2, interleave format.
#
module AviGlitch

  VERSION = '0.0.2'

  class << self
    ##
    # Returns AviGlitch::Base instance.
    # It requires +path+ as String or Pathname.
    def AviGlitch.open path
      AviGlitch::Base.new(Pathname(path))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aviglitch-0.0.2 lib/aviglitch.rb