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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86da3cff6b05fa40ade5bd2e5bc292deefc13894
4
- data.tar.gz: 26092199e4bf01b0f11b8098f4b81dfeb0ee3975
3
+ metadata.gz: 7d0431b383a6dc218999bdb26eb80009330986d8
4
+ data.tar.gz: 046009a4458bf2c9aa0c3eca2cc4867a48f74d46
5
5
  SHA512:
6
- metadata.gz: 37f5e0999aac653a8340147efa8d29c3ea1b9e8bec92c68b076b90256ec2f5e55576f268d3e91c22fd69186ca6dbf7a2fe5ea550a4c814fc38bae236722aaaf1
7
- data.tar.gz: b1cb4b9794085cc4a923e75069d4a10f81dfdede46c8597a9735f68bc90fd2914150300902eeae72dfac45dc6f2c8664f32bdf70fc0ad493f3122381d4516ad3
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
@@ -1,3 +1,3 @@
1
1
  module VideoConverter
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
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.1
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-14 00:00:00.000000000 Z
11
+ date: 2014-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: video_screenshoter