Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2016-09-21 16:01:51 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2016-09-21 16:03:11 +0300
commita7e74791221e2ef9b44ee1b3eb9ece37785aa62a (patch)
treebdef7bcac914ea1330046baac05c52719c34cd7e /release/scripts/startup/bl_ui/properties_render.py
parent2476faebd751fe7a250d7a496a1f56338b83d4e9 (diff)
FFmpeg interface improvements
This patch changes a couple of things in the video output encoding. {F362527} - Clearer separation between container and codec. No more "format", as this is too ambiguous. As a result, codecs were removed from the container list. - Added FFmpeg speed presets, so the user can choosen from the range "Very slow" to "Ultra fast". By default no preset is used. - Added Constant Rate Factor (CRF) mode, which allows changing the bit-rate depending on the desired quality and the input. This generally produces the best quality videos, at the expense of not knowing the exact bit-rate and file size. - Added optional maximum of non-B-frames between B-frames (`max_b_frames`). - Presets were adjusted for these changes, and new presets added. One of the new presets is [recommended](https://trac.ffmpeg.org/wiki/Encode/VFX#H.264) for reviewing videos, as it allows players to scrub through it easily. Might be nice in weeklies. This preset also requires control over the `max_b_frames` setting. GUI-only changes: - Renamed "MPEG" in the output file format menu with "FFmpeg", as this is more accurate. After all, FFmpeg is used when this option is chosen, which can also output non-MPEG files. - Certain parts of the GUI are disabled when not in use: - bit rate options are not used when a constant rate factor is given. - audio bitrate & volume are not used when no audio is exported. Note that I did not touch `BKE_ffmpeg_preset_set()`. There are currently two preset systems for FFmpeg (`BKE_ffmpeg_preset_set()` and the Python preset system). Before we do more work on `BKE_ffmpeg_preset_set()`, I think it's a good idea to determine whether we want to keep it at all. After this patch has been accepted, I'd be happy to go through the code and remove any then-obsolete bits, such as the handling of "XVID" as a container format. Reviewers: sergey, mont29, brecht Subscribers: mpan3, Blendify, brecht, fsiddi Tags: #bf_blender Differential Revision: https://developer.blender.org/D2242
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_render.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py40
1 files changed, 26 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 152d4e96d5d..850606eb80b 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -461,31 +461,42 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
split = layout.split()
split.prop(rd.ffmpeg, "format")
- if ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'}:
- split.prop(ffmpeg, "codec")
- if ffmpeg.codec == 'H264':
- row = layout.row()
- row.label()
- row.prop(ffmpeg, "use_lossless_output")
- elif rd.ffmpeg.format == 'H264':
- split.prop(ffmpeg, "use_lossless_output")
- else:
- split.label()
+ split.prop(ffmpeg, "use_autosplit")
+
+ layout.separator()
+
+ needs_codec = ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'}
+ if needs_codec:
+ layout.prop(ffmpeg, "codec")
+ if ffmpeg.codec in {'DNXHD'}:
+ layout.prop(ffmpeg, "use_lossless_output")
+
+ # Output quality
+ if needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}:
+ layout.prop(ffmpeg, "constant_rate_factor")
+
+ # Encoding speed
+ layout.prop(ffmpeg, "ffmpeg_preset")
+ # I-frames
+ layout.prop(ffmpeg, "gopsize")
+ # B-Frames
row = layout.row()
- row.prop(ffmpeg, "video_bitrate")
- row.prop(ffmpeg, "gopsize")
+ row.prop(ffmpeg, "use_max_b_frames", text='Max B-frames')
+ pbox = row.split()
+ pbox.prop(ffmpeg, "max_b_frames", text='')
+ pbox.enabled = ffmpeg.use_max_b_frames
split = layout.split()
-
+ split.enabled = ffmpeg.constant_rate_factor == 'NONE'
col = split.column()
col.label(text="Rate:")
+ col.prop(ffmpeg, "video_bitrate")
col.prop(ffmpeg, "minrate", text="Minimum")
col.prop(ffmpeg, "maxrate", text="Maximum")
col.prop(ffmpeg, "buffersize", text="Buffer")
col = split.column()
- col.prop(ffmpeg, "use_autosplit")
col.label(text="Mux:")
col.prop(ffmpeg, "muxrate", text="Rate")
col.prop(ffmpeg, "packetsize", text="Packet Size")
@@ -497,6 +508,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
row = layout.row()
+ row.enabled = ffmpeg.audio_codec != 'NONE'
row.prop(ffmpeg, "audio_bitrate")
row.prop(ffmpeg, "audio_volume", slider=True)