video2gif 0.0.5 → 0.0.7

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: 36087f61d4e1325eb340eb0614ee0d363f86617acc38201ee42bfe979c56d330
4
- data.tar.gz: 6c067f32cb70ecbe93938a4f881cf0964ede151fa05fb138a8c2fcf928edebb9
3
+ metadata.gz: 92d78189e8061dcc25298f5e8fb65e84c39688479f7f087761a16fbab16b5c60
4
+ data.tar.gz: d50fcf7f759e6578beb1730c9a1f2de95b5518c5fdae9a36125405d888a85c03
5
5
  SHA512:
6
- metadata.gz: a28d7340500b995cabb8a45461aff8112310648a3f8c9a3334f0dcee60a995262f22b5cbab9eb6c30acfa3c06cce7307ad5ad5986feb9b7abd895d42a0e31b88
7
- data.tar.gz: 7dbab43d60815e9365176f95b568e9b471c1521824adfccfac8c62a0850a8975f380e5cfbe5c481c450732ba81d63f5854fd5c4c172b625c86f27b33edca4423
6
+ metadata.gz: 57774248542d5c75031ff1596094b3698ee13b48df7ca0a0715c314da676bfe62601396249bbc1d0b0116be97a83351a65a5f9ffded88deb26ac9779afb645c2
7
+ data.tar.gz: 7661e6761b9ceb828bace679eb552f9ffdabf31fdd43b31a63e4ad480bed4514b5733b2a4958a868cd698cd96d7fd3d93da6d31da1fc31e008369a695f8fa64c
@@ -9,7 +9,8 @@ module Video2gif
9
9
  width = options[:width] # default is not to scale at all
10
10
 
11
11
  # create filter elements
12
- fps_filter = "fps=#{fps}"
12
+ palettegen_fps_filter = "fps=2" # sample only a few frames a second
13
+ paletteuse_fps_filter = "fps=#{fps}"
13
14
  crop_filter = options[:cropdetect] || 'crop=' + %W[
14
15
  w=#{ options[:wregion] || 'in_w' }
15
16
  h=#{ options[:hregion] || 'in_h' }
@@ -39,7 +40,7 @@ module Video2gif
39
40
  gamma_b=#{ options[:gamma_b] || 1 }
40
41
  ].join(':')
41
42
  end
42
- palettegen_filter = "palettegen=#{max_colors}stats_mode=diff"
43
+ palettegen_filter = "palettegen=#{max_colors}stats_mode=full"
43
44
  paletteuse_filter = 'paletteuse=dither=floyd_steinberg:diff_mode=rectangle'
44
45
  drawtext_filter = if options[:text]
45
46
  count_of_lines = options[:text].scan(/\\n/).count + 1
@@ -75,7 +76,7 @@ module Video2gif
75
76
  # first, apply the same filters we'll use later in the same order
76
77
  # before applying the palettegen so that we accurately predict the
77
78
  # final palette
78
- filter_complex << fps_filter
79
+ filter_complex << palettegen_fps_filter
79
80
  filter_complex << crop_filter if crop_filter
80
81
  filter_complex << scale_filter if options[:width] unless options[:tonemap]
81
82
  filter_complex << tonemap_filters if options[:tonemap]
@@ -90,7 +91,7 @@ module Video2gif
90
91
  # along with the other filters (drawing text last so that it isn't
91
92
  # affected by scaling)
92
93
  filter_complex << '[0:v][palette]' + paletteuse_filter
93
- filter_complex << fps_filter
94
+ filter_complex << paletteuse_fps_filter
94
95
  filter_complex << crop_filter if crop_filter
95
96
  filter_complex << scale_filter if options[:width] unless options[:tonemap]
96
97
  filter_complex << tonemap_filters if options[:tonemap]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Video2gif
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.7'
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.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emily St.