dvdvrconv 1.3.2 → 1.3.3

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: c5f0218e853e4af5210eb7b85aeba67f2cd8dc5a42485488034f44bb76677bb7
4
- data.tar.gz: ba57fbddc4615b81228f2d4f22ffb86f849c343ef6d18d8c7184a66e7baf566c
3
+ metadata.gz: caab8f34b81f4361edbdb9cb50ef5215f3809efc46de355af8dda0aa0b58538a
4
+ data.tar.gz: 781cd817f0f4e0852d555b3fc368e08bb008ccf89ccb379b6db2654fa37127e4
5
5
  SHA512:
6
- metadata.gz: 126e3d8909f423585538bdc2daee2e01b5d664cb15d3ee756fbf312580ba725b8808a71ec00d30f8814bccb132930d20d0652b5503676ede2e443d3160d4415b
7
- data.tar.gz: 6c4295f3f3aa90db8e67b36448dbaa99caf84bcf21c1c1719484aa56d0276cf402235be237bcaa8e87f2441f021c6e6db8b6589323c4ef351d4f0a013446eac7
6
+ metadata.gz: 8681b1d376df42b185f0b7c550cbada833ca920fa62e380290fdc74522f5fd2b9c6154b9f5a7ab0cea2126381eb4f8cad41378fec72606a3894142b82b0037e3
7
+ data.tar.gz: efacfa73e7ccc4c7a80d365165dee9ac6882a410a2987dca79482f0deb202d447ab8f713b122d45e7b843abb55e1e16e5c04cfaa4e47fd113240de3248a28d6b
data/README.md CHANGED
@@ -92,6 +92,9 @@ dvdvrconv reads `default_dvdvrconv.yml` in the current working directory as dvdv
92
92
  * use_customize_title
93
93
  * base_dst_name
94
94
  * number_list
95
+ * hardware_encode
96
+ * global_quality
97
+ * h264_crf
95
98
 
96
99
  ## vr_mangr_ifo, vr_movie_vro
97
100
 
@@ -175,7 +178,37 @@ In this case, "concat_mode" can be disabled.
175
178
  concat_mode: false
176
179
  ```
177
180
 
181
+ ## hardware_encode
178
182
 
183
+ FFmpeg encode option. You can select the encoding mode from 'normal' or 'qsv'.
184
+
185
+ if you want to use a software encoder (default)
186
+ ```
187
+ hardware_encode: 'normal'
188
+ ```
189
+
190
+ If you want to use a hardware encoder(intel QSV LA_ICQ)
191
+ ```
192
+ hardware_encode: 'qsv'
193
+ ```
194
+
195
+ ## global_quality
196
+
197
+ FFmpeg hardware encode(QSV) option:
198
+
199
+ if you want to set Global Quality (default 25)
200
+ ```
201
+ global_quality: 28
202
+ ```
203
+
204
+ ## h264_crf
205
+
206
+ FFmpeg software encode option:
207
+
208
+ if you want to set h264 Constant Rate Factor (default 25)
209
+ ```
210
+ h264_crf: 28
211
+ ```
179
212
 
180
213
 
181
214
  # Install dependent libraries for WSL(ubuntu)
@@ -285,6 +318,7 @@ After compile success, you will get the following files.
285
318
  * [FFmpeg](https://www.ffmpeg.org/download.html)
286
319
  From the Windows EXE Files link above, select the following website.
287
320
  * [Releases · BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds/releases) (daily auto-build).
321
+ * [Releases · GyanD/codexffmpeg](https://github.com/GyanD/codexffmpeg/releases)
288
322
 
289
323
  As an example, download Auto-Build 2021-09-28 12:22.
290
324
  * [ffmpeg-N-103899-g855014ff83-win64-gpl.zip 100MB](https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-09-28-12-22/ffmpeg-N-103899-g855014ff83-win64-gpl.zip)
@@ -68,6 +68,12 @@ module Dvdvrconv
68
68
  dvd.vrdisc.global_quality = @options[:global_quality]
69
69
  end
70
70
 
71
+ if @options[:h264_crf].nil?
72
+ dvd.vrdisc.h264_crf = Dvdvrconv::DEFAULT_H264_CRF
73
+ else
74
+ dvd.vrdisc.h264_crf = @options[:h264_crf]
75
+ end
76
+
71
77
  # View the path of each files
72
78
  puts '== Use these paths =='
73
79
  puts " => VR_MANGR.IFO: #{dvd.vrdisc.opts_ifo}"
@@ -80,6 +86,7 @@ module Dvdvrconv
80
86
  puts " => concat_mode: #{@options[:concat_mode]}"
81
87
  puts " => hardware_encode: #{@options[:hardware_encode]}"
82
88
  puts " => global_quality: #{@options[:global_quality]}"
89
+ puts " => h264_crf: #{@options[:h264_crf]}"
83
90
 
84
91
  dvd.read_info
85
92
 
@@ -195,6 +202,12 @@ module Dvdvrconv
195
202
  else
196
203
  @options[:global_quality] = config['global_quality']
197
204
  end
205
+
206
+ if config['h264_crf'].nil?
207
+ @options[:h264_crf] = Dvdvrconv::DEFAULT_H264_CRF
208
+ else
209
+ @options[:h264_crf] = config['h264_crf']
210
+ end
198
211
  end
199
212
 
200
213
  def dvdpath
@@ -20,7 +20,8 @@ module Dvdvrconv
20
20
  :default_cmd, # @param [String]
21
21
  :concat_mode, # @param [Boolean]
22
22
  :hardware_encode, # @param [String]
23
- :global_quality # @param [Integer]
23
+ :global_quality, # @param [Integer]
24
+ :h264_crf, # @param [Integer]
24
25
  )
25
26
 
26
27
  BASE_NAME = 'DVD'
@@ -28,6 +29,8 @@ module Dvdvrconv
28
29
  DEFAULT_CONCAT_MODE = true
29
30
  DEFAULT_HARDWARE_ENCODE = 'normal'
30
31
  DEFAULT_GLOBAL_QUALITY = 25
32
+ DEFAULT_H264_CRF = 25
33
+
31
34
 
32
35
  # Default DVD drive is "d".
33
36
  # If you want to use a different drive, you need to set up a "default_dvdvrconv.yml" file.
@@ -60,6 +63,7 @@ module Dvdvrconv
60
63
  @vrdisc.concat_mode = Dvdvrconv::DEFAULT_CONCAT_MODE
61
64
  @vrdisc.hardware_encode = Dvdvrconv::DEFAULT_HARDWARE_ENCODE
62
65
  @vrdisc.global_quality = Dvdvrconv::DEFAULT_GLOBAL_QUALITY
66
+ @vrdisc.h264_crf = Dvdvrconv::DEFAULT_H264_CRF
63
67
  end
64
68
 
65
69
  # Read VRO file from dvd-ram disc in dvd-vr format, and output vob files.
@@ -75,16 +79,23 @@ module Dvdvrconv
75
79
  # File convert command, vob to mp4 for FFmpeg.
76
80
  # * Change the aspect ratio to 16:9.
77
81
  # * Delete a closed caption.
82
+ # * Use deinterlace (bwdif)
83
+ # * Use Constant Rate Factor mode insted of CBR mode
84
+ # * Use analyze and probe option
78
85
  def ffmeg_normal_cmd(file_name)
79
- Shellwords.shellsplit(%(ffmpeg -i "#{file_name}.vob" -filter:v "crop=704:474:0:0" -vcodec libx264 -b:v 500k -aspect 16:9 -acodec copy -bsf:v "filter_units=remove_types=6" "#{file_name}.mp4"))
86
+ Shellwords.shellsplit(%(ffmpeg -analyzeduration 2000M -probesize 2G -i "#{file_name}.vob" -vf "bwdif=0:-1:0,crop=704:474:0:0,scale=704:480,setdar=16/9" -c:v libx264 -crf "#{@vrdisc.h264_crf}" -preset medium -bsf:v "filter_units=remove_types=6" -map 0:v:0 -map 0:a:0 -c:a copy "#{file_name}.mp4"))
80
87
  end
81
88
 
82
89
  # File convert command, vob to mp4 for FFmpeg.
83
90
  # * FFmpeg with QSV(Intel Quick Sync Video)
84
91
  # * Change the aspect ratio to 16:9.
85
92
  # * Delete a closed caption.
93
+ # * Support for FFmpeg 8
94
+ # * Software decode, cropp and deinterlace + h264 qsv(LA_ICQ) encode
95
+ # * Use ICQ Look_ahead mode
96
+ # * Use analyze and probe option
86
97
  def ffmpeg_qsv_cmd(file_name)
87
- Shellwords.shellsplit(%(ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i "#{file_name}.vob" -filter:v "crop=704:474:0:0" -c:v h264_qsv -global_quality "#{@vrdisc.global_quality}" -look_ahead 1 -aspect 16:9 -acodec copy -bsf:v "filter_units=remove_types=6" "#{file_name}.mp4"))
98
+ Shellwords.shellsplit(%(ffmpeg -analyzeduration 2000M -probesize 2G -i "#{file_name}.vob" -vf "bwdif=0:-1:0,crop=704:474:0:0,scale=704:480,setdar=16/9" -c:v h264_qsv -global_quality "#{@vrdisc.global_quality}" -look_ahead 1 -look_ahead_depth 30 -aspect 16:9 -bsf:v "filter_units=remove_types=6" -map 0:v:0 -map 0:a:0 -c:a copy "#{file_name}.mp4"))
88
99
  end
89
100
 
90
101
  # File convert command, vob to mp4 for FFmpeg.
@@ -356,7 +367,7 @@ module Dvdvrconv
356
367
 
357
368
  def vrdisc_status
358
369
  puts "\n< < < < < @vrdisc status > > > > >"
359
- %w[num title output_title duplicate_name vob_titles concat_mode hardware_encode global_quality].each do |item|
370
+ %w[num title output_title duplicate_name vob_titles concat_mode hardware_encode global_quality h264_crf].each do |item|
360
371
  puts "#{item}=> #{@vrdisc[item]}"
361
372
  end
362
373
  puts "< < < < < @vrdisc status > > > > >\n"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dvdvrconv
4
- VERSION = '1.3.2'
4
+ VERSION = '1.3.3'
5
5
  end
@@ -47,3 +47,38 @@ base_dst_name:
47
47
  - title_three
48
48
 
49
49
  number_list: []
50
+
51
+
52
+ ##################################################
53
+ #
54
+ # FFmpeg encode option
55
+ #
56
+ # You can select the encoding mode from 'normal' or 'qsv'.
57
+ #
58
+ # if you want to use a software encoder (default)
59
+ #
60
+ # hardware_encode: 'normal'
61
+ #
62
+ #
63
+ # If you want to use a hardware encoder(intel QSV LA_ICQ)
64
+ #
65
+ # hardware_encode: 'qsv'
66
+ #
67
+ #
68
+ ##################################################
69
+ #
70
+ # software encode option
71
+ #
72
+ # if you want to set h264 Constant Rate Factor (default 25)
73
+ #
74
+ # h264_crf: 28
75
+ #
76
+ #
77
+ # hardware encode option
78
+ #
79
+ # if you want to set Global Quality (default 25)
80
+ #
81
+ # global_quality: 28
82
+ #
83
+ #
84
+ ##################################################
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.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - icm7216