Harden talking-head pipeline: Watch & Propose creative overlays, fix Round 1 gaps
Scene-director rewrite: agent now watches footage, understands content, and proposes creative overlays (charts, stats, key terms, comparisons) before building anything. Presents enhancement plan to user for approval before proceeding. Compose-director fixes from Round 1 verification: - eye_enhance: now explicitly required, not silently skippable - Caption positioning: explicit MarginV=160 for 9:16, never center - Final encode: mandatory with target file size table - ASR corrections: new Step 2b to scan transcript and build corrections dict - Overlay compositing: new Step 3b for burning approved graphics onto footage Asset-director rewrite: generates Remotion overlay assets (callouts, stat cards, charts, comparisons) from scene plan. Includes overlay type → Remotion cut mapping table and dark theme requirements. Bug fixes found during subagent verification: - remotion_caption_burn.py: fix run_command API, add npx.cmd for Windows - visual_qa.py: fix run_command API (3 places), Windows /dev/null → NUL
This commit is contained in:
@@ -215,7 +215,8 @@ class VisualQA(BaseTool):
|
||||
input_path,
|
||||
]
|
||||
import json
|
||||
probe_out = self.run_command(cmd, capture=True)
|
||||
probe_result = self.run_command(cmd)
|
||||
probe_out = probe_result.stdout
|
||||
probe_data = json.loads(probe_out)
|
||||
|
||||
# Extract key info
|
||||
@@ -302,10 +303,11 @@ class VisualQA(BaseTool):
|
||||
"-t", "3",
|
||||
"-i", input_path,
|
||||
"-vn", "-af", "volumedetect",
|
||||
"-f", "null", "/dev/null",
|
||||
"-f", "null", "NUL" if __import__("sys").platform == "win32" else "/dev/null",
|
||||
]
|
||||
try:
|
||||
output = self.run_command(cmd, capture=True, stderr=True)
|
||||
cmd_result = self.run_command(cmd)
|
||||
output = cmd_result.stderr # volumedetect outputs to stderr
|
||||
mean_vol = None
|
||||
max_vol = None
|
||||
for line in output.split("\n"):
|
||||
@@ -340,4 +342,5 @@ class VisualQA(BaseTool):
|
||||
"-of", "csv=p=0",
|
||||
path,
|
||||
]
|
||||
return float(self.run_command(cmd, capture=True).strip().split("\n")[0])
|
||||
dur_result = self.run_command(cmd)
|
||||
return float(dur_result.stdout.strip().split("\n")[0])
|
||||
|
||||
@@ -257,7 +257,8 @@ class RemotionCaptionBurn(BaseTool):
|
||||
"-of", "csv=p=0",
|
||||
input_path,
|
||||
]
|
||||
dur_out = self.run_command(dur_cmd, capture=True)
|
||||
dur_result = self.run_command(dur_cmd)
|
||||
dur_out = dur_result.stdout
|
||||
duration_s = float(dur_out.strip().split("\n")[0])
|
||||
total_frames = math.ceil(duration_s * 30)
|
||||
|
||||
@@ -281,9 +282,11 @@ class RemotionCaptionBurn(BaseTool):
|
||||
props_file = props_dir / f"caption-burn-{Path(input_path).stem}.json"
|
||||
props_file.write_text(json.dumps(props, indent=2), encoding="utf-8")
|
||||
|
||||
# Render
|
||||
# Render (use npx.cmd on Windows for subprocess compatibility)
|
||||
import sys
|
||||
npx_bin = "npx.cmd" if sys.platform == "win32" else "npx"
|
||||
render_cmd = [
|
||||
"npx", "remotion", "render",
|
||||
npx_bin, "remotion", "render",
|
||||
"src/index.tsx", "TalkingHead",
|
||||
f"--props={props_file.relative_to(root)}",
|
||||
"--width=1080", "--height=1920", "--fps=30",
|
||||
|
||||
Reference in New Issue
Block a user