diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-09 16:27:11 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-09 16:27:11 +0300 |
commit | 7e39d151d850590fbabc9870bc5134d9421c5c2c (patch) | |
tree | 3f9a81d25bb2638c62bd4d308cc51a06015a7511 /source/blender/makesrna | |
parent | 39116a434038cadafbfb7e63106ff45fefdd56d8 (diff) |
Added support for the WEBM/VP9 video codec
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).
WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:
- BEST → SLOWER
- GOOD → MEDIUM
- REALTIME → SUPERFAST
The VERYSLOW and ULTRAFAST options give very little extra benefit.
Reviewed by: @Severin
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 532dd03eca9..2eedd9a30d9 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5456,19 +5456,18 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""}, {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""}, {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, + {AV_CODEC_ID_VP9, "WEBM", 0, "WEBM / VP9", ""}, {0, NULL, 0, NULL, NULL} }; + /* Recommendations come from the FFmpeg wiki, https://trac.ffmpeg.org/wiki/Encode/VP9. + * The label for BEST has been changed to "Slowest" so that it fits the "Encoding Speed" + * property label in the UI. */ static const EnumPropertyItem ffmpeg_preset_items[] = { - {FFM_PRESET_ULTRAFAST, "ULTRAFAST", 0, "Ultra fast; biggest file", ""}, - {FFM_PRESET_SUPERFAST, "SUPERFAST", 0, "Super fast", ""}, - {FFM_PRESET_VERYFAST, "VERYFAST", 0, "Very fast", ""}, - {FFM_PRESET_FASTER, "FASTER", 0, "Faster", ""}, - {FFM_PRESET_FAST, "FAST", 0, "Fast", ""}, - {FFM_PRESET_MEDIUM, "MEDIUM", 0, "Medium speed", ""}, - {FFM_PRESET_SLOW, "SLOW", 0, "Slow", ""}, - {FFM_PRESET_SLOWER, "SLOWER", 0, "Slower", ""}, - {FFM_PRESET_VERYSLOW, "VERYSLOW", 0, "Very slow; smallest file", ""}, + {FFM_PRESET_BEST, "BEST", 0, "Slowest", + "Recommended if you have lots of time and want the best compression efficiency"}, + {FFM_PRESET_GOOD, "GOOD", 0, "Good", "The default and recommended for most applications"}, + {FFM_PRESET_REALTIME, "REALTIME", 0, "Realtime", "Recommended for fast encoding"}, {0, NULL, 0, NULL, NULL} }; @@ -5604,7 +5603,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffmpeg_preset"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, ffmpeg_preset_items); - RNA_def_property_enum_default(prop, FFM_PRESET_MEDIUM); + RNA_def_property_enum_default(prop, FFM_PRESET_GOOD); RNA_def_property_ui_text(prop, "Encoding speed", "Tradeoff between encoding speed and compression ratio"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); |