Skip to content

Commit

Permalink
Fix T54360: FFMPEG bitrate not editable for all codecs
Browse files Browse the repository at this point in the history
The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
  • Loading branch information
sybrenstuvel committed Mar 22, 2018
1 parent 6f07673 commit f4dc9f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions release/scripts/startup/bl_ui/properties_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ def draw(self, context):
layout.prop(ffmpeg, "use_lossless_output")

# Output quality
if needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}:
use_crf = needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}
if use_crf:
layout.prop(ffmpeg, "constant_rate_factor")

# Encoding speed
Expand All @@ -488,7 +489,7 @@ def draw(self, context):
pbox.enabled = ffmpeg.use_max_b_frames

split = layout.split()
split.enabled = ffmpeg.constant_rate_factor == 'NONE'
split.enabled = not use_crf or ffmpeg.constant_rate_factor == 'NONE'
col = split.column()
col.label(text="Rate:")
col.prop(ffmpeg, "video_bitrate")
Expand Down

0 comments on commit f4dc9f9

Please sign in to comment.