video2gif 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c27361d3fbc0e4cb0feddf073297d1aa5c9cff75543970b8cdde0ac8c71f9a1
4
- data.tar.gz: bd5e1f5d1db91f5b3bb4b7d407fb8dc1a7a980805145d15100dbf4b62c1cc167
3
+ metadata.gz: f4e0acee1fd59d611f97a41816906dbbb332ced3fbaaf90b0801e0736c2d00f9
4
+ data.tar.gz: dc29a597398d407ab48bacdbde2bbd281602583a68e0a04c9423029a0b1ab01c
5
5
  SHA512:
6
- metadata.gz: f4dcc55241eb77eb382b37cdb2414ab8ae73f3d1a1ed4fc531908c1f43080b17162f761d5c40edc5b37ad1afc38f2afb1b2fdb0f51a230ad7c3c49507bd99d33
7
- data.tar.gz: 29e0ad1a54e4a16fc4b3472145fc0373843eaafaf7b9c4896af7a199ba103c9c3e72988e5cfed3bbec1e861bfc0d42544fa376b6fc5c8cee81dbfb0835cd16db
6
+ metadata.gz: b8e804320c36b811ca32f06a454484019d3e84d2b084aa90e7229d35e177a8d226126d02c2ea1d2b581c91a5a623fae6683865e543fe41f2c488d9bc159b0c44
7
+ data.tar.gz: 7f87f0e27e7f8931b7579d773c8f0e516506df02d0b992ac62e025a17fa482b066f4716404e230002fcabc9c7e41a7bd7b846777795cbe23462d6b1eaa055c1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- video2gif (0.0.20)
4
+ video2gif (0.0.21)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,6 +6,13 @@ module Video2gif
6
6
  def self.filtergraph(options)
7
7
  filtergraph = []
8
8
 
9
+ # Subtitle overlay has to be first due to sync problems.
10
+ if options[:subtitles] && options[:subtitles].is_a?(TrueClass)
11
+ filtergraph << '[0:v][0:s:0]overlay=format=auto'
12
+ elsif options[:subtitles] && options[:subtitles].match(/\A\d+\z/)
13
+ filtergraph << "[0:v][0:s:#{options[:subtitles]}]overlay=format=auto"
14
+ end
15
+
9
16
  # Set 'fps' filter first, drop unneeded frames instead of
10
17
  # processing those.
11
18
  filtergraph << "fps=#{ options[:fps] || 10 }"
@@ -148,6 +148,15 @@ module Video2gif
148
148
  options[:tonemap] = t || 'hable'
149
149
  end
150
150
 
151
+ parser.on('--subtitles [SELECTION INDEX]',
152
+ 'Attempt to use the subtitles built into the video to',
153
+ 'overlay text on the resulting GIF. Takes an optional',
154
+ 'integer value to choose the subtitle stream. (Defaults',
155
+ 'to the first subtitle stream, 0) (ONLY WORKS WITH BITMAP',
156
+ 'SUBTITLES AT THIS TIME)') do |s|
157
+ options[:subtitles] = s || true
158
+ end
159
+
151
160
  parser.separator ''
152
161
  parser.separator 'Text overlay options (only used if text is defined):'
153
162
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Video2gif
4
- VERSION = '0.0.20'
4
+ VERSION = '0.0.21'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video2gif
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emily St.