dvdvrconv 1.3.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74bc4490abb3e80d289162b91a05912e2075421531f888205f10051a7930c22d
4
- data.tar.gz: fa54458ff8f4bb490aaaaa0bb87e5690831b28ed198ef1538df385d51528323c
3
+ metadata.gz: c05c88e2cd69df800f143dc2a9754a4f9b04ee5c64756fff8ed09faad6e2fc4f
4
+ data.tar.gz: d189810613ef0a7ff5b7e243fd0a10d258bce0486a82f81d83a68f2661ea777d
5
5
  SHA512:
6
- metadata.gz: 94ae2207fdf720be7625ba638c2a1a800f43ece291a0129fec40acb7746c1a8619cf438909aba2c67f8d81d4cc7bbfc60071c6e075131d72c71b4b9e4ab29b38
7
- data.tar.gz: 0fbe5892000ca58a9a977d9637cd03ad3ce6106424027c6e54397142ddf3b3ab917e5102b3ef221d5b4d1aa3c1681ad77f9ab415c688f31e05cedde5fdc99eaf
6
+ metadata.gz: b2e0fb30eb6087997fc6faaf09c4ef6e5b7917cddbe4a9ea926adcf8d6c58b68029243bca095a3929cb56eb95cb98585b35eb9222693e3368e5e333e0c37e7fe
7
+ data.tar.gz: c0a664e7eb8a6689f6030a10a46de495c8da114c50beabbab085d3fa7d08d980048a11fe3d81410151e3fff91eff460a27d097b4cb64d0ad4bfb2a7c612addfb
@@ -62,6 +62,12 @@ module Dvdvrconv
62
62
  dvd.vrdisc.hardware_encode = @options[:hardware_encode]
63
63
  end
64
64
 
65
+ if @options[:global_quality].nil?
66
+ dvd.vrdisc.global_quality = Dvdvrconv::DEFAULT_GLOBAL_QUALITY
67
+ else
68
+ dvd.vrdisc.global_quality = @options[:global_quality]
69
+ end
70
+
65
71
  # View the path of each files
66
72
  puts '== Use these paths =='
67
73
  puts " => VR_MANGR.IFO: #{dvd.vrdisc.opts_ifo}"
@@ -73,6 +79,7 @@ module Dvdvrconv
73
79
  puts " => number_list: #{@options[:number_list]}"
74
80
  puts " => concat_mode: #{@options[:concat_mode]}"
75
81
  puts " => hardware_encode: #{@options[:hardware_encode]}"
82
+ puts " => global_quality: #{@options[:global_quality]}"
76
83
 
77
84
  dvd.read_info
78
85
 
@@ -182,6 +189,12 @@ module Dvdvrconv
182
189
  else
183
190
  @options[:hardware_encode] = config['hardware_encode']
184
191
  end
192
+
193
+ if config['global_quality'].nil?
194
+ @options[:global_quality] = Dvdvrconv::DEFAULT_GLOBAL_QUALITY
195
+ else
196
+ @options[:global_quality] = config['global_quality']
197
+ end
185
198
  end
186
199
 
187
200
  def dvdpath
@@ -19,13 +19,15 @@ module Dvdvrconv
19
19
  :default_opts_vro, # @param [String]
20
20
  :default_cmd, # @param [String]
21
21
  :concat_mode, # @param [Boolean]
22
- :hardware_encode # @param [String]
22
+ :hardware_encode, # @param [String]
23
+ :global_quality # @param [Integer]
23
24
  )
24
25
 
25
26
  BASE_NAME = 'DVD'
26
27
  DEFAULT_CONFIG_FILE = 'default_dvdvrconv.yml'
27
28
  DEFAULT_CONCAT_MODE = true
28
29
  DEFAULT_HARDWARE_ENCODE = 'normal'
30
+ DEFAULT_GLOBAL_QUALITY = 25
29
31
 
30
32
  # Default DVD drive is "d".
31
33
  # If you want to use a different drive, you need to set up a "default_dvdvrconv.yml" file.
@@ -57,6 +59,7 @@ module Dvdvrconv
57
59
  @vrdisc.default_cmd = @vrdisc.cmd
58
60
  @vrdisc.concat_mode = Dvdvrconv::DEFAULT_CONCAT_MODE
59
61
  @vrdisc.hardware_encode = Dvdvrconv::DEFAULT_HARDWARE_ENCODE
62
+ @vrdisc.global_quality = Dvdvrconv::DEFAULT_GLOBAL_QUALITY
60
63
  end
61
64
 
62
65
  # Read VRO file from dvd-ram disc in dvd-vr format, and output vob files.
@@ -95,7 +98,7 @@ module Dvdvrconv
95
98
  cmd += "-i #{file_name}.vob "
96
99
  cmd += '-filter:v "crop=704:474:0:0" '
97
100
  cmd += '-c:v h264_qsv '
98
- cmd += '-global_quality:v 35 '
101
+ cmd += "-global_quality #{@vrdisc.global_quality} "
99
102
  cmd += '-look_ahead 1 '
100
103
  cmd += '-aspect 16:9 '
101
104
  cmd += '-acodec copy '
@@ -151,7 +154,7 @@ module Dvdvrconv
151
154
  puts @vrdisc.header
152
155
  [@vrdisc.num, @vrdisc.title, @vrdisc.date, @vrdisc.size].transpose.each do |x|
153
156
  %w[num title date size].each_with_index do |item, idx|
154
- line = format('%-5s', item) + ": #{x.flatten[idx].to_s}\n"
157
+ line = format('%-5s', item) + ": #{x.flatten[idx]}\n"
155
158
  puts line
156
159
  end
157
160
  puts '-'
@@ -369,7 +372,7 @@ module Dvdvrconv
369
372
 
370
373
  def vrdisc_status
371
374
  puts "\n< < < < < @vrdisc status > > > > >"
372
- %w[num title output_title duplicate_name vob_titles concat_mode hardware_encode].each do |item|
375
+ %w[num title output_title duplicate_name vob_titles concat_mode hardware_encode global_quality].each do |item|
373
376
  puts "#{item}=> #{@vrdisc[item]}"
374
377
  end
375
378
  puts "< < < < < @vrdisc status > > > > >\n"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dvdvrconv
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvdvrconv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - icm7216