diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-08-25 07:50:40 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-08-25 07:58:43 +0300 |
commit | 70f890b510562864e8a37d49afb4891bf083bf84 (patch) | |
tree | dbaddb061ba06437eb7f90cac516e58558dfa4db /release | |
parent | f80c39b74e3ab9c81572e639201e2a3b79c4b5ec (diff) |
VSE: Set default sound and video export format
Use video format for export instead of image sequence. Settings are same
as defined in h264_in_MP4 preset.
Sound default is AAC with 256kbit bitrate.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D7916
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py index 247a1ec342e..05ecac4d70c 100644 --- a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py @@ -29,9 +29,28 @@ def update_factory_startup_screens(): params.use_filter_folder = True +def update_factory_startup_ffmpeg_preset(): + preset = "H264_in_MP4" + preset_filepath = bpy.utils.preset_find(preset, preset_path="ffmpeg") + if not preset_filepath: + print("Preset %r not found" % preset) + + for scene in bpy.data.scenes: + render = scene.render + render.image_settings.file_format = 'FFMPEG' + + if preset_filepath: + bpy.ops.script.python_file_run({"scene": scene}, filepath=preset_filepath) + + render.ffmpeg.audio_codec = 'AAC' + render.ffmpeg.audio_bitrate = 256 + + @persistent def load_handler(_): update_factory_startup_screens() + if bpy.app.build_options.codec_ffmpeg: + update_factory_startup_ffmpeg_preset() def register(): |