Overview
Expand the video frame outward via outpainting in the specified direction(s), with AI intelligently completing the expanded area based on prompt . Supports any combination of left/right/up/down directions, with each edge expanded by 0~0.5 times the original edge length. Duration remains unchanged; only the frame becomes wider/taller.
Not handled: video content editing (replacing frame content), extending video duration, video cropping/shrinking, image expansion.
API Mapping
| Scenario | API name | workflow |
|---|---|---|
| Video canvas expansion (outpainting) | video_canvas_expand |
aigc_vace_outpainting_flow |
Dependencies
- meitu-cli:
>=2.0.6 - Credentials:CONFIG AKSK →
meitu tools update; EXEC AKSK → run command - Environment variables:
MEITU_OPENAPI_TOOL_TASK_MODE=command
Path alias:
$VISUAL={OPENCLAW_HOME}/workspace/visual/
Core Workflow
Preflight → Execute → Deliver
Preflight
meitu --versionandmeitu auth verify --json- Detect
MEITU_OPENAPI_TOOL_TASK_MODE=command - output_dir: project →
./output/; one-off →$VISUAL/output/video-canvas-expand/;mkdir -p
Execute
Trigger signals and routing
| User's exact words | Route |
|---|---|
| Expand video / video outpainting / outpainting / expand in a certain direction / add imagery | video_canvas_expand |
Decision order:
video_urlmissing → ask follow-up;promptmissing → ask "what should be added to the expanded area"directionsif not provided, defaults to expanding all four directions;expand_ratioif not provided, defaults to0.3- Only route: call
video_canvas_expand
Parameter definitions
| Parameter | Type | Required | Range | Default | Description |
|---|---|---|---|---|---|
video_url |
STRING | Yes | — | — | Original video URL |
prompt |
STRING | Yes | — | — | What to add to the expanded area (e.g., "add blue sky", "extend the street scene") |
expand_ratio |
STRING | No | 0 ~ 0.5 | "0.3" |
Expansion ratio per edge |
directions |
STRING | No | left/right/up/down combination (comma-separated) | "left,right,up,down" |
Expansion direction |
Tool invocation
meitu video-canvas-expand \
--skill_name skill_video-canvas-expand \
--video_url {url} \
--prompt "{扩展内容描述}" \
[--expand_ratio 0.3] \
[--directions "left,right,up,down"] \
--json --download-dir {output_dir}
Error fallback
| Scenario | Handling |
|---|---|
video_url missing |
Prompt "Please provide the video to be expanded" |
video_url inaccessible |
Do not retry; prompt "Please provide a valid video link" |
prompt missing |
Prompt "Please describe what you want to complete in the expanded area (e.g., 'add blue sky')" |
expand_ratio out of range (<0 or >0.5) |
Clamp to [0, 0.5] or prompt for adjustment |
directions invalid value |
Fall back to the default four directions |
| API call failure / timeout | Retry once; if still failing, return an error |
| Content compliance block | Return the compliance notice directly; do not retry |
| User says "change to 16:9" but the intent is cropping | This tool only expands, it does not crop; explain the difference |
| Input is an image | Reject; only videos are supported |
Deliver
mv {file} {output_dir}/{date}_{name}_canvas-expand.mp4
Output
- Format:MP4
- Naming:
{YYYY-MM-DD}_{descriptive-name}_canvas-expand.mp4 - Location: project →
./output/; one-off →$VISUAL/output/video-canvas-expand/
Baseline Task ID
t_mt1a3i5n7b66e66f5e-5e15-40b7-bf78-412a9490540b