aviglitch 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,10 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ doc
6
+ pkg
7
+ tmp
8
+ *.gem
9
+ Gemfile.lock
10
+ Guardfile
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ -c
2
+ -fs
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.8.7
5
+ - 2.0.0
6
+ - 2.1.0
7
+ - jruby-19mode
@@ -1,32 +1,42 @@
1
- == 0.1.3 / 2011-08-19
1
+ ### 0.1.4 / 2014-04-10
2
+
3
+ * Added an enumerator style on AviGlitch::Base#glitch and
4
+ AviGlitch::Frames#each
5
+ * Added AviGlitch::Base#remove_all_keyframes!
6
+ * Renamed #clear_keyframes! to #mutate_keyframes_into_deltaframes!
7
+ * Improved the processing speed in some measure.
8
+ * Some minor fixes.
9
+
10
+ ### 0.1.3 / 2011-08-19
11
+
2
12
  * Added has_keyframe? method to AviGlitch::Base
3
13
  * Added a --fake option to datamosh cli.
4
14
 
5
- == 0.1.2 / 2011-04-10
15
+ ### 0.1.2 / 2011-04-10
6
16
 
7
17
  * Fix to be able to handle data with offsets from 0 of the file.
8
18
  * Added clear_keyframes! method to AviGlitch::Frames and AviGlitch::Base.
9
19
  * Changed to be able to access frame's meta data.
10
20
  * Changed datamosh command to handle wildcard char.
11
21
 
12
- == 0.1.1 / 2010-09-09
22
+ ### 0.1.1 / 2010-09-09
13
23
 
14
24
  * Fixed a bug with windows.
15
25
  * Some tiny fixes.
16
26
 
17
- == 0.1.0 / 2010-07-09
27
+ ### 0.1.0 / 2010-07-09
18
28
 
19
29
  * Minor version up.
20
30
  * Fixed bugs with Ruby 1.8.7.
21
31
  * Fixed the synchronization problem with datamosh cli.
22
32
 
23
- == 0.0.3 / 2010-07-07
33
+ ### 0.0.3 / 2010-07-07
24
34
 
25
35
  * Changed AviGlitch::Frames allowing to slice and concatenate frames
26
36
  (like Array).
27
37
  * Changed datamosh cli to accept multiple files.
28
38
 
29
- == 0.0.2 / 2010-05-17
39
+ ### 0.0.2 / 2010-05-17
30
40
 
31
41
  * Removed AviGlitch#new. Use AviGlitch#open instead of #new.
32
42
  * Added warning for a large file.
@@ -34,7 +44,7 @@
34
44
  * Changed the library file layout.
35
45
  * And tiny internal changes.
36
46
 
37
- == 0.0.1 / 2009-08-01
47
+ ### 0.0.1 / 2009-08-01
38
48
 
39
49
  * initial release
40
50
 
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 ucnv
1
+ Copyright (c) 2009-2014 ucnv
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -0,0 +1,45 @@
1
+ # AviGlitch
2
+ [![Build Status](https://travis-ci.org/ucnv/aviglitch.svg?branch=master)](https://travis-ci.org/ucnv/aviglitch)
3
+
4
+ AviGlitch destroys your AVI files.
5
+
6
+ I can't explain why they're going to destroy their own data, but they do.
7
+
8
+ You can find a short guide at <http://ucnv.github.com/aviglitch/>.
9
+ It provides a way to manipulate the data in each AVI frames.
10
+ It will mostly be used for making datamoshing videos.
11
+ It parses only container level structure, doesn't parse codecs.
12
+
13
+ See following urls for details about visual glitch;
14
+
15
+ * vimeo <http://www.vimeo.com/groups/artifacts>
16
+ * wikipedia <http://en.wikipedia.org/wiki/Compression_artifact>
17
+
18
+ ## Usage
19
+
20
+ ```ruby
21
+ require 'aviglitch'
22
+
23
+ avi = AviGlitch.open('/path/to/your.avi')
24
+ avi.glitch(:keyframe) do |data|
25
+ data.gsub(/\d/, '0')
26
+ end
27
+ avi.output('/path/to/broken.avi')
28
+ ```
29
+
30
+ This library also includes a command line tool named `datamosh`.
31
+ It creates the keyframes removed video.
32
+
33
+ ```sh
34
+ $ datamosh /path/to/your.avi -o /path/to/broken.avi
35
+ ```
36
+
37
+ ## Installation
38
+
39
+ ```sh
40
+ gem install aviglitch
41
+ ```
42
+
43
+ ## Copyright
44
+
45
+ Copyright (c) 2009 - 2014 ucnv. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,50 +1,13 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "aviglitch"
8
- gem.summary = "A Ruby library to destroy your AVI files."
9
- gem.email = "ucnvvv@gmail.com"
10
- gem.homepage = "http://ucnv.github.com/aviglitch/"
11
- gem.authors = ["ucnv"]
12
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
- gem.files = %w(README.rdoc ChangeLog Rakefile VERSION) +
14
- Dir.glob("{bin,spec,lib}/**/*")
15
- gem.add_development_dependency "rspec", ">= 2.0.0"
16
-
17
- end
18
-
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
21
- end
22
-
23
- require 'rspec/core/rake_task'
24
- RSpec::Core::RakeTask.new(:spec) do |spec|
25
- spec.pattern = FileList['spec/**/*_spec.rb']
26
- end
27
-
28
- RSpec::Core::RakeTask.new(:rcov) do |spec|
29
- spec.pattern = 'spec/**/*_spec.rb'
30
- spec.rcov = true
31
- end
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
32
3
 
4
+ RSpec::Core::RakeTask.new(:spec)
33
5
 
34
6
  task :default => :spec
35
7
 
36
- require 'rake/rdoctask'
8
+ require 'rdoc/task'
37
9
  Rake::RDocTask.new do |rdoc|
38
- if File.exist?('VERSION.yml')
39
- config = YAML.load(File.read('VERSION.yml'))
40
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
41
- else
42
- version = ""
43
- end
44
-
10
+ rdoc.main = "README.md"
45
11
  rdoc.rdoc_dir = 'rdoc'
46
- rdoc.title = "aviglitch #{version}"
47
- rdoc.rdoc_files.include('README*')
48
- rdoc.rdoc_files.include('lib/**/*.rb')
12
+ rdoc.rdoc_files.include(%w{LICENSE *.md lib/**/*.rb})
49
13
  end
50
-
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'aviglitch'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "aviglitch"
8
+ spec.version = AviGlitch::VERSION
9
+ spec.authors = ["ucnv"]
10
+ spec.email = ["ucnvvv@gmail.com"]
11
+ spec.description = %q{AviGlitch destroys your AVI files.
12
+ This library provides ways to manipulate data in each AVI frames.
13
+ It can easily generate keyframes-removed video known as "datamoshing".
14
+ }
15
+ spec.summary = %q{A Ruby library to destroy your AVI files.}
16
+ spec.homepage = "http://ucnv.github.com/aviglitch/"
17
+ spec.license = "MIT"
18
+
19
+ spec.files = `git ls-files`.split($/)
20
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.has_rdoc = true
25
+ spec.extra_rdoc_files = ["README.md", "LICENSE"]
26
+ spec.rdoc_options << "-m" << "README.md"
27
+
28
+ spec.add_development_dependency "bundler", "~> 1.3"
29
+ spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rspec", "~> 2.0"
31
+ spec.add_development_dependency "rdoc", "~> 4.0"
32
+ end
@@ -34,10 +34,18 @@ opts = OptionParser.new do |opts|
34
34
  end
35
35
  end
36
36
 
37
- input = Dir.glob opts.parse!
37
+ input = opts.parse!
38
38
  if input.empty?
39
39
  puts opts
40
40
  exit 1
41
+ else
42
+ input.each do |file|
43
+ if !File.exist?(file) || File.directory?(file)
44
+ opts.banner = "#{file}: No such file.\n\n"
45
+ puts opts
46
+ exit 1
47
+ end
48
+ end
41
49
  end
42
50
 
43
51
  a = AviGlitch.open input.shift
@@ -46,7 +54,7 @@ unless fake
46
54
  (!all && i == 0) ? frame : "" # keep the first frame
47
55
  end
48
56
  end
49
- a.clear_keyframes!(!all && !fake ? 1..a.frames.size : nil)
57
+ a.mutate_keyframes_into_deltaframes!(!all && !fake ? 1..a.frames.size : nil)
50
58
 
51
59
  input.each do |file|
52
60
  b = AviGlitch.open file
@@ -55,7 +63,7 @@ input.each do |file|
55
63
  ""
56
64
  end
57
65
  end
58
- b.clear_keyframes!
66
+ b.mutate_keyframes_into_deltaframes!
59
67
  a.frames.concat b.frames
60
68
  end
61
69
 
@@ -15,7 +15,7 @@ require 'aviglitch/tempfile'
15
15
  # You can manipulate each frame, like:
16
16
  #
17
17
  # avi = AviGlitch.open '/path/to/your.avi'
18
- # avi.frames.each |frame|
18
+ # avi.frames.each do |frame|
19
19
  # if frame.is_keyframe?
20
20
  # frame.data = frame.data.gsub(/\d/, '0')
21
21
  # end
@@ -30,12 +30,11 @@ require 'aviglitch/tempfile'
30
30
  # end
31
31
  # avi.output '/path/to/broken.avi'
32
32
  #
33
- #--
34
- # It does not support AVI2, interleave format.
35
- #
36
33
  module AviGlitch
37
34
 
38
- VERSION = '0.1.3'
35
+ VERSION = '0.1.4'
36
+
37
+ BUFFER_SIZE = 2 ** 24
39
38
 
40
39
  class << self
41
40
  ##
@@ -19,7 +19,7 @@ module AviGlitch
19
19
  # copy as tempfile
20
20
  @file = Tempfile.open 'aviglitch'
21
21
  f.rewind
22
- while d = f.read(1024) do
22
+ while d = f.read(BUFFER_SIZE) do
23
23
  @file.print d
24
24
  end
25
25
  end
@@ -59,34 +59,38 @@ module AviGlitch
59
59
  # It also requires a block. In the block, you take the frame data
60
60
  # as a String parameter.
61
61
  # To modify the data, simply return a modified data.
62
- # It returns +self+
62
+ # With a block it returns Enumerator, without a block it returns +self+.
63
63
  def glitch target = :all, &block # :yield: data
64
- @frames.each do |frame|
65
- if valid_target? target, frame
66
- frame.data = yield frame.data
64
+ if block_given?
65
+ @frames.each do |frame|
66
+ if valid_target? target, frame
67
+ frame.data = yield frame.data
68
+ end
67
69
  end
70
+ self
71
+ else
72
+ self.enum_for :glitch, target
68
73
  end
69
- self
70
74
  end
71
75
 
72
76
  ##
73
77
  # Do glitch with index.
74
78
  def glitch_with_index target = :all, &block # :yield: data, index
75
- i = 0
76
- @frames.each do |frame|
77
- if valid_target? target, frame
78
- frame.data = yield(frame.data, i)
79
- i += 1
79
+ if block_given?
80
+ self.glitch(target).with_index do |x, i|
81
+ yield x, i
80
82
  end
83
+ self
84
+ else
85
+ self.glitch target
81
86
  end
82
- self
83
87
  end
84
88
 
85
89
  ##
86
- # Clears all (or in +range+) keyframes to deltaframes.
87
- # It's an alias for Frames#clear_keyframes!
88
- def clear_keyframes! range = nil
89
- self.frames.clear_keyframes! range
90
+ # Mutates all (or in +range+) keyframes into deltaframes.
91
+ # It's an alias for Frames#mutate_keyframes_into_deltaframes!
92
+ def mutate_keyframes_into_deltaframes! range = nil
93
+ self.frames.mutate_keyframes_into_deltaframes! range
90
94
  self
91
95
  end
92
96
 
@@ -103,6 +107,15 @@ module AviGlitch
103
107
  result
104
108
  end
105
109
 
110
+ ##
111
+ # Removes all keyframes.
112
+ # It is same as +glitch(:keyframes){|f| nil }+
113
+ def remove_all_keyframes!
114
+ self.glitch :keyframe do |f|
115
+ nil
116
+ end
117
+ end
118
+
106
119
  ##
107
120
  # Swaps the frames with other Frames data.
108
121
  def frames= other
@@ -18,8 +18,10 @@ module AviGlitch
18
18
  class Frames
19
19
  include Enumerable
20
20
 
21
- SAFE_FRAMES_COUNT = 150000 #:nodoc:
22
- @@warn_if_frames_are_too_large = true #:nodoc:
21
+ # :stopdoc:
22
+ SAFE_FRAMES_COUNT = 150000
23
+ @@warn_if_frames_are_too_large = true
24
+ # :startdoc:
23
25
 
24
26
  attr_reader :meta
25
27
 
@@ -56,11 +58,16 @@ module AviGlitch
56
58
 
57
59
  ##
58
60
  # Enumerates the frames.
61
+ # It returns Enumerator if a block is not given.
59
62
  def each
60
- temp = Tempfile.new 'frames'
61
- frames_data_as_io(temp, Proc.new)
62
- overwrite temp
63
- temp.close!
63
+ if block_given?
64
+ temp = Tempfile.new 'frames'
65
+ frames_data_as_io(temp, Proc.new)
66
+ overwrite temp
67
+ temp.close!
68
+ else
69
+ self.enum_for :each
70
+ end
64
71
  end
65
72
 
66
73
  ##
@@ -69,6 +76,15 @@ module AviGlitch
69
76
  @meta.size
70
77
  end
71
78
 
79
+ ##
80
+ # Returns the number of the specific +frame_type+.
81
+ def size_of frame_type
82
+ detection = "is_#{frame_type.to_s.sub(/frames$/, 'frame')}?"
83
+ @meta.select { |m|
84
+ Frame.new(nil, m[:id], m[:flag]).send detection
85
+ }.size
86
+ end
87
+
72
88
  def frames_data_as_io io = nil, block = nil #:nodoc:
73
89
  io = Tempfile.new('tmep') if io.nil?
74
90
  @meta = @meta.select do |m|
@@ -99,20 +115,19 @@ module AviGlitch
99
115
  exit
100
116
  end
101
117
  # Overwrite the file
102
- data.seek 0, IO::SEEK_END
103
118
  @io.pos = @pos_of_movi - 4 # 4 for size
104
119
  @io.print [data.pos + 4].pack('V') # 4 for 'movi'
105
120
  @io.print 'movi'
106
121
  data.rewind
107
- while d = data.read(1024) do
122
+ while d = data.read(BUFFER_SIZE) do
108
123
  @io.print d
109
124
  end
110
125
  @io.print 'idx1'
111
126
  @io.print [@meta.size * 16].pack('V')
112
- @meta.each do |m|
113
- @io.print m[:id]
114
- @io.print [m[:flag], m[:offset], m[:size]].pack('V3')
115
- end
127
+ idx = @meta.collect { |m|
128
+ m[:id] + [m[:flag], m[:offset], m[:size]].pack('V3')
129
+ }.join
130
+ @io.print idx
116
131
  eof = @io.pos
117
132
  @io.truncate eof
118
133
 
@@ -152,7 +167,7 @@ module AviGlitch
152
167
  this_data.seek 0, IO::SEEK_END
153
168
  this_size = this_data.pos
154
169
  other_data.rewind
155
- while d = other_data.read(1024) do
170
+ while d = other_data.read(BUFFER_SIZE) do
156
171
  this_data.print d
157
172
  end
158
173
  other_data.close!
@@ -324,8 +339,8 @@ module AviGlitch
324
339
  end
325
340
 
326
341
  ##
327
- # Modify keyframes to deltaframes at given range, or all.
328
- def clear_keyframes! range = nil
342
+ # Mutates keyframes into deltaframes at given range, or all.
343
+ def mutate_keyframes_into_deltaframes! range = nil
329
344
  range = 0..self.size if range.nil?
330
345
  self.each_with_index do |frame, i|
331
346
  if range.include? i
@@ -52,13 +52,24 @@ describe AviGlitch do
52
52
 
53
53
  it 'can glitch each keyframe with index' do
54
54
  avi = AviGlitch.open @in
55
+
56
+ a_size = 0
57
+ avi.glitch :keyframe do |f|
58
+ a_size += 1
59
+ f
60
+ end
61
+
62
+ b_size = 0
55
63
  avi.glitch_with_index :keyframe do |kf, idx|
64
+ b_size += 1
56
65
  if idx < 25
57
66
  kf.slice(10..kf.size)
58
67
  else
59
68
  kf
60
69
  end
61
70
  end
71
+ expect(a_size).to be == b_size
72
+
62
73
  avi.output @out
63
74
  i_size = File.stat(@in).size
64
75
  o_size = File.stat(@out).size
@@ -143,9 +154,9 @@ describe AviGlitch do
143
154
  AviGlitch::Base.surely_formatted?(@out, true).should be true
144
155
  end
145
156
 
146
- it 'should clear keyframes with one method' do
157
+ it 'should mutate keyframes into deltaframes' do
147
158
  a = AviGlitch.open @in
148
- a.clear_keyframes!
159
+ a.mutate_keyframes_into_deltaframes!
149
160
  a.output @out
150
161
  a = AviGlitch.open @out
151
162
  a.frames.each do |f|
@@ -153,7 +164,7 @@ describe AviGlitch do
153
164
  end
154
165
 
155
166
  a = AviGlitch.open @in
156
- a.clear_keyframes! 0..50
167
+ a.mutate_keyframes_into_deltaframes! 0..50
157
168
  a.output @out
158
169
  a = AviGlitch.open @out
159
170
  a.frames.each_with_index do |f, i|
@@ -172,4 +183,29 @@ describe AviGlitch do
172
183
  a.has_keyframe?.should be false
173
184
  end
174
185
 
186
+ it 'should #remove_all_keyframes!' do
187
+ a = AviGlitch.open @in
188
+ a.has_keyframe?.should be true
189
+ a.remove_all_keyframes!
190
+ a.has_keyframe?.should be false
191
+ end
192
+
193
+ it 'should count same number of specific frames' do
194
+ a = AviGlitch.open @in
195
+ dc1 = 0
196
+ dc2 = 0
197
+ a.frames.each do |f|
198
+ dc1 += 1 if f.is_deltaframe?
199
+ end
200
+ a.glitch(:deltaframe) do |d|
201
+ dc2 += 1
202
+ d
203
+ end
204
+
205
+ expect(dc1).to eq(dc2)
206
+
207
+
208
+
209
+ end
210
+
175
211
  end
@@ -460,9 +460,9 @@ describe AviGlitch::Frames do
460
460
  end
461
461
  end
462
462
 
463
- it 'should clear keyframes with one method' do
463
+ it 'should mutate keyframes into deltaframe' do
464
464
  a = AviGlitch.open @in
465
- a.frames.clear_keyframes!
465
+ a.frames.mutate_keyframes_into_deltaframes!
466
466
  a.output @out
467
467
  a = AviGlitch.open @out
468
468
  a.frames.each do |f|
@@ -470,7 +470,7 @@ describe AviGlitch::Frames do
470
470
  end
471
471
 
472
472
  a = AviGlitch.open @in
473
- a.frames.clear_keyframes! 0..50
473
+ a.frames.mutate_keyframes_into_deltaframes! 0..50
474
474
  a.output @out
475
475
  a = AviGlitch.open @out
476
476
  a.frames.each_with_index do |f, i|
@@ -480,4 +480,81 @@ describe AviGlitch::Frames do
480
480
  end
481
481
  end
482
482
 
483
+ it 'should return Enumerator with #each' do
484
+ a = AviGlitch.open @in
485
+ enum = a.frames.each
486
+ enum.each do |f, i|
487
+ if f.is_keyframe?
488
+ f.data = f.data.gsub(/\d/, '')
489
+ end
490
+ end
491
+ a.output @out
492
+ AviGlitch::Base.surely_formatted?(@out, true).should be true
493
+ expect(File.size(@out)).to be < File.size(@in)
494
+ end
495
+
496
+ it 'should use Enumerator as an external iterator',
497
+ :skip => Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9.0') || RUBY_PLATFORM == 'java' do
498
+ a = AviGlitch.open @in
499
+ e = a.frames.each
500
+ expect {
501
+ while f = e.next do
502
+ expect(f).to be_a(AviGlitch::Frame)
503
+ if f.is_keyframe?
504
+ f.data = f.data.gsub(/\d/, '')
505
+ end
506
+ end
507
+ }.to raise_error(StopIteration)
508
+ a.output @out
509
+ AviGlitch::Base.surely_formatted?(@out, true).should be true
510
+ expect(File.size(@out)).to be < File.size(@in)
511
+ end
512
+
513
+ it 'should count the size of specific frames' do
514
+ a = AviGlitch.open @in
515
+ f = a.frames
516
+
517
+ kc1 = f.size_of :keyframes
518
+ kc2 = f.size_of :keyframe
519
+ kc3 = f.size_of :iframes
520
+ kc4 = f.size_of :iframe
521
+
522
+ dc1 = f.size_of :deltaframes
523
+ dc2 = f.size_of :deltaframe
524
+ dc3 = f.size_of :pframes
525
+ dc4 = f.size_of :pframe
526
+
527
+ vc1 = f.size_of :videoframes
528
+ vc2 = f.size_of :videoframe
529
+
530
+ ac1 = f.size_of :audioframes
531
+ ac2 = f.size_of :audioframe
532
+
533
+ kc = dc = vc = ac = 0
534
+ a.frames.each do |x|
535
+ vc += x.is_videoframe? ? 1 : 0
536
+ kc += x.is_keyframe? ? 1 : 0
537
+ dc += x.is_deltaframe? ? 1 : 0
538
+ ac += x.is_audioframe? ? 1 : 0
539
+ end
540
+
541
+ a.close
542
+
543
+ expect(kc1).to eq(kc)
544
+ expect(kc2).to eq(kc)
545
+ expect(kc3).to eq(kc)
546
+ expect(kc4).to eq(kc)
547
+
548
+ expect(dc1).to eq(dc)
549
+ expect(dc2).to eq(dc)
550
+ expect(dc3).to eq(dc)
551
+ expect(dc4).to eq(dc)
552
+
553
+ expect(vc1).to eq(vc)
554
+ expect(vc2).to eq(vc)
555
+
556
+ expect(ac1).to eq(ac)
557
+ expect(ac2).to eq(ac)
558
+ end
559
+
483
560
  end
@@ -7,5 +7,5 @@ FILES_DIR = Pathname.new(File.dirname(__FILE__)).realpath + 'files'
7
7
  OUTPUT_DIR = FILES_DIR + 'output'
8
8
 
9
9
  RSpec.configure do |config|
10
-
10
+ config.filter_run_excluding :skip => true
11
11
  end
metadata CHANGED
@@ -1,41 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: aviglitch
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 4
10
+ version: 0.1.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - ucnv
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-08-19 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rspec
16
- requirement: &2157607660 !ruby/object:Gem::Requirement
17
+
18
+ date: 2014-04-10 00:00:00 +09:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ hash: 9
28
+ segments:
29
+ - 1
30
+ - 3
31
+ version: "1.3"
32
+ prerelease: false
33
+ requirement: *id001
34
+ type: :development
35
+ name: bundler
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ hash: 35
43
+ segments:
44
+ - 10
45
+ - 0
46
+ version: "10.0"
47
+ prerelease: false
48
+ requirement: *id002
49
+ type: :development
50
+ name: rake
51
+ - !ruby/object:Gem::Dependency
52
+ version_requirements: &id003 !ruby/object:Gem::Requirement
17
53
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 2.0.0
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 2
60
+ - 0
61
+ version: "2.0"
62
+ prerelease: false
63
+ requirement: *id003
22
64
  type: :development
65
+ name: rspec
66
+ - !ruby/object:Gem::Dependency
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ hash: 27
73
+ segments:
74
+ - 4
75
+ - 0
76
+ version: "4.0"
23
77
  prerelease: false
24
- version_requirements: *2157607660
25
- description:
26
- email: ucnvvv@gmail.com
27
- executables:
78
+ requirement: *id004
79
+ type: :development
80
+ name: rdoc
81
+ description: "AviGlitch destroys your AVI files.\n This library provides ways to manipulate data in each AVI frames.\n It can easily generate keyframes-removed video known as \"datamoshing\".\n "
82
+ email:
83
+ - ucnvvv@gmail.com
84
+ executables:
28
85
  - datamosh
29
86
  extensions: []
30
- extra_rdoc_files:
31
- - ChangeLog
87
+
88
+ extra_rdoc_files:
89
+ - README.md
32
90
  - LICENSE
33
- - README.rdoc
34
- files:
35
- - ChangeLog
36
- - README.rdoc
91
+ files:
92
+ - .gitignore
93
+ - .rspec
94
+ - .travis.yml
95
+ - ChangeLog.md
96
+ - Gemfile
97
+ - LICENSE
98
+ - README.md
37
99
  - Rakefile
38
- - VERSION
100
+ - aviglitch.gemspec
39
101
  - bin/datamosh
40
102
  - lib/aviglitch.rb
41
103
  - lib/aviglitch/base.rb
@@ -47,33 +109,44 @@ files:
47
109
  - spec/files/sample.avi
48
110
  - spec/frames_spec.rb
49
111
  - spec/spec_helper.rb
50
- - LICENSE
112
+ has_rdoc: true
51
113
  homepage: http://ucnv.github.com/aviglitch/
52
- licenses: []
114
+ licenses:
115
+ - MIT
53
116
  post_install_message:
54
- rdoc_options: []
55
- require_paths:
117
+ rdoc_options:
118
+ - -m
119
+ - README.md
120
+ require_paths:
56
121
  - lib
57
- required_ruby_version: !ruby/object:Gem::Requirement
122
+ required_ruby_version: !ruby/object:Gem::Requirement
58
123
  none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ hash: 3
128
+ segments:
129
+ - 0
130
+ version: "0"
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
132
  none: false
65
- requirements:
66
- - - ! '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ hash: 3
137
+ segments:
138
+ - 0
139
+ version: "0"
69
140
  requirements: []
141
+
70
142
  rubyforge_project:
71
- rubygems_version: 1.8.8
143
+ rubygems_version: 1.6.2
72
144
  signing_key:
73
145
  specification_version: 3
74
146
  summary: A Ruby library to destroy your AVI files.
75
- test_files:
147
+ test_files:
76
148
  - spec/aviglitch_spec.rb
77
149
  - spec/datamosh_spec.rb
150
+ - spec/files/sample.avi
78
151
  - spec/frames_spec.rb
79
152
  - spec/spec_helper.rb
@@ -1,42 +0,0 @@
1
- = AviGlitch
2
-
3
- * http://ucnv.github.com/aviglitch/
4
-
5
- == Description
6
-
7
- AviGlitch destroys your AVI files.
8
-
9
- I can't explain why they're going to destroy their own data.
10
-
11
- See following urls for details;
12
- * vimeo http://www.vimeo.com/groups/artifacts
13
- * wikipedia http://en.wikipedia.org/wiki/Compression_artifact
14
-
15
- == Features/Problems
16
-
17
- * Not supports AVI2 files right now.
18
- * Not supports files with interleave.
19
- * Parses only container level structure, doesn't parse codecs.
20
-
21
- == Synopsis
22
-
23
- require 'aviglitch'
24
-
25
- avi = AviGlitch.open('/path/to/your.avi')
26
- avi.glitch(:keyframe) do |data|
27
- data.gsub(/\d/, '0')
28
- end
29
- avi.output('/path/to/broken.avi')
30
-
31
- This library also includes a command line tool named +datamosh+.
32
- It creates the keyframes removed video.
33
-
34
- $ datamosh /path/to/your.avi -o /path/to/broken.avi
35
-
36
- == Installation
37
-
38
- gem install aviglitch
39
-
40
- == Copyright
41
-
42
- Copyright (c) 2009 - 2010 ucnv. See LICENSE for details.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.3