Skip to content

Commit 13d0837

Browse files
committed
Make sure --avbr is only used with the x264 family of encoders.
1 parent 216fd41 commit 13d0837

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/transcode-video

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,13 @@ HERE
10091009
signal_hrd = true
10101010
when :avbr
10111011
handbrake_options['vb'] = bitrate.to_s
1012-
encoder_options['ratetol'] = 'inf'
1013-
encoder_options['mbtree'] = '0'
1012+
1013+
if encoder =~ /^x264(?:_10bit)?$/
1014+
encoder_options['ratetol'] = 'inf'
1015+
encoder_options['mbtree'] = '0'
1016+
else
1017+
fail UsageError, "`--avbr` not available with the `#{encoder}` encoder"
1018+
end
10141019
when :raw
10151020
handbrake_options['vb'] = bitrate.to_s unless @handbrake_options.has_key? 'quality'
10161021
end

0 commit comments

Comments
 (0)