mkv2m4v 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/mkv2m4v/track_ranker.rb +1 -0
- data/lib/mkv2m4v/transcoder.rb +9 -5
- data/lib/mkv2m4v/version.rb +1 -1
- data/mkv2m4v.gemspec +1 -0
- metadata +4 -3
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.
|
data/lib/mkv2m4v/track_ranker.rb
CHANGED
data/lib/mkv2m4v/transcoder.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/mkv2m4v/version.rb
CHANGED
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.
|
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-
|
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:
|