mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Blender image sequences now generate a preview mp4 on completion
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import subprocess
|
||||
import ffmpeg # todo: remove all references to ffmpeg library and instead use direct subprocesses
|
||||
from ..render_engines.ffmpeg_engine import FFMPEG
|
||||
|
||||
|
||||
def file_info(path):
|
||||
@@ -10,9 +11,9 @@ def file_info(path):
|
||||
return None
|
||||
|
||||
|
||||
def image_sequence_to_video(source_glob_pattern, output_path, framerate="24", encoder="libx264"):
|
||||
subprocess.run(['ffmpeg', "-y", "-framerate", framerate, "-pattern_type", "glob", "-i", f"{source_glob_pattern}",
|
||||
"-c:v", encoder, output_path])
|
||||
def image_sequence_to_video(source_glob_pattern, output_path, framerate="24", encoder="libx264", pix_fmt="yuv420p"):
|
||||
subprocess.run([FFMPEG.renderer_path(), "-framerate", str(framerate), "-i", f"{source_glob_pattern}",
|
||||
"-c:v", encoder, "-pix_fmt", pix_fmt, output_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
|
||||
def save_first_frame(source_path, dest_path, max_width=1280, run_async=False):
|
||||
|
||||
Reference in New Issue
Block a user