choose source and arrow for generated videos

This commit is contained in:
2026-05-03 02:51:27 +08:00
parent 2fcab9c71a
commit 5ba2d48fdb
3 changed files with 70 additions and 16 deletions

View File

@@ -864,13 +864,14 @@ class Handler(BaseHTTPRequestHandler):
input_dir = body["inputDir"]
max_angle = float(body.get("maxAngle", 20))
duration = float(body.get("durationSeconds", 6))
show_arrow = bool(body.get("showArrow", True))
def worker(job_id):
job_root = RESULT_DIR / job_id
reset_dir(job_root)
output_file = job_root / f"head_extension_{job_id}.mp4"
set_job(job_id, message="正在生成 0° 到目标角度的视频。")
output = generate_video(input_dir, output_file, max_angle, duration)
output = generate_video(input_dir, output_file, max_angle, duration, show_arrow)
output = Path(output).resolve()
return {
"video": {