kakra-rvideo 0.9.6.6 → 0.9.6.7
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.
- data/lib/rvideo/frame_capturer.rb +7 -8
- data/lib/rvideo/inspector.rb +3 -3
- data/lib/rvideo/tools/ffmpeg.rb +2 -2
- data/rvideo.gemspec +4 -4
- data/spec/units/ffmpeg_spec.rb +6 -0
- data/spec/units/frame_capturer_spec.rb +1 -1
- metadata +4 -4
|
@@ -50,7 +50,7 @@ module RVideo
|
|
|
50
50
|
|
|
51
51
|
@offset, @rate, @limit, @output = parse_options options
|
|
52
52
|
|
|
53
|
-
@command = "ffmpeg -i #{@input.shell_quoted} -ss #{@offset} -r #{@rate} -f image2 -vframes
|
|
53
|
+
@command = "ffmpeg -i #{@input.shell_quoted} -ss #{@offset} -r #{@rate} -f image2 #{"-vframes #{@limit} " if @limit}#{@output.shell_quoted}"
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def capture!
|
|
@@ -100,12 +100,11 @@ module RVideo
|
|
|
100
100
|
offset = options[:offset] ? calculate_time(options[:offset]) : 0
|
|
101
101
|
rate = options[:interval] ? (1 / options[:interval].to_f) : 1
|
|
102
102
|
|
|
103
|
-
limit =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# end
|
|
103
|
+
limit = if options[:limit]
|
|
104
|
+
options[:limit]
|
|
105
|
+
elsif not options[:interval]
|
|
106
|
+
1
|
|
107
|
+
end
|
|
109
108
|
|
|
110
109
|
output = if options[:output]
|
|
111
110
|
options[:output]
|
|
@@ -126,4 +125,4 @@ module RVideo
|
|
|
126
125
|
[offset, rate, limit, output]
|
|
127
126
|
end
|
|
128
127
|
end
|
|
129
|
-
end
|
|
128
|
+
end
|
data/lib/rvideo/inspector.rb
CHANGED
|
@@ -466,13 +466,13 @@ module RVideo # :nodoc:
|
|
|
466
466
|
Video:\s*
|
|
467
467
|
#{VAL}#{SEP} # codec
|
|
468
468
|
(?:#{VAL}#{SEP})? # color space
|
|
469
|
-
(\d+)x(\d+)
|
|
469
|
+
(\d+)x(\d+)#{SEP}? # resolution
|
|
470
470
|
(?:\s*\[?(?:PAR\s*(\d+:\d+))?\s*(?:DAR\s*(\d+:\d+))?\]?)? # pixel and display aspect ratios
|
|
471
471
|
#{SEP}?
|
|
472
472
|
(?:#{RATE}\s*(kb\/s)#{SEP}?)? # video bit rate
|
|
473
473
|
(?:#{RATE}\s*(?:tb\(?r\)?|#{FPS})#{SEP}?)? # frame rate
|
|
474
|
-
(?:#{RATE}\s*
|
|
475
|
-
(?:#{RATE}\s*
|
|
474
|
+
(?:#{RATE}\s*tb\(?n\)?#{SEP}?)? # time base
|
|
475
|
+
(?:#{RATE}\s*tb\(?c\)?#{SEP}?)? # codec time base
|
|
476
476
|
/x
|
|
477
477
|
|
|
478
478
|
def video_match
|
data/lib/rvideo/tools/ffmpeg.rb
CHANGED
|
@@ -122,8 +122,8 @@ module RVideo
|
|
|
122
122
|
|
|
123
123
|
def get_resolution
|
|
124
124
|
if @options['resolution'] && @options['resolution'].match(/(\d+)x(\d+)/)
|
|
125
|
-
options['width'] = $1
|
|
126
|
-
options['height'] = $2
|
|
125
|
+
@options['width'] = $1
|
|
126
|
+
@options['height'] = $2
|
|
127
127
|
get_specific_resolution
|
|
128
128
|
else
|
|
129
129
|
super
|
data/rvideo.gemspec
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{rvideo}
|
|
5
|
-
s.version = "0.9.6.
|
|
5
|
+
s.version = "0.9.6.7"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Peter Boling, Jonathan Dahl (Slantwise Design), Seth Thomas Rasmussen, Kai Krakow"]
|
|
9
|
-
s.date = %q{2009-
|
|
9
|
+
s.date = %q{2009-07-03}
|
|
10
10
|
s.description = %q{Inspect and transcode video and audio files.}
|
|
11
|
-
s.email = %q{
|
|
11
|
+
s.email = %q{hurikhan77@gmail.com}
|
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/rvideo/errors.rb", "lib/rvideo/float.rb", "lib/rvideo/frame_capturer.rb", "lib/rvideo/inspector.rb", "lib/rvideo/reporter/views/index.html.erb", "lib/rvideo/reporter/views/report.css", "lib/rvideo/reporter/views/report.html.erb", "lib/rvideo/reporter/views/report.js", "lib/rvideo/reporter.rb", "lib/rvideo/string.rb", "lib/rvideo/tools/abstract_tool.rb", "lib/rvideo/tools/ffmpeg.rb", "lib/rvideo/tools/ffmpeg2theora.rb", "lib/rvideo/tools/flvtool2.rb", "lib/rvideo/tools/mencoder.rb", "lib/rvideo/tools/mp4box.rb", "lib/rvideo/tools/mp4creator.rb", "lib/rvideo/tools/mplayer.rb", "lib/rvideo/tools/qtfaststart.rb", "lib/rvideo/tools/yamdi.rb", "lib/rvideo/transcoder.rb", "lib/rvideo/version.rb", "lib/rvideo.rb", "LICENSE", "README", "tasks/deployment.rake", "tasks/testing.rake", "tasks/transcoding.rake", "tasks/website.rake"]
|
|
13
13
|
s.files = ["CHANGELOG", "config/boot.rb", "ENV", "ENV2", "lib/rvideo/errors.rb", "lib/rvideo/float.rb", "lib/rvideo/frame_capturer.rb", "lib/rvideo/inspector.rb", "lib/rvideo/reporter/views/index.html.erb", "lib/rvideo/reporter/views/report.css", "lib/rvideo/reporter/views/report.html.erb", "lib/rvideo/reporter/views/report.js", "lib/rvideo/reporter.rb", "lib/rvideo/string.rb", "lib/rvideo/tools/abstract_tool.rb", "lib/rvideo/tools/ffmpeg.rb", "lib/rvideo/tools/ffmpeg2theora.rb", "lib/rvideo/tools/flvtool2.rb", "lib/rvideo/tools/mencoder.rb", "lib/rvideo/tools/mp4box.rb", "lib/rvideo/tools/mp4creator.rb", "lib/rvideo/tools/mplayer.rb", "lib/rvideo/tools/qtfaststart.rb", "lib/rvideo/tools/yamdi.rb", "lib/rvideo/transcoder.rb", "lib/rvideo/version.rb", "lib/rvideo.rb", "LICENSE", "Manifest", "Rakefile", "README", "RULES", "rvideo.gemspec", "scripts/txt2html", "setup.rb", "spec/files/boat.avi", "spec/files/kites.mp4", "spec/fixtures/ffmpeg_builds.yml", "spec/fixtures/ffmpeg_results.yml", "spec/fixtures/files.yml", "spec/fixtures/recipes.yml", "spec/integrations/formats_spec.rb", "spec/integrations/frame_capturer_spec.rb", "spec/integrations/inspection_spec.rb", "spec/integrations/recipes_spec.rb", "spec/integrations/rvideo_spec.rb", "spec/integrations/transcoder_integration_spec.rb", "spec/integrations/transcoding_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/support.rb", "spec/units/abstract_tool_spec.rb", "spec/units/ffmpeg_spec.rb", "spec/units/flvtool2_spec.rb", "spec/units/frame_capturer_spec.rb", "spec/units/inspector_spec.rb", "spec/units/mencoder_spec.rb", "spec/units/mp4box_spec.rb", "spec/units/mp4creator_spec.rb", "spec/units/mplayer_spec.rb", "spec/units/qtfaststart_spec.rb", "spec/units/string_spec.rb", "spec/units/transcoder_spec.rb", "tasks/deployment.rake", "tasks/testing.rake", "tasks/transcoding.rake", "tasks/website.rake"]
|
|
14
14
|
s.has_rdoc = true
|
|
15
|
-
s.homepage = %q{http://github.com/
|
|
15
|
+
s.homepage = %q{http://github.com/kakra/rvideo}
|
|
16
16
|
s.rdoc_options = ["--quiet", "--title", "rvideo documentation", "--opname", "index.html", "--line-numbers", "--main", "README", "--inline-source"]
|
|
17
17
|
s.require_paths = ["lib"]
|
|
18
18
|
s.rubyforge_project = %q{rvideo}
|
data/spec/units/ffmpeg_spec.rb
CHANGED
|
@@ -81,6 +81,12 @@ module RVideo
|
|
|
81
81
|
ffmpeg.command.should == "ffmpeg -i '#{@options[:input_file]}' -ar 44100 -ab 64 -vcodec xvid -acodec libmp3lame -r 29.97 -s 480x360 -y '#{@options[:output_file]}'"
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
it 'supports :resolution' do
|
|
85
|
+
@options.merge! :resolution => "640x360"
|
|
86
|
+
ffmpeg = Ffmpeg.new("ffmpeg -i $input_file$ -ar 44100 -ab 64 -vcodec xvid -acodec libmp3lame -r 29.97 $resolution$ -y $output_file$", @options)
|
|
87
|
+
ffmpeg.command.should == "ffmpeg -i '#{@options[:input_file]}' -ar 44100 -ab 64 -vcodec xvid -acodec libmp3lame -r 29.97 -s 640x360 -y '#{@options[:output_file]}'"
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
###
|
|
85
91
|
|
|
86
92
|
it 'supports :video_bit_rate' do
|
|
@@ -65,7 +65,7 @@ describe FrameCapturer, "calculating offset from a timecode argument" do
|
|
|
65
65
|
f = FrameCapturer.new :input => spec_file('kites.mp4'),
|
|
66
66
|
:interval => 5
|
|
67
67
|
assert_equal \
|
|
68
|
-
%{ffmpeg -i '#{f.input}' -ss 0 -r 0.2 -f image2
|
|
68
|
+
%{ffmpeg -i '#{f.input}' -ss 0 -r 0.2 -f image2 '#{f.output}'},
|
|
69
69
|
f.command
|
|
70
70
|
end
|
|
71
71
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kakra-rvideo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.6.
|
|
4
|
+
version: 0.9.6.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Boling, Jonathan Dahl (Slantwise Design), Seth Thomas Rasmussen, Kai Krakow
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-07-03 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -33,7 +33,7 @@ dependencies:
|
|
|
33
33
|
version: "0"
|
|
34
34
|
version:
|
|
35
35
|
description: Inspect and transcode video and audio files.
|
|
36
|
-
email:
|
|
36
|
+
email: hurikhan77@gmail.com
|
|
37
37
|
executables: []
|
|
38
38
|
|
|
39
39
|
extensions: []
|
|
@@ -138,7 +138,7 @@ files:
|
|
|
138
138
|
- tasks/transcoding.rake
|
|
139
139
|
- tasks/website.rake
|
|
140
140
|
has_rdoc: true
|
|
141
|
-
homepage: http://github.com/
|
|
141
|
+
homepage: http://github.com/kakra/rvideo
|
|
142
142
|
post_install_message:
|
|
143
143
|
rdoc_options:
|
|
144
144
|
- --quiet
|