video_transcoding 0.9.0 → 0.10.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: d2a3ee4c7111881f0ca85d612bbb715fc401c3a7
4
- data.tar.gz: a7d271b0bea0631b4160a782579f2795cd679e27
3
+ metadata.gz: f473590263e13e9651405d29aac6923931e2e7ce
4
+ data.tar.gz: c106e10d026d8f784e616da4cc983e3ac7fae120
5
5
  SHA512:
6
- metadata.gz: deda8c3414b1589cee0b5e4043e50029aae011810ef340b4bdb562b9fd9205295241c009d64a7fb112aaea33964833c8017a31a5fbc15d0be00528524bb9f6b0
7
- data.tar.gz: 19e5084afb13b889de1ebb8cc868180184990ad42ff95a412dd3c819ceee711f1c0d4f3b12576dba41954d4b8f969bf878156d793085e15794fbd74b188eea63
6
+ metadata.gz: ab2819953f8ad74407948cc485c4b38eee6a83df9d55c26b34f4f3bd77115b8c7f28f5682b56ce1dcde651410c4c33b78505e2da10a34e440f0918c9931da8b1
7
+ data.tar.gz: 25a1feffd51663c3d7dc8e1e98c6b3516ff277c2b63168a134deda5b0ac80f7841541389cbedb5df508b744e395b2e4fde497d112257038ca2c05298a0cf860a
data/README.md CHANGED
@@ -641,6 +641,14 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976
641
641
 
642
642
  ## History
643
643
 
644
+ ### [0.10.0](https://github.com/donmelton/video_transcoding/releases/tag/0.10.0)
645
+
646
+ Friday, May 6, 2016
647
+
648
+ * Add resolution-specific qualifiers to the `--target` option in `transcode-video`. This allows different video bitrate targets for inputs with different resolutions. For example, you can use `--target 1080p=6500` alone to change the target for Blu-ray Discs and not DVDs. Or you could combine that with `--target 480p=2500` to affect both resolutions. Via [ #68](https://github.com/donmelton/video_transcoding/pull/68) from [@turley](https://github.com/turley).
649
+ * Fix a bug in `transcode-video` where video bitrate targets were not reset when the `--small` or `--small-video` options followed the `--target` option on the command line.
650
+ * Fix a bug where `query-handbrake-log` would fail for `time` or `speed` on OS X or Linux when parsing .log files created on Windows. This was due to a regular expression not expecting a carriage return (CR) before a line feed (LF), i.e. a Windows-style line ending (CRLF). Via [ #67](https://github.com/donmelton/video_transcoding/issues/67) from [@lambdan](https://github.com/lambdan).
651
+
644
652
  ### [0.9.0](https://github.com/donmelton/video_transcoding/releases/tag/0.9.0)
645
653
 
646
654
  Monday, May 2, 2016
@@ -145,7 +145,7 @@ HERE
145
145
  if fps_line.nil?
146
146
  fps_line = line
147
147
  elsif fps_line_2.nil?
148
- if fps_line =~ / ([0.]+) fps$/
148
+ if fps_line =~ / ([0.]+) fps\r?$/
149
149
  fps_line = line
150
150
  else
151
151
  fps_line_2 = line
@@ -173,7 +173,7 @@ HERE
173
173
  else
174
174
  Console.debug fps_line
175
175
 
176
- if fps_line =~ / ([0-9.]+) fps$/
176
+ if fps_line =~ / ([0-9.]+) fps\r?$/
177
177
  fps = $1
178
178
  else
179
179
  fail "fps not found: #{log}"
@@ -182,7 +182,7 @@ HERE
182
182
  unless fps_line_2.nil?
183
183
  Console.debug fps_line_2
184
184
 
185
- if fps_line_2 =~ / ([0-9.]+) fps$/
185
+ if fps_line_2 =~ / ([0-9.]+) fps\r?$/
186
186
  fps_2 = $1
187
187
  fps = (1 / ((1 / fps.to_f) + (1 / fps_2.to_f))).round(6).to_s
188
188
  else
data/bin/transcode-video CHANGED
@@ -79,9 +79,11 @@ Video options:
79
79
  --pixel-aspect X:Y
80
80
  set pixel aspect ratio (default: 1:1)
81
81
  (e.g.: make X larger than Y to stretch horizontally)
82
- --target BITRATE
82
+ --target [1080p=|720p=|480p=]BITRATE
83
83
  set video bitrate target (default: based on input)
84
+ or target for specific input resolution
84
85
  (can be exceeded to maintain video quality)
86
+ (can be used multiple times)
85
87
  --force-rate FPS
86
88
  force constant video frame rate
87
89
  (`23.976` applied automatically for some inputs)
@@ -311,6 +313,7 @@ HERE
311
313
  @vbv_maxrate_480p = 1600
312
314
  @ac3_bitrate = 384
313
315
  @pass_ac3_bitrate = 448
316
+ @target_bitrate = nil
314
317
  end
315
318
 
316
319
  opts.on '--small-video' do
@@ -318,6 +321,7 @@ HERE
318
321
  @vbv_maxrate_1080p = 5000
319
322
  @vbv_maxrate_720p = 3000
320
323
  @vbv_maxrate_480p = 1600
324
+ @target_bitrate = nil
321
325
  end
322
326
 
323
327
  opts.on '--quick' do
@@ -394,8 +398,31 @@ HERE
394
398
  end
395
399
  end
396
400
 
397
- opts.on '--target ARG', Integer do |arg|
398
- @target_bitrate = arg
401
+ opts.on '--target ARG' do |arg|
402
+ if arg =~ /^([0-9]+p)=([1-9][0-9]*)$/
403
+ bitrate = $2.to_i
404
+
405
+ case $1
406
+ when '2160p'
407
+ @vbv_maxrate_2160p = bitrate
408
+ when '1080p'
409
+ @vbv_maxrate_1080p = bitrate
410
+ when '720p'
411
+ @vbv_maxrate_720p = bitrate
412
+ when '480p'
413
+ @vbv_maxrate_480p = bitrate
414
+ else
415
+ fail UsageError, "invalid target video bitrate resolution: #{$1}"
416
+ end
417
+
418
+ @target_bitrate = nil
419
+ else
420
+ unless arg =~ /^[1-9][0-9]*$/
421
+ fail UsageError, "invalid rate argument: #{arg}"
422
+ end
423
+ @target_bitrate = arg.to_i
424
+ end
425
+
399
426
  @abr_bitrate = nil
400
427
  @vbr_quality = nil
401
428
  end
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.9.0'
8
+ VERSION = '0.10.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.9.0
4
+ version: 0.10.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-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect