video_transcoding 0.21.0 → 0.21.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.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/bin/convert-video +3 -3
- data/bin/transcode-video +9 -3
- data/lib/video_transcoding/handbrake.rb +36 -0
- data/lib/video_transcoding/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d5b8d915baa00f225ed048693db2d56211f11be8b8ed7fde1a67a71ee90abb7
|
4
|
+
data.tar.gz: c5cb49798fcea529d7ec5a0903f088e726a54b97bec98f2a48bc918777279136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0771776f309d423d0fc2e324521c8484adf18bd1b3b348df23c856cc9d1439ee2135c53122ddb4eeb6f58aa8f6160b036a8bc3535e4ae217471d0c7db18d7862
|
7
|
+
data.tar.gz: a7b1508028c17f07e1ac9da18c4a2ddb06d5bd5d56d08965739b66ce64fb3f22bb5a4ab17152830715934ff5e58cb40ace75d60c2d3bce991813b69702a0be99
|
data/README.md
CHANGED
@@ -689,6 +689,14 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976
|
|
689
689
|
|
690
690
|
## History
|
691
691
|
|
692
|
+
### [0.21.1](https://github.com/donmelton/video_transcoding/releases/tag/0.21.1)
|
693
|
+
|
694
|
+
Sunday, December 2, 2018
|
695
|
+
|
696
|
+
* Fix a bug in `transcode-video` creating MP3 instead of AAC audio in MKV output on Windows. This was caused by a previous optimization not passing a named AAC audio encoder to `HandBrakeCLI`, i.e. `ca_aac` or `av_aac`. Apparently the default is different on Windows. Go figure. Thanks, [@samhutchins](https://github.com/samhutchins)! Via [ #235](https://github.com/donmelton/video_transcoding/issues/235).
|
697
|
+
* Add a workaround in `transcode-video` for HandBrake nightly builds not setting the mixdown of multichannel audio track inputs to Dolby Pro Logic II format at 160 Kbps when the output is AAC stereo. Apparently the new default for that type of input is 5.1 channels at 384 Kbps, which wouldn't play on most Roku or Apple TV devices without re-transcoding or non-standard software. Again, go figure.
|
698
|
+
* Add a workaround in `transcode-video` and `convert-video` for HandBrake nightly builds not copying mono or stereo audio track inputs which are already in AAC format.
|
699
|
+
|
692
700
|
### [0.21.0](https://github.com/donmelton/video_transcoding/releases/tag/0.21.0)
|
693
701
|
|
694
702
|
Friday, November 9, 2018
|
data/bin/convert-video
CHANGED
@@ -130,7 +130,7 @@ HERE
|
|
130
130
|
if @double and media.info[:audio][1][:channels] > 2.0
|
131
131
|
if track_order.size > 1 and
|
132
132
|
media.info[:audio][1][:language] == media.info[:audio][2][:language] and
|
133
|
-
media.info[:audio][2][:format]
|
133
|
+
media.info[:audio][2][:format] =~ /^AAC/ and
|
134
134
|
media.info[:audio][2][:channels] <= 2.0
|
135
135
|
first = track_order[0]
|
136
136
|
track_order[0] = track_order[1]
|
@@ -161,7 +161,7 @@ HERE
|
|
161
161
|
"-b:a:#{stream}", '640k'
|
162
162
|
])
|
163
163
|
elsif media.info[:audio][track][:channels] <= 2.0 and
|
164
|
-
media.info[:audio][track][:format]
|
164
|
+
not media.info[:audio][track][:format] =~ /^AAC/ and
|
165
165
|
not ac3_format?(media.info[:audio][track][:format])
|
166
166
|
copy_options.concat([
|
167
167
|
"-ac:a:#{stream}", '2',
|
@@ -294,7 +294,7 @@ HERE
|
|
294
294
|
if @double and
|
295
295
|
track_order.size > 1 and
|
296
296
|
media.info[:audio][1][:language] == media.info[:audio][2][:language] and
|
297
|
-
media.info[:audio][1][:format]
|
297
|
+
media.info[:audio][1][:format] =~ /^AAC/ and
|
298
298
|
media.info[:audio][1][:channels] <= 2.0 and
|
299
299
|
media.info[:audio][2][:channels] > 2.0
|
300
300
|
first = track_order[0]
|
data/bin/transcode-video
CHANGED
@@ -1031,7 +1031,7 @@ HERE
|
|
1031
1031
|
end
|
1032
1032
|
end
|
1033
1033
|
|
1034
|
-
tracks, encoders, bitrates, names = [], [], [], []
|
1034
|
+
tracks, encoders, bitrates, mixdowns, names = [], [], [], [], []
|
1035
1035
|
|
1036
1036
|
add_surround = ->(info, copy) do
|
1037
1037
|
bitrate = info[:bps].nil? ? 640 : info[:bps] / 1000
|
@@ -1052,14 +1052,18 @@ HERE
|
|
1052
1052
|
bitrates << @ac3_bitrate.to_s
|
1053
1053
|
end
|
1054
1054
|
end
|
1055
|
+
|
1056
|
+
mixdowns << ''
|
1055
1057
|
end
|
1056
1058
|
|
1057
1059
|
add_stereo = ->(info, copy) do
|
1058
|
-
if copy or (info[:format]
|
1060
|
+
if copy or (info[:format] =~ /^AAC/ and info[:channels] <= 2.0)
|
1059
1061
|
encoders << 'copy'
|
1062
|
+
mixdowns << ''
|
1060
1063
|
else
|
1061
|
-
@aac_encoder ||=
|
1064
|
+
@aac_encoder ||= HandBrake.aac_encoder
|
1062
1065
|
encoders << @aac_encoder
|
1066
|
+
mixdowns << (info[:channels] > 2.0 ? 'dpl2' : '')
|
1063
1067
|
end
|
1064
1068
|
|
1065
1069
|
bitrates << ''
|
@@ -1112,6 +1116,8 @@ HERE
|
|
1112
1116
|
handbrake_options['audio-fallback'] = @ac3_encoder unless @copy_audio.empty?
|
1113
1117
|
bitrates = bitrates.join(',')
|
1114
1118
|
handbrake_options['ab'] = bitrates if bitrates.gsub(/,/, '') != ''
|
1119
|
+
mixdowns = mixdowns.join(',')
|
1120
|
+
handbrake_options['mixdown'] = mixdowns if mixdowns.gsub(/,/, '') != ''
|
1115
1121
|
names = names.join(',')
|
1116
1122
|
handbrake_options['aname'] = names if names.gsub(/,/, '') != ''
|
1117
1123
|
end
|
@@ -26,5 +26,41 @@ module VideoTranscoding
|
|
26
26
|
def command_name
|
27
27
|
Tool.use(COMMAND_NAME)
|
28
28
|
end
|
29
|
+
|
30
|
+
def aac_encoder
|
31
|
+
properties = Tool.properties(COMMAND_NAME)
|
32
|
+
|
33
|
+
unless properties.has_key? :aac_encoder
|
34
|
+
if help_text =~ /ca_aac/
|
35
|
+
properties[:aac_encoder] = 'ca_aac'
|
36
|
+
else
|
37
|
+
properties[:aac_encoder] = 'av_aac'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
properties[:aac_encoder]
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def help_text
|
47
|
+
properties = Tool.properties(COMMAND_NAME)
|
48
|
+
|
49
|
+
unless properties.has_key? :help_text
|
50
|
+
properties[:help_text] = ''
|
51
|
+
|
52
|
+
begin
|
53
|
+
IO.popen([Tool.use(COMMAND_NAME), '--help'], :err=>[:child, :out]) do |io|
|
54
|
+
properties[:help_text] = io.read
|
55
|
+
end
|
56
|
+
rescue SystemCallError => e
|
57
|
+
raise "#{COMMAND_NAME} help text unavailable: #{e}"
|
58
|
+
end
|
59
|
+
|
60
|
+
fail "#{COMMAND_NAME} failed during execution" unless $CHILD_STATUS.exitstatus == 0
|
61
|
+
end
|
62
|
+
|
63
|
+
properties[:help_text]
|
64
|
+
end
|
29
65
|
end
|
30
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_transcoding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Melton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Video Transcoding is a package of tools to transcode, inspect
|