fix: 修复字幕应用功能输出目录不存在的错误

This commit is contained in:
imeepos 2025-09-19 17:54:37 +08:00
parent aa21850643
commit 843e113fb5
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ with ffmpeg_worker_image.imports():
subtitle_path = f"{s3_mount}/{subtitle.cache_filepath}" if subtitle else None
embed_subtitle_path = f"{s3_mount}/{embed_subtitle.cache_filepath}" if embed_subtitle else None
output_path = f"{output_path_prefix}/{config.modal_environment}/subtitle_apply/{func_id}/output.mp4"
os.makedirs(os.path.dirname(output_path), exist_ok=True)
if fonts:
font_dir = f"{output_path_prefix}/{config.modal_environment}/subtitle_apply/{func_id}/fonts"
os.makedirs(font_dir, exist_ok=True)