viddl 0.0.8 → 0.0.10

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: cd33b2c5bcff4b999a13d30cd1977df8a7f31899
4
- data.tar.gz: dfa1b3f7b6754937e04161f5c7e4724dd77e588f
3
+ metadata.gz: d8036485a4484ac0bcf98502b2ff6044c7fa77c9
4
+ data.tar.gz: 51caad29c7c23014c75e6efb511f127d97f432e0
5
5
  SHA512:
6
- metadata.gz: 851f28475638e1648ea05bf6060afe1f7a6a2adf6ce7d1733c2767e2ef39cb9f7d702a96daead7067fcc09ce024b4b7f5b2ef6b90f0b4c76fc7816c4a726cae6
7
- data.tar.gz: 8a08108deac82d0f7f958764d94ad200173ec4712921e21ac3dc84322e66fde4e9434583555e654de184ed06f70e19742e919bce58b7838e4ed84d7040f56b5f
6
+ metadata.gz: 1b1a42f32432edb76dc663a9564f0d2ca5fb49e5c257fa5377a97f1696df181e855e1785817061c08eeab4b52e7edaf126d1b1517552bafe3ec4149824ee37f6
7
+ data.tar.gz: c1db4ed9ecb5ce81287a921a9a1f3779a6ab5e105e6039e59c70461c119e9bc702d2184ea8bb4846caf856c9aea7f08af41813f7e8044d9d2751dc697e2d689d
data/lib/viddl.rb CHANGED
@@ -17,6 +17,6 @@ module Viddl
17
17
 
18
18
  extend self
19
19
 
20
- VERSION = "0.0.8"
20
+ VERSION = "0.0.10"
21
21
 
22
22
  end
@@ -17,6 +17,7 @@ module Viddl
17
17
  # @param [String] source_path Path to video file to create clip from
18
18
  # @param [Hash] options
19
19
  # @option options [Boolean] :audio Whether to include audio
20
+ # @option options [String] :flags Flags to pass to ffmpeg
20
21
  # @option options [Numeric] :start Time in the source file where the clip starts
21
22
  # @option options [Numeric] :duration Duration of the clip
22
23
  # @option options [Numeric] :end Time in the source file where the clip ends
@@ -39,6 +40,7 @@ module Viddl
39
40
  # Create a clip using the given options
40
41
  # @param [Hash] options
41
42
  # @option options [Boolean] :audio Whether to include audio
43
+ # @option options [String] :flags Flags to pass to ffmpeg
42
44
  # @option options [Numeric] :start Time in the source file where the clip starts
43
45
  # @option options [Numeric] :duration Duration of the clip
44
46
  # @option options [Numeric] :end Time in the source file where the clip ends
@@ -65,6 +67,7 @@ module Viddl
65
67
  # Command line to create a clip from the source file and given options
66
68
  # @param [Hash] options
67
69
  # @option options [Boolean] :audio Whether to include audio
70
+ # @option options [String] :flags Flags to pass to ffmpeg
68
71
  # @option options [Numeric] :start Time in the source file where the clip starts
69
72
  # @option options [Numeric] :duration Duration of the clip
70
73
  # @option options [Numeric] :end Time in the source file where the clip ends
@@ -94,13 +97,14 @@ module Viddl
94
97
  end
95
98
 
96
99
  populate_output_path(formatted_opts)
97
- "ffmpeg -i #{@source_path} #{module_arg_string} #{@path.to_s}"
100
+ "ffmpeg -i #{@source_path} #{module_arg_string} #{options[:flags]} #{@path.to_s}"
98
101
  end
99
102
  end
100
103
 
101
104
  # Options formatted for ffmpeg
102
105
  # @param [Hash] options
103
106
  # @option options [Boolean] :audio Whether to include audio (default: true)
107
+ # @option options [String] :flags Flags to pass to ffmpeg
104
108
  # @option options [Numeric] :start Time in the source file where the clip starts
105
109
  # @option options [Numeric] :duration Duration of the clip
106
110
  # @option options [Numeric] :end Time in the source file where the clip ends
@@ -112,13 +116,16 @@ module Viddl
112
116
  options.delete_if { |k, v| v.nil? }
113
117
  mod_options = MODULES.map { |mod| mod.options_formatted(options) }
114
118
  formatted_options = mod_options.inject(:merge)
115
- formatted_options[:output_path] = options[:output_path]
119
+ [:flags, :output_path].each do |option|
120
+ formatted_options[option] = options[option] unless options[option].nil?
121
+ end
116
122
  formatted_options
117
123
  end
118
124
 
119
125
  # Set the clip path
120
126
  # @param [Hash] options
121
127
  # @option options [Boolean] :audio Whether to include audio
128
+ # @option options [String] :flags Flags to pass to ffmpeg
122
129
  # @option options [Numeric] :start Time in the source file where the clip starts
123
130
  # @option options [Numeric] :duration Duration of the clip
124
131
  # @option options [Integer, String] :width The desired width to resize to
@@ -21,6 +21,7 @@ module Viddl
21
21
  # Cut the video source using the given options
22
22
  # @param [Hash] options
23
23
  # @option options [Boolean] :audio Whether to include audio
24
+ # @option options [String] :flags Flags to pass to ffmpeg
24
25
  # @option options [Numeric] :start Time in the source file where the clip starts
25
26
  # @option options [Numeric] :duration Duration of the clip
26
27
  # @option options [Numeric] :end Time in the source file where the clip ends
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Russo