feat(music-lab): video.py — Windows에 style/background_mode/tracks 전달 + orchestrator 파라미터 wiring
This commit is contained in:
@@ -202,12 +202,24 @@ async def _run_video(p, ctx):
|
||||
vd = setup["visual_defaults"]
|
||||
audio_path = ctx["audio_path"]
|
||||
cover_path = _local_path(p["cover_url"])
|
||||
|
||||
style = p.get("visual_style") or vd.get("default_visual_style", "essential")
|
||||
bg_mode = p.get("background_mode") or vd.get("default_background_mode", "static")
|
||||
bg_path = None
|
||||
if bg_mode == "video_loop":
|
||||
loop_local = os.path.join(storage.pipeline_dir(p["id"]), "loop.mp4")
|
||||
bg_path = loop_local if os.path.isfile(loop_local) else None
|
||||
|
||||
out = await asyncio.to_thread(
|
||||
video.generate,
|
||||
pipeline_id=p["id"], audio_path=audio_path, cover_path=cover_path,
|
||||
genre=ctx["genre"],
|
||||
duration_sec=ctx["duration_sec"],
|
||||
resolution=vd["resolution"], style=vd["style"],
|
||||
resolution=vd.get("resolution", "1920x1080"),
|
||||
style=style,
|
||||
background_mode=bg_mode,
|
||||
background_path=bg_path,
|
||||
tracks=ctx["tracks"] if len(ctx["tracks"]) > 1 else None,
|
||||
)
|
||||
return {"next_state": "video_pending", "fields": {"video_url": out["url"]}}
|
||||
|
||||
@@ -230,6 +242,7 @@ async def _run_meta(p, ctx, feedback):
|
||||
"duration_sec": ctx["duration_sec"], "moods": ctx["moods"]},
|
||||
template=setup["metadata_template"],
|
||||
trend_keywords=trend_top, feedback=feedback,
|
||||
tracks=ctx["tracks"] if len(ctx["tracks"]) > 1 else None,
|
||||
)
|
||||
return {"next_state": "meta_pending",
|
||||
"fields": {"metadata_json": json.dumps(out, ensure_ascii=False)}}
|
||||
|
||||
Reference in New Issue
Block a user