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 +4 -4
- data/lib/dvdvrconv/command.rb +13 -0
- data/lib/dvdvrconv/dvdvr.rb +7 -4
- data/lib/dvdvrconv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c05c88e2cd69df800f143dc2a9754a4f9b04ee5c64756fff8ed09faad6e2fc4f
|
4
|
+
data.tar.gz: d189810613ef0a7ff5b7e243fd0a10d258bce0486a82f81d83a68f2661ea777d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2e0fb30eb6087997fc6faaf09c4ef6e5b7917cddbe4a9ea926adcf8d6c58b68029243bca095a3929cb56eb95cb98585b35eb9222693e3368e5e333e0c37e7fe
|
7
|
+
data.tar.gz: c0a664e7eb8a6689f6030a10a46de495c8da114c50beabbab085d3fa7d08d980048a11fe3d81410151e3fff91eff460a27d097b4cb64d0ad4bfb2a7c612addfb
|
data/lib/dvdvrconv/command.rb
CHANGED
@@ -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
|
data/lib/dvdvrconv/dvdvr.rb
CHANGED
@@ -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
|
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 +=
|
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]
|
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"
|
data/lib/dvdvrconv/version.rb
CHANGED