ez_video 1.0.1 → 1.0.2

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.
@@ -150,7 +150,7 @@ module RVideo # :nodoc:
150
150
  # t.capture_frame('10%') # => '/path/to/screenshot/input-10p.jpg'
151
151
  #
152
152
 
153
- def capture_frame(timecode, output_file = nil)
153
+ def capture_frame(timecode, output_file = nil, dimension=nil)
154
154
  t = calculate_time(timecode)
155
155
  unless output_file
156
156
  output_file = "#{TEMP_PATH}/#{File.basename(@full_filename, ".*")}-#{timecode.gsub("%","p")}.jpg"
@@ -158,7 +158,9 @@ module RVideo # :nodoc:
158
158
  # do the work
159
159
  # mplayer $input_file$ -ss $start_time$ -frames 1 -vo jpeg -o $output_file$
160
160
  # ffmpeg -i $input_file$ -v nopb -ss $start_time$ -b $bitrate$ -an -vframes 1 -y $output_file$
161
- command = "ffmpeg -i #{@full_filename} -ss #{t} -t 00:00:01 -r 1 -vframes 1 -f image2 #{output_file}"
161
+ dimension_option=""
162
+ dimension_option="-s #{dimension}" unless dimension.nil?
163
+ command = "ffmpeg -i #{@full_filename} -ss #{t} -t 00:00:01 -r 1 -vframes 1 #{dimension_option} -f image2 #{output_file}"
162
164
  Transcoder.logger.info("\nCreating Screenshot: #{command}\n")
163
165
  frame_result = `#{command} 2>&1`
164
166
 
@@ -2,7 +2,7 @@ module RVideo #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez_video
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: