mkv2m4v 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mkv2m4v
1
+ # mkv2m4v [![Gem Version](https://badge.fury.io/rb/mkv2m4v.png)](http://badge.fury.io/rb/mkv2m4v) [![Code Climate](https://codeclimate.com/github/rmm5t/mkv2m4v.png)](https://codeclimate.com/github/rmm5t/mkv2m4v)
2
2
 
3
3
  Converts audio and video tracks from a MKV (Matroska Media) container into a
4
4
  format compatible with Apple TVs.
@@ -52,6 +52,7 @@ module Mkv2m4v
52
52
  score += (track.channel_count || 0) / 8.0 * 2.0
53
53
  score += (track.bit_rate_kbps || 0) / 1500.0 * 2.0
54
54
  score += 4 if language_match?(track)
55
+ score *= -1 unless ["DTS", "AC-3", "AAC"].include?(track.format)
55
56
  score
56
57
  end
57
58
  end
@@ -32,7 +32,7 @@ module Mkv2m4v
32
32
  command << " #{escape(@file.filename)}"
33
33
  command << " #{video_id}:#{escape(video_file)}"
34
34
  command << " #{audio_id}:#{escape(audio_file)}"
35
- system command
35
+ sh command
36
36
  end
37
37
 
38
38
  def transcode_avc
@@ -52,7 +52,7 @@ module Mkv2m4v
52
52
  command << " -i #{escape(audio_file)}"
53
53
  command << " -acodec libfaac -ac 2 -ab 160k"
54
54
  command << " #{escape(audio_basename)}.aac"
55
- system command
55
+ sh command
56
56
  end
57
57
  end
58
58
 
@@ -68,7 +68,7 @@ module Mkv2m4v
68
68
  command << " -i #{escape(audio_file)}"
69
69
  command << " -acodec ac3 -ac #{max_audio_channels} -ab #{max_audio_bit_rate}k"
70
70
  command << " #{escape(audio_basename)}.ac3"
71
- system command
71
+ sh command
72
72
  end
73
73
  end
74
74
 
@@ -81,8 +81,7 @@ module Mkv2m4v
81
81
  command << " -add #{escape(audio_basename)}.ac3:lang=#{audio_language.alpha3_terminology}:group=1:delay=84:disable:name=\"AC3\" "
82
82
  end
83
83
  command << " -new #{escape(m4v_file)}"
84
- puts command
85
- system command
84
+ sh command
86
85
  end
87
86
 
88
87
  def cleanup
@@ -165,6 +164,11 @@ module Mkv2m4v
165
164
  Shellwords.escape(str)
166
165
  end
167
166
 
167
+ def sh(command)
168
+ puts command
169
+ system command
170
+ end
171
+
168
172
  UnknownLanguage = Iso639::Language.new("", "", "", "", "")
169
173
  end
170
174
  end
@@ -1,5 +1,5 @@
1
1
  module Mkv2m4v
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
 
4
4
  VersionDescription = "mkv2m4v #{VERSION} (c) 2012-2013 Ryan McGeary"
5
5
  Description = <<EOS
data/mkv2m4v.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.description = Mkv2m4v::Description
12
12
  gem.summary = %q{Makes Apple TV compatible videos}
13
13
  gem.homepage = "https://github.com/rmm5t/mkv2m4v"
14
+ gem.license = "MIT"
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: mkv2m4v
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ryan McGeary
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-27 00:00:00.000000000 Z
12
+ date: 2013-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
@@ -136,7 +136,8 @@ files:
136
136
  - mkv2m4v.gemspec
137
137
  - test/test_helper.rb
138
138
  homepage: https://github.com/rmm5t/mkv2m4v
139
- licenses: []
139
+ licenses:
140
+ - MIT
140
141
  post_install_message:
141
142
  rdoc_options: []
142
143
  require_paths: