video_transcoding 0.5.1 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c228704a28bdfc0fcc86e1bab03106c34c7b92cd
4
- data.tar.gz: 6d86557aae17cce47fc0db4692d72bc0cc0ff8bf
3
+ metadata.gz: 7e1eab23f13cde11a9882596e7357a7b9170a060
4
+ data.tar.gz: 7d73d07d2765345777c7d0cec42004d09508097b
5
5
  SHA512:
6
- metadata.gz: 6230729bd71adb9bd9b7bfe85ce26d1528c32d23409fdecf1a75178a8e38307c52bffd7b0d35451402502723bd98cca34116f85005490e77ab36d8f91b96c7b2
7
- data.tar.gz: cdaf3c5804952e883bc897e6462f851b34ff156c8fda5603ead93c299047363a00b2dc424b5e4167d8e44436a1270f8d54421f80dd3cfc4cd00818b2a6f1214c
6
+ metadata.gz: ea3e5c6d2e014bddec8b393432b8dd3cfbe98980be22d7a27ab1a647eb16c06f380680e753c4448b6341b07119505c68fe38f988299eb13a3f2b66e40d6d454e
7
+ data.tar.gz: c6c1875c5ff26df2188e0049a9416caa04300da51c6a68d486b0798c5278c6bf2a4620de2a8a6b769cfa87a2a67b9b6a805df4401f134ae3f2f81c36ba07c934
data/README.md CHANGED
@@ -71,7 +71,6 @@ On OS X, the other dependencies can be easily installed via [Homebrew](http://br
71
71
 
72
72
  `HandBrakeCLI` is also available via [Homebrew Cask](http://caskroom.io/), an extension to Homebrew:
73
73
 
74
- brew install caskroom/cask/brew-cask
75
74
  brew cask install handbrakecli
76
75
 
77
76
  On Linux, package management systems vary so it's best consult the indexes for those systems.
@@ -94,11 +93,9 @@ So, the `transcode-video` tool configures the [x264 video encoder](http://www.vi
94
93
 
95
94
  Input resolution | Target video bitrate
96
95
  --- | ---
97
- 1080p or Blu-ray video | 8 Mbps
98
- 720p | 6 Mbps
99
- 480i, 576p or DVD video | 3 Mbps
100
-
101
- Actual output video bitrates are usually lower than these targets, especially for DVD video.
96
+ 1080p or Blu-ray video | 8000 Kbps
97
+ 720p | 5000 Kbps
98
+ 480i, 576p or DVD video | 2500 Kbps
102
99
 
103
100
  When audio transcoding is required, it's done in [AAC format](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) and, if the original is [multi-channel surround sound](https://en.wikipedia.org/wiki/Surround_sound), in [Dolby Digital AC-3 format](https://en.wikipedia.org/wiki/Dolby_Digital). Meaning the output can contain two tracks from the same source in different formats. And mono, stereo and surround inputs are all handled differently.
104
101
 
@@ -204,9 +201,9 @@ Video bitrate targets are lowered 33-37% depending upon the video resolution of
204
201
 
205
202
  Input resolution | Target video bitrate with `--small`
206
203
  --- | ---
207
- 1080p or Blu-ray video | 5 Mbps
208
- 720p | 4 Mbps
209
- 480i, 576p or DVD video | 2 Mbps
204
+ 1080p or Blu-ray video | 5000 Kbps
205
+ 720p | 4000 Kbps
206
+ 480i, 576p or DVD video | 2000 Kbps
210
207
 
211
208
  Dolby Digital AC-3 audio bitrate limits are lowered 40%. However, there's no impact on the bitrate of mono and stereo AAC audio tracks.
212
209
 
data/bin/transcode-video CHANGED
@@ -165,6 +165,7 @@ External subtitle options:
165
165
  (can be used multiple times)
166
166
 
167
167
  Advanced options:
168
+ --old-behavior use old ratecontrol system and video bitrate limits
168
169
  --abr BITRATE use modified ABR ratecontrol at average video bitrate
169
170
  --vbr QUALITY use true VBR ratecontrol at constant video quality (0-51)
170
171
  -E, --encoder-option NAME=VALUE|_NAME
@@ -205,8 +206,8 @@ HERE
205
206
  @dry_run = false
206
207
  @vbv_maxrate_2160p = 16000
207
208
  @vbv_maxrate_1080p = 8000
208
- @vbv_maxrate_720p = 6000
209
- @vbv_maxrate_480p = 3000
209
+ @vbv_maxrate_720p = 5000
210
+ @vbv_maxrate_480p = 2500
210
211
  @quick = false
211
212
  @crop = {:top => 0, :bottom => 0, :left => 0, :right => 0}
212
213
  @main_audio = nil
@@ -229,6 +230,7 @@ HERE
229
230
  @srt_language = {}
230
231
  @srt_encoding = {}
231
232
  @srt_offset = {}
233
+ @old_behavior = false
232
234
  @abr_bitrate = nil
233
235
  @vbr_quality = nil
234
236
  @encoder_options = {}
@@ -305,8 +307,8 @@ HERE
305
307
  Console.warn 'Using deprecated option: --big'
306
308
  @vbv_maxrate_2160p = 16000
307
309
  @vbv_maxrate_1080p = 8000
308
- @vbv_maxrate_720p = 6000
309
- @vbv_maxrate_480p = 3000
310
+ @vbv_maxrate_720p = @old_behavior ? 6000 : 5000
311
+ @vbv_maxrate_480p = @old_behavior ? 3000 : 2500
310
312
  @ac3_bitrate = 640
311
313
  @pass_ac3_bitrate = 640
312
314
  end
@@ -607,6 +609,14 @@ HERE
607
609
  @srt_offset[@srt_file.size - 1] = arg
608
610
  end
609
611
 
612
+ opts.on '--old-behavior' do
613
+ @old_behavior = true
614
+ @vbv_maxrate_720p = 6000 if @vbv_maxrate_720p == 5000
615
+ @vbv_maxrate_480p = 3000 if @vbv_maxrate_480p == 2500
616
+ @abr_bitrate = nil
617
+ @vbr_quality = nil
618
+ end
619
+
610
620
  opts.on '--abr ARG', Integer do |arg|
611
621
  @abr_bitrate = arg
612
622
  @vbr_quality = nil
@@ -806,7 +816,7 @@ HERE
806
816
  handbrake_options['encoder-level'] = 'auto'
807
817
  end
808
818
 
809
- handbrake_options['quality'] = '16'
819
+ handbrake_options['quality'] = @old_behavior ? '16' : '1'
810
820
 
811
821
  unless media.info[:directory]
812
822
  bitrate = ((((media.info[:size] * 8) / media.info[:duration]) / 1000) / 1000) * 1000
@@ -825,6 +835,7 @@ HERE
825
835
  encoder_options['vbv-maxrate'] = vbv_maxrate.to_s
826
836
  encoder_options['vbv-bufsize'] = (@encoder_options.fetch('vbv-maxrate', vbv_maxrate).to_i / 2).to_s
827
837
  encoder_options['crf-max'] = '25'
838
+ encoder_options['qpmax'] = '34' unless @old_behavior
828
839
  else
829
840
  unless @abr_bitrate.nil?
830
841
  handbrake_options['vb'] = @abr_bitrate.to_s
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.5.1'
8
+ VERSION = '0.6.0'
9
9
  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.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Melton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect