Hotfix: Failing to convert image sequences that do not start on frame 1

This commit is contained in:
Brett Williams
2023-06-15 19:35:39 -05:00
parent 54ec5f0e9c
commit 79ff451af8
2 changed files with 7 additions and 4 deletions

View File

@@ -2,9 +2,11 @@ import subprocess
from lib.engines.ffmpeg_engine import FFMPEG
def image_sequence_to_video(source_glob_pattern, output_path, framerate=24, encoder="prores_ks", profile=4):
subprocess.run([FFMPEG.renderer_path(), "-framerate", str(framerate), "-i", f"{source_glob_pattern}",
"-c:v", encoder, "-profile:v", str(profile), '-pix_fmt', 'yuva444p10le', output_path], check=True)
def image_sequence_to_video(source_glob_pattern, output_path, framerate=24, encoder="prores_ks", profile=4,
start_frame=1):
subprocess.run([FFMPEG.renderer_path(), "-framerate", str(framerate), "-start_number", str(start_frame), "-i",
f"{source_glob_pattern}", "-c:v", encoder, "-profile:v", str(profile), '-pix_fmt', 'yuva444p10le',
output_path], check=True)
def save_first_frame(source_path, dest_path, max_width=1280):