尝试传入resolution,不使用scale自适应模板

This commit is contained in:
2025-04-28 14:54:30 +08:00
parent f139fbccd7
commit 1603be9157
3 changed files with 14 additions and 2 deletions

View File

@ -33,6 +33,7 @@ def parse_ffmpeg_task(task_info, template_info):
logger.info("because only_if exist, placeholder: %s not exist, skip part: %s", only_if, part)
continue
sub_ffmpeg_task = FfmpegTask(source)
sub_ffmpeg_task.resolution = template_info.get("video_size", "")
sub_ffmpeg_task.annexb = True
sub_ffmpeg_task.ext_data = find_placeholder_params(part.get('source'), task_params) or {}
sub_ffmpeg_task.frame_rate = template_info.get("frame_rate", 25)
@ -48,6 +49,7 @@ def parse_ffmpeg_task(task_info, template_info):
tasks.append(sub_ffmpeg_task)
output_file = "out_" + str(time.time()) + ".mp4"
task = FfmpegTask(tasks, output_file=output_file)
task.resolution = template_info.get("video_size", "")
overall = template_info.get("overall_template")
task.center_cut = template_info.get("crop_mode", None)
task.frame_rate = template_info.get("frame_rate", 25)