python – FFMPEG not available
I tried this simple Python script in Blender:
import bpy
scene = bpy.context.scene
scene.render.filepath = "//output/video"
scene.render.image_settings.file_format="FFMPEG"
scene.render.ffmpeg.format="MPEG4"
scene.render.ffmpeg.codec="H264"
scene.render.ffmpeg.audio_codec="NONE"
scene.frame_start = 1
scene.frame_end = 1
bpy.ops.render.render(animation=True)
But it crashes with the following message:
render.image_settings.file_format="FFMPEG"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: bpy_struct: item.attr = val: enum "FFMPEG" not found in ('JPEG', 'OPEN_EXR', 'PNG', 'WEBP', 'BMP', 'CINEON', 'DPX', 'IRIS', 'JPEG2000', 'HDR', 'TARGA', 'TARGA_RAW', 'TIFF')
I am using Blender 5.0.1 on an Ubuntu machine. Why FFMPEG is not available and how to fix it?
Read more here: Source link
