SuperAPI AI Directory

video-stitch

Design & creation

View repository

Updated 10-16 09:32

About this skill

Video Stitch

Overview

Call meitu video-stitch to concatenate and merge multiple video segments (≥2 segments) in sequence, covering 2 categories:

  1. Pure concatenation (preserve original audio):video_stitching,video_volume control original audio volume
  2. Concatenation + background music:video_splicing_music, automatically search music by prompt ; when music_url is provided, skip the search and use the custom music directly

Custom transitions are not supported. Not handled: single-video trimming/speed adjustment, voiceover dubbing, GIF conversion, video style transformation.

API Mapping

Scenario Backend API
Pure concatenation preserving original audio video_stitching
Concatenation + background music (automatic search / custom music_url) video_splicing_music

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

  1. meitu --version ≥ 2.0.6;meitu auth verify --json
  2. Confirm that the Config Phase has been run;MEITU_OPENAPI_TOOL_TASK_MODE=command
  3. output_dir resolution: openclaw.yaml → ./output/ | else → $VISUAL/output/video-stitch/;mkdir -p {output_dir}

Execute

Trigger signals/routing

Matched signal words:

  • video_stitching(pure concatenation): concatenate, merge, put together, no music needed, preserve original audio
  • video_splicing_music(concatenation + background music): concatenate with background music, merge and add music, concatenate + custom music URL

Decision order:

  1. video_list count <2 → prompt "concatenation requires at least 2 video segments"
  2. Agent identifies video materials and generates prompt to assist routing
  3. Branch by background music requirement:
    • No music needed / has original audio → video_stitching(default)
    • Background music needed (no music_url)→ video_splicing_music + prompt automatic search
    • Background music needed (has music_url)→ video_splicing_music + music_url skip search

Ambiguous intent ("just concatenate it") → default to video_stitching。

Parameter definitions

General:

Parameter Type Required Range Default value Description
video_list ARRAY[STRING] Yes ≥2 -- List of video addresses
prompt STRING Yes -- "music" Music search keywords / material description
video_volume NUMBER No 0–2.0 1 Original video audio volume

video_splicing_music Additional:

Parameter Type Required Range Default value Description
music_url STRING No -- -- Custom music URL; when present, skip prompt automatic search
canvas_flag NUMBER No 0 / 1 0 0=portrait (9:16), 1=landscape (16:9)

API parameter mapping

video_stitching:video_list → video_list;video_volume → video_volume(direct pass)

video_splicing_music:video_list → video_urls;prompt → content;video_volume、music_url、canvas_flag direct pass

Tool invocation

Pure concatenation:

meitu video-stitch \
  --skill_name skill_video-stitch \
  --video_list '["{url1}","{url2}"]' \
  --prompt "通用视频素材" \
  --video_volume 1 \
  --json --download-dir {output_dir}

Concatenation + automatic background music:

meitu video-stitch \
  --skill_name skill_video-stitch \
  --video_list '["{url1}","{url2}"]' \
  --prompt "轻快的旅拍背景音乐" \
  --json --download-dir {output_dir}

Concatenation + custom music:

meitu video-stitch \
  --skill_name skill_video-stitch \
  --video_list '["{url1}","{url2}"]' \
  --music_url "{music_url}" \
  --canvas_flag 0 \
  --json --download-dir {output_dir}

Error fallback

Scenario Handling
video_list missing Prompt "please provide video links"
Video count <2 Prompt "concatenation requires at least 2 video segments"
Some links are inaccessible Filter out invalid links and execute with the remaining videos
All inaccessible Prompt "Please provide valid video links"
music_url inaccessible Fall back to prompt automatic retrieval
video_volume exceeds 0–2.0 Clamp to the legal range
canvas_flag not 0/1 Fall back to default 0 (portrait)
User requests "add transition effects" Inform that custom transitions are not supported and use the default hard-cut concatenation
video_stitching call failed Retry once; if it still fails, return an error
video_splicing_music call failed Retry once; if it still fails, return an error
Content compliance interception Return the compliance prompt directly without retrying
Provide both music_url + style prompt Prioritize music_url, with the prompt only as an auxiliary

Deliver

Parse --json → downloaded_files[0].saved_path or media_urls[0]。

mv {file} {output_dir}/{YYYY-MM-DD}_{name}_stitch.mp4

Output

  • Format: MP4 (default portrait 9:16, switchable to landscape 16:9)
  • Naming:{YYYY-MM-DD}_{descriptive-name}_stitch.mp4
  • Location: Project → ./output/; one-time → $VISUAL/output/video-stitch/

Baseline Task ID

t_mt1a3i5n7bc437c380-3bce-4dd3-9b62-67226da73d91