kakra-rvideo 0.9.6.11 → 0.9.6.12

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.
@@ -0,0 +1,38 @@
1
+ module RVideo
2
+ module Tools
3
+ class Flac
4
+ include AbstractTool::InstanceMethods
5
+
6
+ attr_reader :raw_metadata
7
+
8
+ def tool_command
9
+ 'flac'
10
+ end
11
+
12
+ private
13
+
14
+ def parse_result(result)
15
+ if m = /wrote \d+ bytes, ratio=/.match(result)
16
+ @raw_metadata = result
17
+ return true
18
+ end
19
+
20
+ if m = /No such file or directory/.match(result)
21
+ raise TranscoderError::InputFileNotFound
22
+ end
23
+
24
+ if m = /for encoding a raw file you must specify/.match(result)
25
+ raise TranscoderError::InvalidFile, "input file must be a valid audio file"
26
+ end
27
+
28
+ if m = /this is the short help/i.match(result)
29
+ raise TranscoderError::InvalidCommand, "command printed flac help text (and presumably didn't execute)"
30
+ end
31
+
32
+ raise TranscoderError::UnexpectedResult, result
33
+ end
34
+
35
+ end
36
+ end
37
+ end
38
+
@@ -0,0 +1,45 @@
1
+ module RVideo
2
+ module Tools
3
+ class Mp4file
4
+ include AbstractTool::InstanceMethods
5
+
6
+ attr_reader :raw_metadata
7
+
8
+ def tool_command
9
+ 'mp4file'
10
+ end
11
+
12
+ private
13
+
14
+ def parse_result(result)
15
+ if result.empty?
16
+ @raw_metadata = "OK"
17
+ return true
18
+ end
19
+
20
+ if m = /MP4ERROR: MP4Open: failed: No such file or directory\n/.match(result)
21
+ raise TranscoderError::InputFileNotFound
22
+ end
23
+
24
+ if m = /ReadAtom: invalid atom size/.match(result)
25
+ raise TranscoderError::InvalidFile, "input must be a valid MP4 file"
26
+ end
27
+
28
+ if m = /usage: mp4file /i.match(result)
29
+ raise TranscoderError::InvalidCommand, "command printed mp4file help text (and presumably didn't execute)"
30
+ end
31
+
32
+ # FIXME this is problematic if mp4file is part of a recipe chain and $output_file$ is not the final
33
+ # result file but instead this tool just creates an intermediate/temporary file - this should be checked
34
+ # at the end of the result chain
35
+ #if @options['output_file'] && !File.exist?(@options['output_file'])
36
+ raise TranscoderError::UnexpectedResult, "An unknown error has occured with mp4file:#{result}"
37
+ #end
38
+
39
+ @raw_metadata = result.empty? ? "No Results" : result
40
+ return true
41
+ end
42
+
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,43 @@
1
+ module RVideo
2
+ module Tools
3
+ class Normalize
4
+ include AbstractTool::InstanceMethods
5
+
6
+ attr_reader :raw_metadata
7
+
8
+ def tool_command
9
+ 'normalize'
10
+ end
11
+
12
+ private
13
+
14
+ def parse_result(result)
15
+ if m = /already normalized, not adjusting/.match(result)
16
+ @raw_metadata = result
17
+ return true
18
+ end
19
+
20
+ if m = /Applying adjustment of/.match(result)
21
+ @raw_metadata = result
22
+ return true
23
+ end
24
+
25
+ if m = /No such file or directory/.match(result)
26
+ raise TranscoderError::InputFileNotFound
27
+ end
28
+
29
+ if m = /unrecognized audio file format/.match(result)
30
+ raise TranscoderError::InvalidFile, "input file must be a valid wav file"
31
+ end
32
+
33
+ if m = /usage: normalize /i.match(result)
34
+ raise TranscoderError::InvalidCommand, "command printed normalize help text (and presumably didn't execute)"
35
+ end
36
+
37
+ raise TranscoderError::UnexpectedResult, result
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,26 @@
1
+ module RVideo
2
+ module Tools
3
+ class Rm
4
+ include AbstractTool::InstanceMethods
5
+
6
+ attr_reader :raw_metadata
7
+
8
+ def tool_command
9
+ 'rm'
10
+ end
11
+
12
+ private
13
+
14
+ def parse_result(result)
15
+ if result.empty?
16
+ @raw_metadata = "OK"
17
+ return true
18
+ end
19
+
20
+ raise TranscoderError::UnexpectedResult, result
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+
data/rvideo.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rvideo}
5
- s.version = "0.9.6.11"
5
+ s.version = "0.9.6.12"
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"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Inspect and transcode video and audio files.}
11
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
- 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"]
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/tools/flac.rb", "lib/rvideo/tools/mp4file.rb", "lib/rvideo/tools/rm.rb", "lib/rvideo/tools/normalize.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
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"]
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.11
4
+ version: 0.9.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling, Jonathan Dahl (Slantwise Design), Seth Thomas Rasmussen, Kai Krakow
@@ -94,6 +94,10 @@ files:
94
94
  - lib/rvideo/tools/mplayer.rb
95
95
  - lib/rvideo/tools/qtfaststart.rb
96
96
  - lib/rvideo/tools/yamdi.rb
97
+ - lib/rvideo/tools/flac.rb
98
+ - lib/rvideo/tools/mp4file.rb
99
+ - lib/rvideo/tools/rm.rb
100
+ - lib/rvideo/tools/normalize.rb
97
101
  - lib/rvideo/transcoder.rb
98
102
  - lib/rvideo/version.rb
99
103
  - lib/rvideo.rb