Skip to content

Commit 120c252

Browse files
Add rendering configuration for video output in MCPAgent
1 parent e097cf6 commit 120c252

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

app/mcp.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,16 @@ def _(payload: dict) -> MCPResult:
600600
return MCPResult(success=True, data={"queued_node": node_id})
601601
else:
602602
# Render all nodes in queue
603-
win.render_to_video()
603+
import tempfile
604+
from pathlib import Path
605+
temp_dir = Path(tempfile.gettempdir()) / "EfficientManim_Session"
606+
config = {
607+
"fps": 30,
608+
"resolution": (1280, 720),
609+
"quality": "m",
610+
"output_path": str(temp_dir),
611+
}
612+
win.render_to_video(config)
604613
return MCPResult(
605614
success=True, data={"message": "Render triggered."}
606615
)

core/mcp.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,16 @@ def _(payload: dict) -> MCPResult:
600600
return MCPResult(success=True, data={"queued_node": node_id})
601601
else:
602602
# Render all nodes in queue
603-
win.render_to_video()
603+
import tempfile
604+
from pathlib import Path
605+
temp_dir = Path(tempfile.gettempdir()) / "EfficientManim_Session"
606+
config = {
607+
"fps": 30,
608+
"resolution": (1280, 720),
609+
"quality": "m",
610+
"output_path": str(temp_dir),
611+
}
612+
win.render_to_video(config)
604613
return MCPResult(
605614
success=True, data={"message": "Render triggered."}
606615
)

0 commit comments

Comments
 (0)