video_transcoding 0.12.1 → 0.12.2

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: 21bb797cefd32f9ceb7968e597bbd4ae228f9ea5
4
- data.tar.gz: 76f86e86734d67d1d4880ddd9fee3460eb651016
3
+ metadata.gz: 1af2ab1b82e32edd9926a3de8baacf1b344d99d8
4
+ data.tar.gz: 30debb0668e9d0435d0ad28306f12717682d8353
5
5
  SHA512:
6
- metadata.gz: ff95b3ffa523b27d68eac0da8bce8c2cf22b25ff4fa5ad6c812bf64af55fdf190341d22e9adc55810a021d586b5c5d5d0701320103c5dcbc9b127fb7afdae4f5
7
- data.tar.gz: 9a79522dd3531e905c60e370a34e56f13989beae695aa36b861137c790095bbf8fa66754248581a484ceb76e8dfe9d14fec1c4062e066d9beabedbbf2a2a3dcc
6
+ metadata.gz: d0c1714ed1b8be55dbfa605fd0d7868791981c34afc2e8afc50afb106381b0fb3c834358df12e0ca3888fdeef22615d15e8857823d570a8687ece4e0e48772d8
7
+ data.tar.gz: ac589b283d5f37f412d91a59a873ed084f08618ca1241693ba260b27cc664c223e7621d89a13a55e88def6eedefa37168c8a7fc48d3b12957b4995043c27584f
data/README.md CHANGED
@@ -663,6 +663,14 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976
663
663
 
664
664
  ## History
665
665
 
666
+ ### [0.12.2](https://github.com/donmelton/video_transcoding/releases/tag/0.12.2)
667
+
668
+ Sunday, November 6, 2016
669
+
670
+ * Modify `transcode-video` to use HandBrake's new "auto-anamorphic" API, if available, instead of "strict-anamorphic". The HandBrake team removed the "strict-anamorphic" API on October 31, 2016, breaking `transcode-video` when it's used with the latest nightly builds. Via [ #67](https://github.com/donmelton/video_transcoding/issues/96) from [@iokui](https://github.com/iokui).
671
+ * Add "auto-anamorphic" and "non-anamorphic" to the list of HandBrake APIs disabled when the `--pixel-aspect` option is used with `transcode-video`.
672
+ * Re-enable the x264 video encoder when the `--quick` option is used with `transcode-video`.
673
+
666
674
  ### [0.12.1](https://github.com/donmelton/video_transcoding/releases/tag/0.12.1)
667
675
 
668
676
  Friday, November 4, 2016
data/bin/transcode-video CHANGED
@@ -369,7 +369,8 @@ HERE
369
369
 
370
370
  opts.on '--quick' do
371
371
  @quick = true
372
- force_handbrake_option 'encoder-preset', 'medium'
372
+ @handbrake_options.delete 'encoder'
373
+ @handbrake_options.delete 'encoder-preset'
373
374
  end
374
375
 
375
376
  opts.on '--preset ARG' do |arg|
@@ -439,6 +440,8 @@ HERE
439
440
  force_handbrake_option 'pixel-aspect', arg
440
441
  force_handbrake_option 'custom-anamorphic', nil
441
442
  @handbrake_options.delete 'display-width'
443
+ @handbrake_options.delete 'non-anamorphic'
444
+ @handbrake_options.delete 'auto-anamorphic'
442
445
  @handbrake_options.delete 'strict-anamorphic'
443
446
  @handbrake_options.delete 'loose-anamorphic'
444
447
  else
@@ -868,7 +871,7 @@ HERE
868
871
  height = adjusted_height
869
872
  end
870
873
  else
871
- anamorphic = 'strict-anamorphic'
874
+ anamorphic = HandBrake.auto_anamorphic
872
875
  end
873
876
 
874
877
  handbrake_options[anamorphic] = nil unless @handbrake_options.has_key? 'custom-anamorphic'
@@ -40,24 +40,54 @@ module VideoTranscoding
40
40
  Tool.use(COMMAND_NAME)
41
41
  end
42
42
 
43
+ def auto_anamorphic
44
+ properties = Tool.properties(COMMAND_NAME)
45
+
46
+ unless properties.has_key? :auto_anamorphic
47
+ if help_text =~ /auto-anamorphic/
48
+ properties[:auto_anamorphic] = 'auto-anamorphic'
49
+ else
50
+ properties[:auto_anamorphic] = 'strict-anamorphic'
51
+ end
52
+ end
53
+
54
+ properties[:auto_anamorphic]
55
+ end
56
+
43
57
  def aac_encoder
44
58
  properties = Tool.properties(COMMAND_NAME)
45
- return properties[:aac_encoder] if properties.has_key? :aac_encoder
46
- output = ''
47
59
 
48
- begin
49
- IO.popen([Tool.use(COMMAND_NAME), '--help'], :err=>[:child, :out]) { |io| output = io.read }
50
- rescue SystemCallError => e
51
- raise "#{COMMAND_NAME} AAC encoder unknown: #{e}"
60
+ unless properties.has_key? :aac_encoder
61
+ if help_text =~ /ca_aac/
62
+ properties[:aac_encoder] = 'ca_aac'
63
+ else
64
+ properties[:aac_encoder] = 'av_aac'
65
+ end
52
66
  end
53
67
 
54
- fail "#{COMMAND_NAME} failed during execution" unless $CHILD_STATUS.exitstatus == 0
68
+ properties[:aac_encoder]
69
+ end
70
+
71
+ private
72
+
73
+ def help_text
74
+ properties = Tool.properties(COMMAND_NAME)
75
+
76
+ unless properties.has_key? :help_text
77
+ properties[:help_text] = ''
55
78
 
56
- if output =~ /ca_aac/
57
- properties[:aac_encoder] = 'ca_aac'
58
- else
59
- properties[:aac_encoder] = 'av_aac'
79
+ begin
80
+ IO.popen([Tool.use(COMMAND_NAME), '--help'], :err=>[:child, :out]) do |io|
81
+ properties[:help_text] = io.read
82
+ end
83
+ rescue SystemCallError => e
84
+ raise "#{COMMAND_NAME} help text unavailable: #{e}"
85
+ end
86
+
87
+ fail "#{COMMAND_NAME} failed during execution" unless $CHILD_STATUS.exitstatus == 0
60
88
  end
89
+
90
+ properties[:help_text]
61
91
  end
62
92
  end
63
93
  end
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.12.1'
8
+ VERSION = '0.12.2'
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.12.1
4
+ version: 0.12.2
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-11-05 00:00:00.000000000 Z
11
+ date: 2016-11-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