dvdvrconv 1.1.1 → 1.2.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
  SHA256:
3
- metadata.gz: 0bf1dfd9c27d75f1664127479eaf4480b30a2a9647c0552af036b05a95fe557d
4
- data.tar.gz: 5ef2ab78adcdf97048764088ec49905d3cfac14ff7dadf1ece60c66bf54860a4
3
+ metadata.gz: 60c712bd8767cdb73ae5d0049e5f5a82dde6ca4e8e82ec53747f2a772db5ffed
4
+ data.tar.gz: 72d7400f331b064ddb1530427c8c7257736223c6c38b3872ea0c46f708b36363
5
5
  SHA512:
6
- metadata.gz: 1a1de9101fb6bb101ed1190b854bde53442541a2b4eae24d4de663bc73fcf7ef3debc2c1df547d569968fcf1ba9093b1a4e23acbb5cccc52913dfe716220f953
7
- data.tar.gz: e065e1429ce5b36b30c0247ee1d56409b804f36f52255b593303389bf896da5c5093c826e3ad70ed3aedb47c95ff6587c74e00bf4e27ec3819fbc0369be0987f
6
+ metadata.gz: 22c9af9efb48ef68efd27cf859fc7243a6ec8e7817df89f18d6dc3e05d1bbcc7ad5cdba103e55027af491dbbb9bc2e1f6208eff798bd64b159ed76864478e98a
7
+ data.tar.gz: 6e4735ab98426feea6d4fcd3b3862742e4688322e56af7b2dc2dbd49ac0383fdd413ea522dcd04da50f2dcf23279043020f48bdd03c97c512daccd364d05bb01
data/README.md CHANGED
@@ -6,12 +6,12 @@ dvdvrconv is also a wrapper for [pixelb/dvd-vr](https://github.com/pixelb/dvd-vr
6
6
 
7
7
  For Windows users, I attached `dvd-vr.exe` for cygwin environment.
8
8
 
9
- ## dependent libraries
9
+ # dependent libraries
10
10
 
11
11
  * [dvd-vr](https://github.com/pixelb/dvd-vr/)
12
12
  * [FFmpeg](https://www.ffmpeg.org/)
13
13
 
14
- ## Installation
14
+ # Installation
15
15
 
16
16
  Add this line to your application's Gemfile:
17
17
 
@@ -29,7 +29,7 @@ $ gem install dvdvrconv
29
29
  ```
30
30
 
31
31
 
32
- ## Usage
32
+ # Usage
33
33
 
34
34
  View video information from dvd-ram disc in dvd-vr format.
35
35
 
@@ -75,7 +75,6 @@ Execute the VRO file to mp4 conversion.
75
75
  Command options
76
76
  ```
77
77
  >dvdvrconv -h
78
- [ dvd_vr_cmd ] does not exist in default_dvdvrconv.yml file.
79
78
  Usage: dvdvrconv [options]
80
79
  -v, --version Show version
81
80
  -i, --info Show file information
@@ -83,7 +82,7 @@ Usage: dvdvrconv [options]
83
82
  -e, --exec Execute the VRO file to mp4 conversion.
84
83
  ```
85
84
 
86
- ### Configure dvdvrconv
85
+ # Configure dvdvrconv
87
86
 
88
87
  dvdvrconv reads `default_dvdvrconv.yml` in the current working directory as dvdvrconv's configuration file. It can contain the following settings:
89
88
 
@@ -94,7 +93,7 @@ dvdvrconv reads `default_dvdvrconv.yml` in the current working directory as dvdv
94
93
  * base_dst_name
95
94
  * number_list
96
95
 
97
- #### vr_mangr_ifo, vr_movie_vro
96
+ ## vr_mangr_ifo, vr_movie_vro
98
97
 
99
98
  `vr_mangr_ifo` and `vr_movie_vro` specify the path to the dvd-ram disc.
100
99
  Drive D is assumed, if different you need to write its path.
@@ -111,14 +110,14 @@ vr_mangr_ifo: "/mnt/d/DVD_RTAV/VR_MANGR.IFO"
111
110
  vr_movie_vro: "/mnt/d/DVD_RTAV/VR_MOVIE.VRO"
112
111
  ```
113
112
 
114
- #### dvd_vr_cmd
113
+ ## dvd_vr_cmd
115
114
 
116
115
  On Windows, you can use the included dvd-vr command.
117
116
 
118
117
  On WSL(ubuntu), you can use the dvd-vr command that you have compiled yourself.
119
118
  * See the section below, "install dependent libraries for WSL(ubuntu)"
120
119
 
121
- #### use_customize_title, base_dst_name, number_list
120
+ ## use_customize_title, base_dst_name, number_list
122
121
 
123
122
  customize the title name of vob files.
124
123
 
@@ -157,10 +156,31 @@ base_dst_name: []
157
156
  number_list: []
158
157
  ```
159
158
 
159
+ ## concat mode
160
160
 
161
- ## Install dependent libraries for WSL(ubuntu)
161
+ Allow users to choose to concatenate or not concatenate titles with the same name.
162
162
 
163
- ### dvd-vr
163
+ When editing a title on a dvd-vr recorder (e.g., partial cut editing.), the title is split into multiple files.
164
+
165
+ Enabling "concat_mode" allows you to concatenate multiple split files into one.
166
+
167
+ If this option is not specified, the default setting is to concatenate titles of the same name.
168
+ ```
169
+ concat_mode: true
170
+ ```
171
+
172
+ On the other hand, you may not want to concatenate multiple titles with the same name on a dvd-vr disc.
173
+ In this case, "concat_mode" can be disabled.
174
+ ```
175
+ concat_mode: false
176
+ ```
177
+
178
+
179
+
180
+
181
+ # Install dependent libraries for WSL(ubuntu)
182
+
183
+ ## dvd-vr
164
184
 
165
185
  * [pixelb/dvd-vr](https://github.com/pixelb/dvd-vr/)
166
186
 
@@ -200,15 +220,15 @@ extracted to the current directory or to stdout.
200
220
  ```
201
221
 
202
222
 
203
- ### FFmpeg
223
+ ## FFmpeg
204
224
 
205
225
  ```
206
226
  sudo apt install ffmpeg
207
227
  ```
208
228
 
209
- ## Install dependent libraries for Windows
229
+ # Install dependent libraries for Windows
210
230
 
211
- ### dvd-vr
231
+ ## dvd-vr
212
232
 
213
233
  Compile dvd-vr command in Cygwin environment.
214
234
 
@@ -260,7 +280,7 @@ After compile success, you will get the following files.
260
280
  * cygiconv-2.dll (c:\cygwin64\bin)
261
281
 
262
282
 
263
- ### FFmpeg
283
+ ## FFmpeg
264
284
 
265
285
  * [FFmpeg](https://www.ffmpeg.org/download.html)
266
286
  From the Windows EXE Files link above, select the following website.
@@ -270,7 +290,7 @@ As an example, download Auto-Build 2021-09-28 12:22.
270
290
  * [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)
271
291
 
272
292
 
273
- ## Development
293
+ # Development
274
294
 
275
295
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
276
296
 
@@ -278,7 +298,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
278
298
 
279
299
 
280
300
 
281
- ## License
301
+ # License
282
302
 
283
303
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
284
304
 
@@ -48,6 +48,12 @@ module Dvdvrconv
48
48
  dvd.vrdisc.cmd = @options[:dvd_vr_cmd] if @options[:dvd_vr_cmd]
49
49
  end
50
50
 
51
+ if @options[:concat_mode].nil?
52
+ dvd.vrdisc.concat_mode = Dvdvrconv::DEFAULT_CONCAT_MODE
53
+ else
54
+ dvd.vrdisc.concat_mode = @options[:concat_mode]
55
+ end
56
+
51
57
  # View the path of each files
52
58
  puts "== Use these paths =="
53
59
  puts " => VR_MANGR.IFO: #{dvd.vrdisc.opts_ifo}"
@@ -57,7 +63,8 @@ module Dvdvrconv
57
63
  puts " => use_customize_title: #{@options[:use_customize_title]}"
58
64
  puts " => base_dst_name: #{@options[:base_dst_name]}"
59
65
  puts " => number_list: #{@options[:number_list]}"
60
-
66
+ puts " => concat_mode: #{@options[:concat_mode]}"
67
+
61
68
  dvd.read_info
62
69
 
63
70
  dvd.view_info if options[:opt][:info] || options[:opt].empty?
@@ -72,8 +79,11 @@ module Dvdvrconv
72
79
  dvd.rename_vob
73
80
 
74
81
  # Concatenate Split titles
75
- concat_list = dvd.make_concat_list
76
- dvd.concat_titles(concat_list)
82
+ if dvd.vrdisc.concat_mode == true
83
+ puts "== Concatenate Split titles =="
84
+ concat_list = dvd.make_concat_list
85
+ dvd.concat_titles(concat_list)
86
+ end
77
87
 
78
88
  # customize title of vob files
79
89
  case @options[:use_customize_title]
@@ -115,6 +125,7 @@ module Dvdvrconv
115
125
  puts "ERROR: number_list should be an Array."
116
126
  exit
117
127
  end
128
+
118
129
  else
119
130
  puts "No customize file names"
120
131
  base_dst_name = dvd.vrdisc.title.uniq.map { |file| file[0].gsub(/\s/, "_") }
@@ -150,6 +161,12 @@ module Dvdvrconv
150
161
  @options[:use_customize_title] = config["use_customize_title"] || "no"
151
162
  @options[:base_dst_name] = config["base_dst_name"] || []
152
163
  @options[:number_list] = config["number_list"] || []
164
+
165
+ if config["concat_mode"].nil?
166
+ @options[:concat_mode] = Dvdvrconv::DEFAULT_CONCAT_MODE
167
+ else
168
+ @options[:concat_mode] = config["concat_mode"]
169
+ end
153
170
  end
154
171
 
155
172
  def dvdpath
@@ -16,10 +16,12 @@ module Dvdvrconv
16
16
  :default_opts_ifo,# @param [String]
17
17
  :default_opts_vro,# @param [String]
18
18
  :default_cmd, # @param [String]
19
+ :concat_mode, # @param [Boolean]
19
20
  )
20
21
 
21
22
  BASE_NAME = "DVD"
22
23
  DEFAULT_CONFIG_FILE = "default_dvdvrconv.yml"
24
+ DEFAULT_CONCAT_MODE = true
23
25
 
24
26
  # Default DVD drive is "d".
25
27
  # If you want to use a different drive, you need to set up a "default_dvdvrconv.yml" file.
@@ -49,6 +51,7 @@ module Dvdvrconv
49
51
  @vrdisc.default_opts_ifo = @vrdisc.opts_ifo
50
52
  @vrdisc.default_opts_vro = @vrdisc.opts_vro
51
53
  @vrdisc.default_cmd = @vrdisc.cmd
54
+ @vrdisc.concat_mode = Dvdvrconv::DEFAULT_CONCAT_MODE
52
55
  end
53
56
 
54
57
  # Read VRO file from dvd-ram disc in dvd-vr format, and output vob files.
@@ -212,18 +215,28 @@ module Dvdvrconv
212
215
  def customize_title(base_dst_name, number_list = [])
213
216
  vob_titles = []
214
217
 
215
- base_dst_name.size.times do |x|
216
- break if x > @vrdisc.title.uniq.size - 1
217
- src = @vrdisc.title.uniq[x][0].gsub(/\s/, "_") + ".vob"
218
+ if @vrdisc.concat_mode == true
219
+ titels = @vrdisc.title.uniq.flatten
220
+ else
221
+ titels = @vrdisc.output_title
222
+ end
223
+
224
+ titels.each_with_index do |title, idx|
225
+ src = title.gsub(/\s/, "_") + ".vob"
218
226
 
219
227
  case base_dst_name
220
228
  when Array
221
- dst_name = base_dst_name[x]
229
+ dst_name = base_dst_name[idx]
222
230
  when String
223
231
  if number_list.size.zero?
224
- dst_name = base_dst_name + format("_%02d", x + 1)
232
+ dst_name = base_dst_name + format("_%02d", idx + 1)
225
233
  else
226
- dst_name = base_dst_name + format("_%02d", number_list[x])
234
+ case number_list[idx]
235
+ when Numeric
236
+ dst_name = base_dst_name + format("_%02d", number_list[idx])
237
+ when String
238
+ dst_name = base_dst_name + format("_%s", number_list[idx])
239
+ end
227
240
  end
228
241
  end
229
242
 
@@ -311,6 +324,14 @@ module Dvdvrconv
311
324
  end
312
325
  end
313
326
 
327
+ def vrdisc_status
328
+ puts "\n< < < < < @vrdisc status > > > > >"
329
+ %w(num title output_title duplicate_name vob_titles concat_mode).each do |item|
330
+ puts "#{item}=> #{@vrdisc[item]}"
331
+ end
332
+ puts "< < < < < @vrdisc status > > > > >\n"
333
+ end
334
+
314
335
  # convert vob to mp4.
315
336
  #
316
337
  # required Values:
@@ -1,3 +1,3 @@
1
1
  module Dvdvrconv
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
data/test-unit.yml CHANGED
@@ -1,11 +1,11 @@
1
- runner: console
2
- console_options:
3
- color_scheme: normal
4
- color_schemes:
5
- normal:
6
- success:
7
- name: green
8
- bold: true
9
- failure:
10
- name: red
11
- bold: true
1
+ runner: console
2
+ console_options:
3
+ color_scheme: normal
4
+ color_schemes:
5
+ normal:
6
+ success:
7
+ name: green
8
+ bold: true
9
+ failure:
10
+ name: red
11
+ bold: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvdvrconv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - icm7216
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-06 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit