直接拼接逻辑

This commit is contained in:
2025-01-11 17:25:58 +08:00
parent da6579a9ed
commit ce469dacf2
7 changed files with 191 additions and 21 deletions

View File

@ -86,7 +86,10 @@ def download_template(template_id):
if str(_template['source']).startswith("http"):
_, _fn = os.path.split(_template['source'])
oss.download_from_oss(_template['source'], os.path.join(template_info['local_path'], _fn))
_template['source'] = _fn
if _fn.endswith(".mp4"):
from util.ffmpeg import to_annexb
_fn = to_annexb(os.path.join(template_info['local_path'], _fn))
_template['source'] = os.path.relpath(_fn, template_info['local_path'])
if 'overlays' in _template:
for i in range(len(_template['overlays'])):
overlay = _template['overlays'][i]