Using FFMPEG in Python

Hi,

As you surely know, when you want to export a video using blender you actually use FFMPEG for that (it’s particulary more noticeable since Blender 2.79). My question is can I actually use FFMPEG features using Python in Blender ?

I know I can simply ask the user to install ffmpeg anywhere, ask the directory and then use subprocess to call the executable but if anything already exist for that, that would be easier to manage.

Thanks in advance.

Hi. Yes you can. For some examples examine the .py presets at:

bpy.ops.script.python_file_run(filepath="C:\\Path\	o\\Blender\\install\\folder\\2.79\\scripts\\presets\\ffmpeg\\h264_in_Matroska.py")

You can edit these / add your own just name them uniquely.
Also see https://docs.blender.org/api/blender_python_api_current/bpy.types.FFmpegSettings.html#bpy.types.FFmpegSettings

Devs: Noticed some sliders are only adjustable via python now, video bitrate for example, this intended or a bug? There a switch to enable them again in the gui? 2.72 worked as expected, 2.79 on does not.