aviglitch 0.1.6 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b4c434f616f3731fd09f5b0d0263e634cc87148e8fad42dd38e6b4d554222a
4
- data.tar.gz: a61ad04a958aec548dec7b554ec8f1b24ff5973d4fa76862dc0ca067fccbeb11
3
+ metadata.gz: 1d39333c753326230a28e3ecde64dfee176af851c53fd1b185a10797e90bbdd0
4
+ data.tar.gz: dfb9e4b6613a38c7da422ac82ebf100c12bf84fee40cfc44d899950e547f13d6
5
5
  SHA512:
6
- metadata.gz: 20b11703e84322c798b7a450508d9848f0dd25534ff9bbf3395b269dd8959a454ad805d013dfcb3cdffadccd2c120b8a4912e1356cfa9079c7a3791284fa9bad
7
- data.tar.gz: 9c5dd3b8c13a186a59b5fd4ad97c992e24c2967dd4629d86b1c6678c0b2fd07ad66a9711175dc499ec6e83893caa464fce2fa374e60d6daf79b47063e3fcf039
6
+ metadata.gz: 9df626227e793840d861bd26510323d315024278bfd4dedc7a4d5a147aef2e92ccd5d7cb0564ad8b743e6c1d2c5fea70f9858c86fcefa4f2434869169df1a2c2
7
+ data.tar.gz: de1adf2790a8c7250e2db4f73bf45b7884b1f1797069ba05899b1f3cb5cd0930d89698ba7d9959099e73e15cd937f83bf3f86939528bdc4310cb4e3c6c82880e
@@ -1,35 +1,19 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
1
  name: test
9
-
10
2
  on:
11
3
  push:
12
4
  branches: [ master ]
13
5
  pull_request:
14
6
  branches: [ master ]
15
-
16
7
  jobs:
17
8
  test:
18
-
19
9
  runs-on: ubuntu-latest
20
10
  strategy:
21
11
  matrix:
22
- ruby-version: ['2.6', '2.7', '3.0']
23
-
12
+ ruby-version: ['3.3']
24
13
  steps:
25
- - uses: actions/checkout@v2
26
- - name: Set up Ruby
27
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
- # uses: ruby/setup-ruby@v1
30
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
14
+ - uses: actions/checkout@v4
15
+ - uses: ruby/setup-ruby@v1
31
16
  with:
32
17
  ruby-version: ${{ matrix.ruby-version }}
33
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
- - name: Run tests
35
- run: bundle exec rake
18
+ bundler-cache: true
19
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -9,3 +9,4 @@ tmp
9
9
  Gemfile.lock
10
10
  Guardfile
11
11
  .yardoc
12
+ spec/files
data/ChangeLog.md CHANGED
@@ -1,3 +1,17 @@
1
+ ### 0.2.2 / 2024-07-20
2
+
3
+ * Added option to set a custom directory for temporary files that internally duplicate input files.
4
+ * Also added an option for the custom temp directory in the datamosh cli.
5
+ * Some improvements regarding internal temporary files.
6
+
7
+ ### 0.2.0 / 2021-09-13
8
+
9
+ * Support for AVI2.0 formatted files. Now this library can handle files larger than 1GB.
10
+ * Added methods to Frames, including #index, #rindex, #first_of, and #last_of
11
+ * Removed warnings for the file size getting large.
12
+ * Added the class AviGlitch::Avi which manages binary RIFF-AVI data.
13
+ * A lot of internal changes.
14
+
1
15
  ### 0.1.6 / 2021-08-21
2
16
 
3
17
  * Removed obsolete dependencies.
data/Gemfile CHANGED
@@ -1,2 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
+
4
+ group :test do
5
+ gem 'guard'
6
+ gem 'guard-rspec'
7
+ end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2021 ucnv
1
+ Copyright (c) 2009-2024 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
data/README.md CHANGED
@@ -44,10 +44,6 @@ For more practical usages, please check <https://github.com/ucnv/aviglitch-utils
44
44
  gem install aviglitch
45
45
  ```
46
46
 
47
- ## Known issues
48
-
49
- - This library doesn't support AVI2 format spec. This means that it will not work as expected for files larger than 1GB.
50
-
51
47
  ## License
52
48
 
53
49
  This library is distributed under the terms and conditions of the [MIT license](LICENSE).
data/aviglitch.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["ucnvvv@gmail.com"]
11
11
  spec.summary = %q{A Ruby library to destroy your AVI files.}
12
12
  spec.description = spec.summary
13
- spec.homepage = "http://ucnv.github.com/aviglitch/"
13
+ spec.homepage = "https://github.com/ucnv/aviglitch"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.has_rdoc = true
22
21
  spec.extra_rdoc_files = ["README.md", "LICENSE"]
23
22
  spec.rdoc_options << "-m" << "README.md"
24
23
 
data/bin/datamosh CHANGED
@@ -8,6 +8,7 @@ require 'aviglitch'
8
8
  output = './out.avi'
9
9
  all = false
10
10
  fake = false
11
+ tmpdir = nil
11
12
 
12
13
  opts = OptionParser.new do |opts|
13
14
  opts.banner = "datamosh - AviGlitch's datamoshing video generator."
@@ -28,10 +29,14 @@ opts = OptionParser.new do |opts|
28
29
  exit
29
30
  end
30
31
  end
32
+ opts.on("--tmpdir [DIR]", "Specify the temporary directory") do |dir|
33
+ tmpdir = dir
34
+ end
31
35
  opts.on_tail("-h", "--help", "Show this message") do
32
36
  puts opts
33
37
  exit
34
38
  end
39
+ opts.version = AviGlitch::VERSION
35
40
  end
36
41
 
37
42
  input = opts.parse!
@@ -48,16 +53,21 @@ else
48
53
  end
49
54
  end
50
55
 
51
- a = AviGlitch.open input.shift
56
+ a = AviGlitch.open input.shift, tmpdir: tmpdir
52
57
  unless fake
53
58
  a.glitch_with_index :keyframe do |frame, i|
54
59
  (!all && i == 0) ? frame : "" # keep the first frame
55
60
  end
56
61
  end
57
- a.mutate_keyframes_into_deltaframes!(!all && !fake ? 1..a.frames.size : nil)
62
+ if !all && !fake
63
+ first = a.frames.index(a.frames.first_of(:keyframe))
64
+ a.mutate_keyframes_into_deltaframes! (first + 1)..a.frames.size
65
+ else
66
+ a.mutate_keyframes_into_deltaframes!
67
+ end
58
68
 
59
69
  input.each do |file|
60
- b = AviGlitch.open file
70
+ b = AviGlitch.open file, tmpdir: tmpdir
61
71
  unless fake
62
72
  b.glitch :keyframe do |frame|
63
73
  ""