libis-format 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libis/format/converter/audio_converter.rb +6 -6
- data/lib/libis/format/converter/image_converter.rb +1 -1
- data/lib/libis/format/converter/jp2_converter.rb +4 -2
- data/lib/libis/format/converter/pdf_metadata.rb +1 -1
- data/lib/libis/format/converter/pdf_protecter.rb +1 -1
- data/lib/libis/format/converter/pdf_selecter.rb +2 -2
- data/lib/libis/format/converter/pdf_splitter.rb +1 -1
- data/lib/libis/format/converter/pdf_watermarker_header.rb +1 -1
- data/lib/libis/format/converter/pdf_watermarker_image.rb +1 -1
- data/lib/libis/format/converter/pdf_watermarker_text.rb +1 -1
- data/lib/libis/format/converter/video_converter.rb +22 -22
- data/lib/libis/format/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cad4173d3e5cc43e573f612cc3f345ef91f5eb8938bb0d457681514d281a531
|
4
|
+
data.tar.gz: 77e84828a1269bb9ddd153362a8af2221153494542f328b73785d014740e07e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cc76923e13c732a606af376614b9d2dd716e7ff851a77645bc8fd979ee7d7c6e98c5bd9936ea506f68009c1aba71b94be98a558e7b4167e53011d966a099c2e
|
7
|
+
data.tar.gz: 29c46dc0a855ff168d2160cd9934e6a710d98e1ddea3b06ae47413248f3d1ddc288bbf376a89a85505ca10cba6d3b3b1d80b4f50f8a1545389b9671f9a0fa46d
|
@@ -128,12 +128,12 @@ module Libis
|
|
128
128
|
opts[:output] << '-map_metadata:g' << '0:g' # Copy global metadata
|
129
129
|
opts[:output] << '-map_metadata:s:a' << '0:s:a' # Copy audio metadata
|
130
130
|
opts[:input] << '-accurate_seek' << (@options[:start].to_i < 0 ? '-sseof' : '-ss') << @options[:start] if @options[:start]
|
131
|
-
opts[:input] << '-t' << @options[:duration] if @options[:duration]
|
132
|
-
opts[:output] << '-q:a' << @options[:quality] if @options[:quality]
|
133
|
-
opts[:output] << '-b:a' << @options[:bit_rate] if @options[:bit_rate]
|
134
|
-
opts[:output] << '-ar' << @options[:sampling_freq] if @options[:sampling_freq]
|
135
|
-
opts[:output] << '-ac' << @options[:channels] if @options[:channels]
|
136
|
-
opts[:output] << '-f' << @options[:format] if @options[:format]
|
131
|
+
opts[:input] << '-t' << @options[:duration].to_s if @options[:duration]
|
132
|
+
opts[:output] << '-q:a' << @options[:quality].to_s if @options[:quality]
|
133
|
+
opts[:output] << '-b:a' << @options[:bit_rate].to_s if @options[:bit_rate]
|
134
|
+
opts[:output] << '-ar' << @options[:sampling_freq].to_s if @options[:sampling_freq]
|
135
|
+
opts[:output] << '-ac' << @options[:channels].to_s if @options[:channels]
|
136
|
+
opts[:output] << '-f' << @options[:format].to_s if @options[:format]
|
137
137
|
result = Libis::Format::Tool::FFMpeg.run(source, target, opts)
|
138
138
|
info "FFMpeg output: #{result}"
|
139
139
|
result
|
@@ -130,7 +130,7 @@ module Libis
|
|
130
130
|
colorspace = @options.delete(:colorspace) || 'sRGB'
|
131
131
|
unless @options.empty?
|
132
132
|
convert.colorspace('RGB')
|
133
|
-
@options.each {|o, v| convert.send(o, v)}
|
133
|
+
@options.each {|o, v| convert.send(o, v.to_s)}
|
134
134
|
end
|
135
135
|
convert.colorspace(colorspace)
|
136
136
|
convert.profile @profile if @profile
|
@@ -51,11 +51,13 @@ module Libis
|
|
51
51
|
@options[:progression_order] = value
|
52
52
|
end
|
53
53
|
|
54
|
-
def tile_size(width = 1024, height =
|
54
|
+
def tile_size(width = 1024, height = nil)
|
55
|
+
height ||= width
|
55
56
|
@options[:tile_size] = [width, height]
|
56
57
|
end
|
57
58
|
|
58
|
-
def codeblock_size(
|
59
|
+
def codeblock_size(width = 6, height = nil)
|
60
|
+
height ||= width
|
59
61
|
@options[:codeblock_size] = [height, width]
|
60
62
|
end
|
61
63
|
|
@@ -40,9 +40,9 @@ module Libis
|
|
40
40
|
def ranges(selection)
|
41
41
|
case selection
|
42
42
|
when Array
|
43
|
-
@options[:ranges] += selection unless selection.empty?
|
43
|
+
@options[:ranges] += selection.to_s unless selection.empty?
|
44
44
|
when String
|
45
|
-
range(selection)
|
45
|
+
range([selection])
|
46
46
|
else
|
47
47
|
# nothing
|
48
48
|
end
|
@@ -31,7 +31,7 @@ module Libis
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def audio_channels(value)
|
34
|
-
@options[:audio_channels] = value
|
34
|
+
@options[:audio_channels] = value
|
35
35
|
end
|
36
36
|
|
37
37
|
def audio_codec(codec)
|
@@ -43,39 +43,39 @@ module Libis
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def start(seconds)
|
46
|
-
@options[:start] = seconds
|
46
|
+
@options[:start] = seconds
|
47
47
|
end
|
48
48
|
|
49
49
|
def duration(seconds)
|
50
|
-
@options[:duration] = seconds
|
50
|
+
@options[:duration] = seconds
|
51
51
|
end
|
52
52
|
|
53
53
|
def audio_quality(value)
|
54
|
-
@options[:audio_quality] = value
|
54
|
+
@options[:audio_quality] = value
|
55
55
|
end
|
56
56
|
|
57
57
|
def video_quality(value)
|
58
|
-
@options[:video_quality] = value
|
58
|
+
@options[:video_quality] = value
|
59
59
|
end
|
60
60
|
|
61
61
|
def audio_bitrate(value)
|
62
|
-
@options[:audio_bitrate] = value
|
62
|
+
@options[:audio_bitrate] = value
|
63
63
|
end
|
64
64
|
|
65
65
|
def video_bitrate(value)
|
66
|
-
@options[:video_bitrate] = value
|
66
|
+
@options[:video_bitrate] = value
|
67
67
|
end
|
68
68
|
|
69
69
|
def constant_rate_factor(value)
|
70
|
-
@options[:crf] = value
|
70
|
+
@options[:crf] = value
|
71
71
|
end
|
72
72
|
|
73
73
|
def frame_rate(value)
|
74
|
-
@options[:frame_rate] = value
|
74
|
+
@options[:frame_rate] = value
|
75
75
|
end
|
76
76
|
|
77
77
|
def sampling_freq(value)
|
78
|
-
@options[:sampling_freq] = value
|
78
|
+
@options[:sampling_freq] = value
|
79
79
|
end
|
80
80
|
|
81
81
|
def scale(width_x_height)
|
@@ -239,21 +239,21 @@ module Libis
|
|
239
239
|
] if @options[:watermark_text_shadow_offset] > 0
|
240
240
|
opts[:filter] << '-vf' << filter_text
|
241
241
|
end
|
242
|
-
opts[:output] << '-ac' << @options[:audio_channels] if @options[:audio_channels]
|
243
|
-
opts[:output] << '-c:a' << @options[:audio_codec] if @options[:audio_codec]
|
244
|
-
opts[:output] << '-c:v' << @options[:video_codec] if @options[:video_codec]
|
245
|
-
opts[:output] << '-b:a' << @options[:audio_bitrate] if @options[:audio_bitrate]
|
246
|
-
opts[:output] << '-b:v' << @options[:video_bitrate] if @options[:video_bitrate]
|
247
|
-
opts[:output] << '-crf' << @options[:crf] if @options[:crf]
|
242
|
+
opts[:output] << '-ac' << @options[:audio_channels].to_s if @options[:audio_channels]
|
243
|
+
opts[:output] << '-c:a' << @options[:audio_codec].to_s if @options[:audio_codec]
|
244
|
+
opts[:output] << '-c:v' << @options[:video_codec].to_s if @options[:video_codec]
|
245
|
+
opts[:output] << '-b:a' << @options[:audio_bitrate].to_s if @options[:audio_bitrate]
|
246
|
+
opts[:output] << '-b:v' << @options[:video_bitrate].to_s if @options[:video_bitrate]
|
247
|
+
opts[:output] << '-crf' << @options[:crf].to_s if @options[:crf]
|
248
248
|
opts[:output] << '-map_metadata:g' << '0:g' # Copy global metadata
|
249
249
|
opts[:output] << '-map_metadata:s:a' << '0:s:a' # Copy audio metadata
|
250
250
|
opts[:output] << '-map_metadata:s:v' << '0:s:v' # Copy video metadata
|
251
|
-
opts[:input] << '-accurate_seek' << (@options[:start].to_i < 0 ? '-sseof' : '-ss') << @options[:start] if @options[:start]
|
252
|
-
opts[:input] << '-t' << @options[:duration] if @options[:duration]
|
253
|
-
opts[:output] << '-qscale' << @options[:video_quality] if @options[:video_quality]
|
254
|
-
opts[:output] << '-q:a' << @options[:audio_quality] if @options[:audio_quality]
|
255
|
-
opts[:output] << '-r' << @options[:frame_rate] if @options[:frame_rate]
|
256
|
-
opts[:output] << '-ar' << @options[:sampling_freq] if @options[:sampling_freq]
|
251
|
+
opts[:input] << '-accurate_seek' << (@options[:start].to_i < 0 ? '-sseof' : '-ss') << @options[:start].to_s if @options[:start]
|
252
|
+
opts[:input] << '-t' << @options[:duration].to_s if @options[:duration]
|
253
|
+
opts[:output] << '-qscale' << @options[:video_quality].to_s if @options[:video_quality]
|
254
|
+
opts[:output] << '-q:a' << @options[:audio_quality].to_s if @options[:audio_quality]
|
255
|
+
opts[:output] << '-r' << @options[:frame_rate].to_s if @options[:frame_rate]
|
256
|
+
opts[:output] << '-ar' << @options[:sampling_freq].to_s if @options[:sampling_freq]
|
257
257
|
if @options[:scale]
|
258
258
|
scale = @options[:scale].split('x')
|
259
259
|
width = scale[0]
|
data/lib/libis/format/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libis-format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|