other_video_transcoding 0.5.0 → 0.6.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
  SHA256:
3
- metadata.gz: e5caa1866dd6d3035704fb8977f21d682291ebfd46a6496974399a6876b13d33
4
- data.tar.gz: b7c206ee00b2162bfea7b9c27f7566c879225a32efcfbf7a09fd7a9fc88f8200
3
+ metadata.gz: e35c9d638ce45ae7407b8a3d88f0a785b515683c30e55b2d325e3cc243c15431
4
+ data.tar.gz: ae7a7405f0b57be44ee16dfc6b48c877730b4b6cd6933410a6ec3828bea124ef
5
5
  SHA512:
6
- metadata.gz: d1c667e8c485d1ab70a4c035aa53915365aa6225cab6487f0488c37fa99eb7632e1ffc262ab3f256a55d8e43c71caaa20ed1d8dd64194a275972dbc1c65dee38
7
- data.tar.gz: a47799076252ff46103419e41def057edfc4e63ec299b477f2360f7aad0ed866c14d0ff5f5ac2f8a3d1aeaf7a40fc47a2e3f4d203bc88c128cd0ce893f6fd22d
6
+ metadata.gz: 15c29bac8aa3f7cb7ba9dcf6cf5c22e2c99f3b8ab8a709652166c885c5e2207873abdd2319c86cc5745aac977bab6911e50407356caa730976af465a88089dcb
7
+ data.tar.gz: 56d94453fda02a51ac29ddbdc904192874712f4ea3457a647383c2628bd54ebe636447771940e80ee6335a74e16ccef0fd14d6785e9a2998a22acf7b12c2f027
@@ -2,6 +2,16 @@
2
2
 
3
3
  This single document contains all of the notes created for each [release](https://github.com/donmelton/other_video_transcoding/releases).
4
4
 
5
+ ## [0.6.0](https://github.com/donmelton/other_video_transcoding/releases/tag/0.6.0)
6
+
7
+ Tuesday, December 22, 2020
8
+
9
+ * Lower the default target bitrates for 8-bit HEVC video in `other-transcode` to match the defaults for 10-bit HEVC video. This means, for example, the default target for HEVC at a 1080p resolution will be 6000 Kbps no matter the output bit depth.
10
+ * Modify `other-transcode` to set the video buffer size equal to the maximum video bitrate when using an Nvidia encoder, essentially adding `--rc-bufsize 3` to the command line. Previously the buffer size was never explicitly set so `ffmpeg` would use a default value of twice the target bitrate. Since the maximum bitrate is normally three times the target bitrate this meant the buffer size was actually smaller than the maximum. While this didn't cause any known problems, Nvidia recommends a larger buffer size to improve quality. However, using `--rc-bufsize 0` will restore the old behavior and the default value from `ffmpeg`.
11
+ * Ignore the `--nvenc-lookahead` option in `other-transcode` when the argument is `0` since such a value won't change the behavior of an Nvidia encoder anyway.
12
+ * Add a `--limit-ac3-surround` option to `other-transcode` which prevents surround audio in AC-3 or Dolby Digital Plus (Enhanced AC-3) format from being copied instead of transcoded when the orginal bitrate is above the transcoding bitrate. This allows setting a lower target with the `--surround-bitrate` option in order to force higher-bitrate tracks to be transcoded instead of copied.
13
+ * Reduce the minimum bitrates for Dolby Digital Plus audio in `other-transcode` from 256, 128 and 64 Kbps for surround, stereo and mono layouts to 192, 96 and 48 Kbps. The default bitrates for Dolby Digital Plus audio remain the same and this change does not affect audio output in AC-3 or AAC formats.
14
+
5
15
  ## [0.5.0](https://github.com/donmelton/other_video_transcoding/releases/tag/0.5.0)
6
16
 
7
17
  Tuesday, November 24, 2020
@@ -16,7 +16,7 @@ module Transcoding
16
16
  class Command
17
17
  def about
18
18
  <<-HERE
19
- ask-ffmpeg-log 0.5.0
19
+ ask-ffmpeg-log 0.6.0
20
20
  Copyright (c) 2019-2020 Don Melton
21
21
  HERE
22
22
  end
@@ -18,7 +18,7 @@ module Transcoding
18
18
  class Command
19
19
  def about
20
20
  <<-HERE
21
- other-transcode 0.5.0
21
+ other-transcode 0.6.0
22
22
  Copyright (c) 2019-2020 Don Melton
23
23
  HERE
24
24
  end
@@ -260,6 +260,9 @@ Audio options:
260
260
  def usage18
261
261
  <<-HERE
262
262
  --all-eac3 " " " " " all audio
263
+ --limit-ac3-surround
264
+ don't copy surround audio in AC-3 format
265
+ when orginal bitrate is above transcoding bitrate
263
266
  --keep-ac3-stereo
264
267
  copy stereo and mono audio in AC-3 format
265
268
  even when orginal bitrate is above transcoding bitrate
@@ -361,6 +364,7 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
361
364
  @mono_bitrate = nil
362
365
  @surround_encoder = 'ac3'
363
366
  @stereo_encoder = nil
367
+ @keep_ac3_surround = true
364
368
  @keep_ac3_stereo = false
365
369
  @pass_dts = false
366
370
  @subtitle_selections = []
@@ -660,7 +664,12 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
660
664
 
661
665
  opts.on '--nvenc-lookahead ARG', Integer do |arg|
662
666
  @encoder = @hevc ? 'hevc_nvenc' : 'h264_nvenc'
663
- @nvenc_lookahead = [[arg, 0].max, 32].min
667
+
668
+ if arg > 0
669
+ @nvenc_lookahead = [arg, 32].min
670
+ else
671
+ @nvenc_lookahead = nil
672
+ end
664
673
  end
665
674
 
666
675
  opts.on '--nvenc-multipass ARG' do |arg|
@@ -846,6 +855,10 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
846
855
  @stereo_encoder = 'eac3'
847
856
  end
848
857
 
858
+ opts.on '--limit-ac3-surround' do
859
+ @keep_ac3_surround = false
860
+ end
861
+
849
862
  opts.on '--keep-ac3-stereo' do
850
863
  @keep_ac3_stereo = true
851
864
  end
@@ -904,13 +917,14 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
904
917
  def configure(path)
905
918
  @audio_selections.uniq!
906
919
  @subtitle_selections.uniq!
907
- @surround_bitrate = [[@surround_bitrate, 256].max, (@surround_encoder == 'ac3' ? 640 : 768)].min
908
- @stereo_bitrate = [[@stereo_bitrate, 128].max, (@stereo_encoder == 'eac3' ? 768 : 320)].min
920
+ min_bitrate = @surround_encoder == 'eac3' ? 192 : 256
921
+ @surround_bitrate = [[@surround_bitrate, min_bitrate].max, (@surround_encoder == 'ac3' ? 640 : 768)].min
922
+ @stereo_bitrate = [[@stereo_bitrate, min_bitrate / 2].max, (@stereo_encoder == 'eac3' ? 768 : 320)].min
909
923
 
910
924
  if @mono_bitrate.nil?
911
925
  @mono_bitrate = @stereo_bitrate / 2
912
926
  else
913
- @mono_bitrate = [[@mono_bitrate, 64].max, (@stereo_encoder == 'eac3' ? 768 : 256)].min
927
+ @mono_bitrate = [[@mono_bitrate, min_bitrate / 4].max, (@stereo_encoder == 'eac3' ? 768 : 256)].min
914
928
  end
915
929
 
916
930
  [
@@ -952,10 +966,10 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
952
966
  end
953
967
 
954
968
  @ten_bit = (@hevc and @encoder =~ /(nvenc|qsv|x265)$/ ? true : false) if @ten_bit.nil?
955
- @target_2160p ||= (@hevc and @ten_bit) ? 12000 : 16000
956
- @target_1080p ||= (@hevc and @ten_bit) ? 6000 : 8000
957
- @target_720p ||= (@hevc and @ten_bit) ? 3000 : 4000
958
- @target_480p ||= (@hevc and @ten_bit) ? 1500 : 2000
969
+ @target_2160p ||= @hevc ? 12000 : 16000
970
+ @target_1080p ||= @hevc ? 6000 : 8000
971
+ @target_720p ||= @hevc ? 3000 : 4000
972
+ @target_480p ||= @hevc ? 1500 : 2000
959
973
  @decode_method ||= @encoder =~ /nvenc$/ ? 'cuda' : 'auto'
960
974
 
961
975
  if @stereo_encoder.nil?
@@ -1755,9 +1769,11 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
1755
1769
  end
1756
1770
 
1757
1771
  if @bufsize.nil?
1758
- bufsize = maxrate if @encoder =~ /^libx26[45]$/
1772
+ bufsize = maxrate if @encoder =~ /(nvenc|libx26[45])$/
1759
1773
  else
1760
- bufsize = [[(bitrate * @bufsize).to_i, bitrate].max, bitrate * 4].min
1774
+ unless @bufsize == 0 and @encoder =~ /nvenc$/
1775
+ bufsize = [[(bitrate * @bufsize).to_i, bitrate].max, bitrate * 4].min
1776
+ end
1761
1777
  end
1762
1778
  end
1763
1779
 
@@ -2022,8 +2038,8 @@ Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
2022
2038
  dts = (codec_name == 'dts' and track[:stream].fetch('profile', 'DTS') =~ /^DTS(?:-ES)?$/)
2023
2039
 
2024
2040
  if track[:width] == :surround
2025
- if codec_name == @surround_encoder or
2026
- codec_name == 'ac3' or
2041
+ if ((codec_name == @surround_encoder or codec_name == 'ac3') and
2042
+ (@keep_ac3_surround or (track[:stream]['bit_rate'].to_i / 1000) <= @surround_bitrate)) or
2027
2043
  (@pass_dts and dts)
2028
2044
  encoder = 'copy'
2029
2045
  elsif input_channels > 2
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'other_video_transcoding'
3
- s.version = '0.5.0'
3
+ s.version = '0.6.0'
4
4
  s.required_ruby_version = '>= 2.0'
5
5
  s.summary = 'Other tools to transcode videos.'
6
6
  s.description = <<-HERE
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: other_video_transcoding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.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: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " Other Video Transcoding is a package of tools to transcode videos.\n"
14
14
  email: don@blivet.com
@@ -32,6 +32,7 @@ files:
32
32
  - other_video_transcoding-0.3.1.gem
33
33
  - other_video_transcoding-0.3.2.gem
34
34
  - other_video_transcoding-0.4.0.gem
35
+ - other_video_transcoding-0.5.0.gem
35
36
  - other_video_transcoding.gemspec
36
37
  homepage: https://github.com/donmelton/other_video_transcoding
37
38
  licenses: