This commit is contained in:
2024-12-24 14:59:52 +08:00
parent 5ed7198a8a
commit 7bcb561a65
9 changed files with 28 additions and 12 deletions

@ -33,6 +33,9 @@ def parse_ffmpeg_task(task_info, template_info):
task = FfmpegTask(tasks, output_file=output_file)
overall = template_info.get("overall_template")
task.frame_rate = template_info.get("frame_rate", 25)
if overall.get('source', ''):
source = parse_video(overall.get('source'), task_params, template_info)
task.add_inputs(source)
for lut in overall.get('filters', []):
task.add_lut(os.path.join(template_info.get("local_path"), lut))
for audio in overall.get('audios', []):
@ -56,7 +59,7 @@ def parse_video(source, task_params, template_info):
new_sources = new_sources[0].get("url")
if new_sources.startswith("http"):
_, source_name = os.path.split(new_sources)
oss.download_from_oss(new_sources, source)
oss.download_from_oss(new_sources, source_name)
return source_name
return new_sources
return os.path.join(template_info.get("local_path"), source)