video_transcoding 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f473590263e13e9651405d29aac6923931e2e7ce
4
- data.tar.gz: c106e10d026d8f784e616da4cc983e3ac7fae120
3
+ metadata.gz: 1ba201ee60bae63940461ad235187b738723c478
4
+ data.tar.gz: c1e50ded6787be60122559915853a1cdf38fe4df
5
5
  SHA512:
6
- metadata.gz: ab2819953f8ad74407948cc485c4b38eee6a83df9d55c26b34f4f3bd77115b8c7f28f5682b56ce1dcde651410c4c33b78505e2da10a34e440f0918c9931da8b1
7
- data.tar.gz: 25a1feffd51663c3d7dc8e1e98c6b3516ff277c2b63168a134deda5b0ac80f7841541389cbedb5df508b744e395b2e4fde497d112257038ca2c05298a0cf860a
6
+ metadata.gz: 2d57ffe063543ec6651c756a1597b423f4e8c196e29818a7e97fba315c433787363b27d8be0063bdbdd9372c0547bf13c000835e09b36a1f48fa58b5fa175171
7
+ data.tar.gz: 6f2e1b09bc9bc9e4dfc4dfbb10843c089c5375ed739d35388821fb5bd838e9ba54e4180a0c02571c32f228c9f8ff3dde88ab383289f1ffc1a51b369dfd9a6308
data/README.md CHANGED
@@ -16,7 +16,7 @@ Most of the tools in this package are essentially intelligent wrappers around Op
16
16
  Transcode video file or disc image directory into format and size similar to popular online downloads.
17
17
 
18
18
  * [`detect-crop`](#why-detect-crop)
19
- Detect optimal crop values for video file or disc image directory.
19
+ Detect crop values for video file or disc image directory.
20
20
 
21
21
  * [`convert-video`](#why-convert-video)
22
22
  Convert video file from Matroska to MP4 format or from MP4 to Matroksa format without transcoding video.
@@ -117,17 +117,11 @@ But most of these default settings and automatic behaviors can be easily overrid
117
117
 
118
118
  ### Why `detect-crop`?
119
119
 
120
- Removing the black, non-content borders of a video during transcoding is not about making the edges of the output look pretty. Those edges are usually not visible anyway when viewed full screen.
121
-
122
- Cropping is about faster transcoding and higher quality. Fewer pixels to read and write almost always leads to a speed improvement. Fewer pixels also means the x264 encoder within HandBrake doesn't waste bitrate on non-content.
123
-
124
120
  HandBrake applies automatic crop detection by default. While it's usually correct, it does guess wrong often enough not to be trusted without review. For example, HandBrake's default behavior removes the top and bottom 140 pixels from "[The Dark Knight (2008)](http://www.blu-ray.com/movies/The-Dark-Knight-Blu-ray/743/)" and "[The Hunger Games: Catching Fire (2013)](http://www.blu-ray.com/movies/The-Hunger-Games-Catching-Fire-Blu-ray/67923/)," losing significant portions of their full-frame content.
125
121
 
126
- And sometimes HandBrake only crops a few pixels from one or more edges, which is too small of a difference in size to improve performance or quality.
127
-
128
122
  This is why `transcode-video` doesn't allow HandBrake to apply cropping by default.
129
123
 
130
- Instead, the `detect-crop` tool leverages both HandBrake and MPlayer, with additional measurements and constraints, to find the optimal video cropping bounds. It then indicates whether those two programs agree. To aid in review, this tool prints commands to the terminal console allowing the recommended (or disputed) crop to be displayed, as well as a sample command line for `transcode-video` itself.
124
+ Instead, the `detect-crop` tool leverages both HandBrake and MPlayer to find the video cropping bounds. It then indicates whether those two programs agree. To aid in review, this tool prints commands to the terminal console allowing the recommended (or disputed) crop to be displayed, as well as a sample command line for `transcode-video` itself.
131
125
 
132
126
  ### Why `convert-video`?
133
127
 
@@ -201,7 +195,7 @@ The `.m4v` file extension is more "iTunes-friendly," but the file content itself
201
195
 
202
196
  #### Reducing output size
203
197
 
204
- If reducing output size is more important to you than quality, use the `--small` option:
198
+ If reducing output size is more important to you than a possible loss in quality, use the `--small` option:
205
199
 
206
200
  transcode-video --small "/path/to/Movie.mkv"
207
201
 
@@ -233,7 +227,7 @@ The `--quick` option is also more than 15% speedier than the x264 video encoder'
233
227
 
234
228
  Be aware that output files are slightly larger when using the `--quick` option since the loss of precision is also a loss of efficiency.
235
229
 
236
- Performance also improves slightly using the `--small` option due to fewer calculations being made and fewer bits being written to disk.
230
+ Performance also improves using the `--small` option due to fewer calculations being made and fewer bits being written to disk.
237
231
 
238
232
  #### Cropping
239
233
 
@@ -247,7 +241,7 @@ This command removes the left and right 240 pixels, typical of a 4:3 classic TV
247
241
 
248
242
  transcode-video --crop 0:0:240:240 "/path/to/Movie.mkv"
249
243
 
250
- Use the `detect-crop` tool to determine the optimal cropping bounds.
244
+ Use the `detect-crop` tool to determine the cropping bounds before transcoding.
251
245
 
252
246
  You can also call the `detect-crop` logic from `transcode-video` with the single `detect` argument:
253
247
 
@@ -343,7 +337,7 @@ Unlike `HandBrakeCLI`, external subtitle file names are allowed to contain comma
343
337
 
344
338
  ### Using `detect-crop`
345
339
 
346
- The command to find the optimal video cropping bounds is as simple as:
340
+ The command to find the video cropping bounds is as simple as:
347
341
 
348
342
  detect-crop "/path/to/Movie.mkv"
349
343
 
@@ -378,8 +372,6 @@ You'll then need to preview both and decide which to use.
378
372
 
379
373
  When input is a disc image directory instead of a single file, the `detect-crop` tool doesn't use MPlayer, nor does it print out commands to preview the crop.
380
374
 
381
- Be aware that the algorithm to determine optimal shape always crops from the top and bottom or from the left and right, never from both axes.
382
-
383
375
  ### Using `convert-video`
384
376
 
385
377
  The `convert-video` tool repackages video files, converting them from Matroska to MP4 format or from MP4 to Matroksa format without transcoding the video. It's as simple as:
@@ -504,11 +496,11 @@ Use the default settings whenever possible.
504
496
 
505
497
  Use the `--mp4` or `--m4v` options if your target player can't handle Matroska format.
506
498
 
507
- Use the `--small` option if you're short on storage space.
499
+ Use the `--small` option if you want more space savings.
508
500
 
509
501
  Use the `--quick` option if you're in a hurry.
510
502
 
511
- Apply unambiguous crop values from `detect-crop` after review.
503
+ Use `detect-crop` before transcoding to manually review and apply the best crop values.
512
504
 
513
505
  Don't add audio tracks in their original format that aren't AAC or Dolby Digital AC-3.
514
506
 
@@ -631,16 +623,31 @@ What I don't use are [peak signal-to-noise ratios](https://en.wikipedia.org/wiki
631
623
 
632
624
  ### What options do you use with `transcode-video`?
633
625
 
634
- I use the default settings. That's why they're the defaults.
626
+ Instead of the default size, I use the `--small` option for more space savings.
627
+
628
+ I never use the `--crop detect` function of `transcode-video` because I don't trust either `HandBrakeCLI` or `mplayer` to always get it right without supervision. Instead, I use the separate `detect-crop` tool before transcoding to manually review and apply the best crop values.
635
629
 
636
- Of course, I apply crop values as necessary. And I let `transcode-video` automatically burn any forced subtitles into the output video track when the "forced" flag is enabled in the original.
630
+ I let `transcode-video` automatically burn any forced subtitles into the output video track when the "forced" flag is enabled in the original.
637
631
 
638
632
  I never include separate subtitle tracks, but I do add audio commentary tracks.
639
633
 
640
- For a few problematic videos, I have to apply options like `--force-rate 23.976 --filter detelecine`. But that's rare.
634
+ For a few problematic videos, I have to apply options like `--force-rate 23.976 --filter detelecine`. For others, options like `--encoder-option zones=...` to adjust bitrate distribution. But both of these cases are rare.
641
635
 
642
636
  ## History
643
637
 
638
+ ### [0.11.0](https://github.com/donmelton/video_transcoding/releases/tag/0.11.0)
639
+
640
+ Thursday, September 15, 2016
641
+
642
+ * Change the behavior of `detect-crop` and the `--crop detect` function of `transcode-video` to no longer constrain the crop by default. Add a `--constrain` option to `detect-crop` and a `--constrain-crop` option to `transcode-video` to restore the old behavior. Also, deprecate the `--no-constrain` option of `detect-crop` and the `--no-constrain-crop` option of `transcode-video` since both are no longer necessary. Via [ #81](https://github.com/donmelton/video_transcoding/issues/81).
643
+ * Update the "README" document to:
644
+ * Revise multiple sections about the changes to cropping behavior.
645
+ * Revise the description of the `--small` option in multiple sections.
646
+ * Revise how I use `transcode-video` in the "FAQ" section.
647
+ * Add support for the `comb-detect`, `hqdn3d` and `pad` filters to `transcode-video`.
648
+ * Fix a bug in `transcode-video` where the `--filter` option failed when `nlmeans-tune` was used as a argument. This was due to a regular expression only allowing lowercase alpha characters and not hyphens.
649
+ * Update the default AC-3 audio and pass-through bitrates in the `--help` output of `transcode-video` to 640 Kbps, matching the behavior of the code since version 0.5.0.
650
+
644
651
  ### [0.10.0](https://github.com/donmelton/video_transcoding/releases/tag/0.10.0)
645
652
 
646
653
  Friday, May 6, 2016
data/bin/detect-crop CHANGED
@@ -22,14 +22,14 @@ HERE
22
22
 
23
23
  def usage
24
24
  <<HERE
25
- Detect optimal crop values for video file or disc image directory.
25
+ Detect crop values for video file or disc image directory.
26
26
 
27
27
  Usage: #{$PROGRAM_NAME} [OPTION]... [FILE|DIRECTORY]...
28
28
 
29
29
  --scan list title(s) and tracks in video media and exit
30
30
  --title NUMBER select numbered title in video media
31
31
  (default: main feature or first listed)
32
- --no-constrain don't constrain crop to optimal shape
32
+ --constrain constrain crop to optimal shape
33
33
  --values-only output only unambiguous crop values, not commands
34
34
 
35
35
  -v, --verbose increase diagnostic information
@@ -46,15 +46,20 @@ HERE
46
46
  super
47
47
  @scan = false
48
48
  @title = nil
49
- @constrain = true
49
+ @constrain = false
50
50
  @values_only = false
51
51
  end
52
52
 
53
53
  def define_options(opts)
54
54
  opts.on('--scan') { @scan = true }
55
55
  opts.on('--title ARG', Integer) { |arg| @title = arg }
56
- opts.on('--no-constrain') { @constrain = false }
56
+ opts.on('--constrain') { @constrain = true }
57
57
  opts.on('--values-only') { @values_only = true }
58
+
59
+ opts.on '--no-constrain' do
60
+ Console.warn 'Using deprecated option: --no-constrain'
61
+ @constrain = false
62
+ end
58
63
  end
59
64
 
60
65
  def configure
data/bin/transcode-video CHANGED
@@ -67,10 +67,10 @@ Quality options:
67
67
 
68
68
  Video options:
69
69
  --crop T:B:L:R set video crop values (default: 0:0:0:0)
70
- (use `--crop detect` for optimal crop values)
70
+ (use `--crop detect` for `detect-crop` behavior)
71
71
  (use `--crop auto` for `HandBrakeCLI` behavior)
72
- --no-constrain-crop
73
- don't constrain `--crop detect` to optimal shape
72
+ --constrain-crop
73
+ constrain `--crop detect` to optimal shape
74
74
  --fallback-crop handbrake|mplayer|none
75
75
  select fallback crop values if `--crop detect` fails
76
76
  --720p fit video within 1280x720 pixel bounds
@@ -121,9 +121,9 @@ Audio options:
121
121
  with `stereo` to allow only single stereo track
122
122
  (can be used multiple times)
123
123
  --ac3-bitrate 384|448|640
124
- set AC-3 audio bitrate (default: 384)
124
+ set AC-3 audio bitrate (default: 640)
125
125
  --pass-ac3-bitrate 384|448|640
126
- set AC-3 audio pass-through bitrate (default: 448)
126
+ set AC-3 audio pass-through bitrate (default: 640)
127
127
  --copy-audio TRACK|all
128
128
  try to copy track selected by number in its original format
129
129
  falling back to AC-3 format if original not allowed
@@ -225,7 +225,7 @@ HERE
225
225
  @vbv_maxrate_480p = 2000
226
226
  @quick = false
227
227
  @crop = {:top => 0, :bottom => 0, :left => 0, :right => 0}
228
- @constrain_crop = true
228
+ @constrain_crop = false
229
229
  @fallback_crop = nil
230
230
  @target_bitrate = nil
231
231
  @main_audio = nil
@@ -354,7 +354,12 @@ HERE
354
354
  end
355
355
  end
356
356
 
357
+ opts.on '--constrain-crop' do
358
+ @constrain_crop = true
359
+ end
360
+
357
361
  opts.on '--no-constrain-crop' do
362
+ Console.warn 'Using deprecated option: --no-constrain-crop'
358
363
  @constrain_crop = false
359
364
  end
360
365
 
@@ -449,10 +454,11 @@ HERE
449
454
  end
450
455
 
451
456
  opts.on '--filter ARG' do |arg|
452
- if arg =~ /^([a-z]+)(?:=(.+))?$/
457
+ if arg =~ /^([a-z0-9-]+)(?:=(.+))?$/
453
458
  case $1
454
- when 'deinterlace', 'decomb', 'detelecine', 'denoise', 'nlmeans',
455
- 'nlmeans-tune', 'deblock', 'rotate', 'grayscale'
459
+ when 'comb-detect', 'deinterlace', 'decomb', 'detelecine',
460
+ 'hqdn3d', 'denoise', 'nlmeans', 'nlmeans-tune', 'deblock',
461
+ 'rotate', 'pad', 'grayscale'
456
462
  force_handbrake_option $1, $2
457
463
  else
458
464
  fail UsageError, "unsupported filter name: #{$1}"
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.10.0'
8
+ VERSION = '0.11.0'
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.10.0
4
+ version: 0.11.0
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-05-06 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect