ffmprb 0.9.2 → 0.9.3

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
  SHA1:
3
- metadata.gz: 9af27a9c9cef89ae38adb0f42fed92745c3efc62
4
- data.tar.gz: 2f43573eb37a1d0a9f7c4f216b1d527a6d9d8a3a
3
+ metadata.gz: b7ad97d1cd5c5f9689791939bac8be4036bba88e
4
+ data.tar.gz: fa917b25a9eb5756515ce122a842ca267057f8e3
5
5
  SHA512:
6
- metadata.gz: c9da2c38056dc033ff68141aea6cab5ce2d28f27c25ac99305d4b1b86f3c1c699f7cbdfb736e550bcf322817de329a531949e69075ad7b795de002567521c27d
7
- data.tar.gz: 21fb0677d0c1c3f4ef0d812f73d4ffc8f59e5480831d7b85403e014c4cbd91f9249a1d3ddbb6ad947f064d88bacac93e04cac7eaf0bfcd16020cface96890bb4
6
+ metadata.gz: 8c2c21e9616b2cb086d211d8e8f4f973764e7c950a664a20d36dfdc84ece7e4250a69413883b19fd826ff0af6d5b4df462f8c4223ca38ea48c0a4dda3697c497
7
+ data.tar.gz: 2e51ac9a3da91b19a1ae643425777db4bcd3ec4d88cf1fecf2f8850b7a62b3581760b5745de931e6cbcd80d48fc271cb4644ac76b1daa2a334aeb197c2c59749
data/lib/defaults.rb CHANGED
@@ -10,8 +10,10 @@ module Ffmprb
10
10
  Process.duck_audio_volume_lo = 0.1
11
11
  Process.timeout = 30
12
12
 
13
+ Process.input_options = {noautorotate: true}
14
+
13
15
  Process.output_video_resolution = CGA
14
- Process.output_video_fps = 30
16
+ Process.output_video_fps = 16
15
17
  Process.output_audio_encoder = 'libmp3lame'
16
18
 
17
19
  Util.ffmpeg_cmd = %w[ffmpeg -y]
data/lib/ffmprb/file.rb CHANGED
@@ -174,7 +174,7 @@ module Ffmprb
174
174
  end
175
175
 
176
176
  def image_extname?
177
- extname =~ /^\.(jpe?g|png|y4m)$/i
177
+ extname =~ /^\.(jpe?g|a?png|y4m)$/i
178
178
  end
179
179
 
180
180
  def sound_extname?
@@ -9,6 +9,8 @@ module Ffmprb
9
9
  attr_accessor :duck_audio_transition_length,
10
10
  :duck_audio_transition_in_start, :duck_audio_transition_out_start
11
11
 
12
+ attr_accessor :input_options
13
+
12
14
  attr_accessor :output_video_resolution
13
15
  attr_accessor :output_video_fps
14
16
  attr_accessor :output_audio_encoder
@@ -92,8 +94,8 @@ module Ffmprb
92
94
  fail Error, "Unknown options: #{opts}" unless opts.empty?
93
95
  end
94
96
 
95
- def input(io)
96
- Input.new(io, self).tap do |inp|
97
+ def input(io, **opts)
98
+ Input.new(io, self, **self.class.input_options.merge(opts)).tap do |inp|
97
99
  @inputs << inp
98
100
  end
99
101
  end
@@ -24,9 +24,10 @@ module Ffmprb
24
24
  attr_accessor :io
25
25
  attr_reader :process
26
26
 
27
- def initialize(io, process)
27
+ def initialize(io, process, **opts)
28
28
  @io = self.class.resolve(io)
29
29
  @process = process
30
+ @opts = opts
30
31
  end
31
32
 
32
33
 
@@ -36,8 +37,13 @@ module Ffmprb
36
37
 
37
38
 
38
39
  def options
39
- defaults = %w[-noautorotate -thread_queue_size 32 -i] # TODO parameterise
40
- defaults + [io.path]
40
+ opts = []
41
+ @opts.map do |name, value|
42
+ next unless value
43
+ opts << "-#{name}"
44
+ opts << value unless value == true
45
+ end
46
+ opts << '-i' << io.path
41
47
  end
42
48
 
43
49
  def filters_for(lbl, video:, audio:)
@@ -1,3 +1,3 @@
1
1
  module Ffmprb
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffmprb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - showbox.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-11-01 00:00:00.000000000 Z
12
+ date: 2015-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mkfifo