From 7e39d151d850590fbabc9870bc5134d9421c5c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 9 Apr 2018 15:27:11 +0200 Subject: Added support for the WEBM/VP9 video codec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- source/blender/blenloader/intern/versioning_270.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index f1c40aae399..e9de7919d25 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1796,6 +1796,23 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + int preset = scene->r.ffcodecdata.ffmpeg_preset; + if (preset == FFM_PRESET_NONE || preset >= FFM_PRESET_GOOD) { + continue; + } + if (preset <= FFM_PRESET_FAST) { + preset = FFM_PRESET_REALTIME; + } + else if (preset >= FFM_PRESET_SLOW) { + preset = FFM_PRESET_BEST; + } + else { + preset = FFM_PRESET_GOOD; + } + scene->r.ffcodecdata.ffmpeg_preset = preset; + } } } -- cgit v1.2.3