video_converter 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/video_converter/ffmpeg.rb +1 -0
- data/lib/video_converter/output.rb +2 -2
- data/lib/video_converter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d0431b383a6dc218999bdb26eb80009330986d8
|
4
|
+
data.tar.gz: 046009a4458bf2c9aa0c3eca2cc4867a48f74d46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b405a8e7850f7e0c037013b7a8a1d80e53a4b77abd592263e8fa46ccf25e3aa6b8878d30811b9015fb8af34544e9418bb46f68db900d826d46ebcd82dd9c21
|
7
|
+
data.tar.gz: 08930fe31508088d99ffda28e0df9dbddc726e8146956444e9c0d09eab6501f9c000ddf21e62ee8169d9c28d4a34f781af74e987bcd0254ed82dc9c219530f84
|
@@ -69,6 +69,7 @@ module VideoConverter
|
|
69
69
|
video_filter << "scale=#{output.width}:trunc\\(ow/a/2\\)*2" if output.width && !output.height
|
70
70
|
video_filter << "scale=trunc\\(oh*a/2\\)*2:#{output.height}" if output.height && !output.width
|
71
71
|
video_filter << { 90 => 'transpose=2', 180 => 'transpose=2,transpose=2', 270 => 'transpose=1' }[output.rotate] if output.rotate
|
72
|
+
video_filter << "crop=#{output.crop}" if output.crop
|
72
73
|
output.options[:video_filter] = video_filter.join(',') if video_filter.any?
|
73
74
|
|
74
75
|
output.options[:format] ||= File.extname(output.filename).delete('.')
|
@@ -9,7 +9,7 @@ module VideoConverter
|
|
9
9
|
self.log = 'converter.log'
|
10
10
|
self.keyframe_interval_in_seconds = 4
|
11
11
|
|
12
|
-
attr_accessor :chunks_dir, :drm, :faststart, :ffmpeg_output, :filename, :group, :height, :log, :no_fragments, :one_pass, :options, :path, :rotate, :streams, :thumbnails, :type, :uid, :width, :work_dir
|
12
|
+
attr_accessor :chunks_dir, :crop, :drm, :faststart, :ffmpeg_output, :filename, :group, :height, :log, :no_fragments, :one_pass, :options, :path, :rotate, :streams, :thumbnails, :type, :uid, :width, :work_dir
|
13
13
|
|
14
14
|
def initialize params = {}
|
15
15
|
self.work_dir = File.join(self.class.work_dir, params[:uid])
|
@@ -33,7 +33,7 @@ module VideoConverter
|
|
33
33
|
self.ffmpeg_output = File.join(work_dir, filename)
|
34
34
|
end
|
35
35
|
raise ArgumentError.new('Invalid type') unless %w(default segmented playlist).include?(type)
|
36
|
-
[:path, :streams, :width, :height, :one_pass, :rotate, :faststart, :thumbnails, :group, :drm, :no_fragments].each { |attr| self.send("#{attr}=", params[attr]) }
|
36
|
+
[:path, :streams, :width, :height, :one_pass, :rotate, :faststart, :thumbnails, :group, :drm, :no_fragments, :crop].each { |attr| self.send("#{attr}=", params[attr]) }
|
37
37
|
[:video_bitrate, :audio_bitrate].each { |bitrate| params[bitrate] = "#{params[bitrate]}k" if params[bitrate].is_a?(Numeric) }
|
38
38
|
|
39
39
|
# options will be substituted to convertation commands
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: video_screenshoter
|