Skip to content

Commit d9b8085

Browse files
committed
Fix bogus VBV being set when using custom encoder.
1 parent 2bcbd0e commit d9b8085

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

transcode-video.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,16 @@ def process_input(path)
314314
*subtitle_options
315315
]
316316

317-
case @mode
318-
when :h264
319-
encoder_options = "vbv-maxrate=#{@vbv_size}:vbv-bufsize=#{@vbv_size}"
320-
when :nvenc_hevc
321-
encoder_options = 'spatial_aq=1:rc-lookahead=32'
322-
encoder_options += ':b_ref_mode=2' if @bframe_refs
323-
else
324-
encoder_options = nil
317+
encoder_options = nil
318+
319+
unless @extra_options.include? 'encoder'
320+
case @mode
321+
when :h264
322+
encoder_options = "vbv-maxrate=#{@vbv_size}:vbv-bufsize=#{@vbv_size}"
323+
when :nvenc_hevc
324+
encoder_options = 'spatial_aq=1:rc-lookahead=32'
325+
encoder_options += ':b_ref_mode=2' if @bframe_refs
326+
end
325327
end
326328

327329
@extra_options.each do |name, value|

0 commit comments

Comments
 (0)