fix: 修复字幕应用功能输出目录不存在的错误
This commit is contained in:
parent
aa21850643
commit
843e113fb5
|
|
@ -44,6 +44,7 @@ with ffmpeg_worker_image.imports():
|
||||||
subtitle_path = f"{s3_mount}/{subtitle.cache_filepath}" if subtitle else None
|
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
|
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"
|
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:
|
if fonts:
|
||||||
font_dir = f"{output_path_prefix}/{config.modal_environment}/subtitle_apply/{func_id}/fonts"
|
font_dir = f"{output_path_prefix}/{config.modal_environment}/subtitle_apply/{func_id}/fonts"
|
||||||
os.makedirs(font_dir, exist_ok=True)
|
os.makedirs(font_dir, exist_ok=True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue