Video Use
Use this skill to edit local footage into a polished video. The agent reasons from word-level transcript JSON plus on-demand visual drill-downs, then renders with ffmpeg helpers.
Required MCP Tools
| Tool |
Use |
prepare_file_upload |
Prepare a policy-controlled OSS direct upload. Use purpose="video_audio", then upload the local wav to upload_url with HTTP PUT. |
create_video_asr_task |
Transcribe an OSS-backed audio_key or HTTPS audio_url through server-side OpenAI-compatible FunASR and return normalized word-level JSON. |
query_video_asr_task |
Optional compatibility lookup for an already completed ASR result by task_id. |
pack_video_transcripts |
Convert normalized transcripts into takes_packed.md markdown. |
Never call ASR provider HTTP APIs directly and never handle provider API keys. Do not use SRT-only or phrase-only transcription as the editing source; cuts need word boundaries.
Core Rules
- Confirm the strategy in plain language before rendering the edit.
- Cache transcripts under
<videos_dir>/edit/transcripts/; do not re-transcribe unchanged sources.
- Audio drives cut candidates; use visual checks only at decision points.
- Never cut inside a word. Snap cut edges to transcript word boundaries and pad by 30-200ms.
- Extract each segment first, add 30ms audio fades, then concat losslessly.
- Shift overlays with
setpts=PTS-STARTPTS+T/TB.
- Apply subtitles last in the final filter chain so overlays never hide captions; subtitles are applied LAST.
- Store all session outputs under
<videos_dir>/edit/, not inside the skill directory.
Directory Layout
<videos_dir>/
<source footage>
edit/
project.md
transcripts/<source>.json
takes_packed.md
edl.json
animations/slot_<id>/
clips_graded/
master.srt
verify/
preview.mp4
final.mp4
Workflow
- Inventory sources with
ffprobe; create <videos_dir>/edit/.
- For each source, extract audio:
ffmpeg -y -i "$VIDEO" -vn -ac 1 -ar 16000 -codec:a pcm_s16le "$DIR/<stem>.wav".
- Call
prepare_file_upload with purpose="video_audio", filename="<stem>.wav", and content_type="audio/wav"; upload $DIR/<stem>.wav to the returned upload_url with curl --fail -X PUT -H "Content-Type: audio/wav" --upload-file "$DIR/<stem>.wav" "$UPLOAD_URL"; then call create_video_asr_task with the returned audio_key and save the returned normalized transcript JSON to edit/transcripts/<stem>.json. Do not call provider HTTP APIs directly.
- Call
pack_video_transcripts with the transcript map and save the returned markdown to takes_packed.md.
- Read
takes_packed.md, note verbal slips, retakes, strong beats, and likely cuts.
- Ask for or infer target length, aspect, pacing, subtitle style, grade, and overlay needs; write a short strategy and wait for confirmation.
- Write
edl.json using transcript word boundaries. Include sources, ranges, optional grade, optional overlays, and subtitle settings.
- Use helper scripts from
scripts/:
timeline_view.py <video> <start> <end> for filmstrip/waveform checks.
grade.py <in> -o <out> for grade experiments.
render.py <edl.json> -o preview.mp4 --preview --build-subtitles for preview, then final render.
- Self-evaluate rendered output around every cut boundary and at start/middle/end. Check visual jumps, audio pops, subtitle readability, overlay timing, and duration.
- Iterate from user feedback without re-transcribing. Append decisions and final paths to
project.md.
Subtitle Defaults
Use Source Han Sans / 思源黑体 for burned subtitles. Prefer these font names or paths in force_style and helper patches:
Source Han Sans SC
Noto Sans CJK SC
/System/Library/Fonts/PingFang.ttc only as a local fallback
Default style: white bold text with black outline, lower third but above platform UI safe zones. Keep subtitles applied LAST. For fast social edits, use short chunks; for narrative or education, use natural sentence chunks.
EDL Shape
Use this minimal shape unless the edit needs more:
{
"sources": {"take-a": "/abs/path/take-a.mp4"},
"ranges": [
{"source": "take-a", "start": 1.23, "end": 6.78, "beat": "HOOK"}
],
"grade": "neutral_punch",
"subtitles": {"enabled": true, "style": "source-han-bold"},
"overlays": [
{"file": "animations/slot_01/render.webm", "start": 2.0, "end": 5.0, "x": 0, "y": 0}
]
}
Animation Overlays
Create each overlay under edit/animations/slot_<id>/ and hand off to the most specific overlay skill:
- Use official
music-to-video or slideshow skills when the brief matches their HyperFrames workflows, then use hyperframes-video-overlays skill for the Anban edl.json handoff.
- Use official
remotion-best-practices skill for Remotion implementation guidance, then use remotion-video-overlays skill when React composition, props, or reusable branded templates are useful.
- Use
manim-video-overlays skill for diagrams, formulas, charts, arrows, timelines, and precise educational motion.
- Use
pil-video-overlays skill for simple deterministic cards, counters, progress bars, badges, and fallback PNG sequences.
Overlay skills must return edit/animations/slot_<id>/render.webm with alpha when possible and an overlays[] item for edl.json containing file, start, end, x, and y. For example: {"file":"animations/slot_01/render.webm","start":2.0,"end":5.0,"x":0,"y":0}.
Render overlays before final composition. Verify duration, dimensions, alpha channel, safe zones, and timing against narration. Keep subtitles applied LAST; subtitles are applied LAST so overlays never hide captions.
1---2name: video-use3description: Use when editing source footage into finished videos by conversation: 多素材成片剪辑, talking-head cleanup, 去口癖, retake selection, subtitles, color grade, animation overlays, social-ready exports, or transcript-backed video editing with OpenAI-compatible FunASR MCP tools.4---56# Video Use78Use this skill to edit local footage into a polished video. The agent reasons from word-level transcript JSON plus on-demand visual drill-downs, then renders with ffmpeg helpers.910## Required MCP Tools1112| Tool | Use |13| --- | --- |14| `prepare_file_upload` | Prepare a policy-controlled OSS direct upload. Use `purpose="video_audio"`, then upload the local wav to `upload_url` with HTTP PUT. |15| `create_video_asr_task` | Transcribe an OSS-backed `audio_key` or HTTPS `audio_url` through server-side OpenAI-compatible FunASR and return normalized word-level JSON. |16| `query_video_asr_task` | Optional compatibility lookup for an already completed ASR result by `task_id`. |17| `pack_video_transcripts` | Convert normalized transcripts into `takes_packed.md` markdown. |1819Never call ASR provider HTTP APIs directly and never handle provider API keys. Do not use SRT-only or phrase-only transcription as the editing source; cuts need word boundaries.2021## Core Rules22231. Confirm the strategy in plain language before rendering the edit.242. Cache transcripts under `<videos_dir>/edit/transcripts/`; do not re-transcribe unchanged sources.253. Audio drives cut candidates; use visual checks only at decision points.264. Never cut inside a word. Snap cut edges to transcript word boundaries and pad by 30-200ms.275. Extract each segment first, add 30ms audio fades, then concat losslessly.286. Shift overlays with `setpts=PTS-STARTPTS+T/TB`.297. Apply subtitles last in the final filter chain so overlays never hide captions; subtitles are applied LAST.308. Store all session outputs under `<videos_dir>/edit/`, not inside the skill directory.3132## Directory Layout3334```text35<videos_dir>/36 <source footage>37 edit/38 project.md39 transcripts/<source>.json40 takes_packed.md41 edl.json42 animations/slot_<id>/43 clips_graded/44 master.srt45 verify/46 preview.mp447 final.mp448```4950## Workflow51521. Inventory sources with `ffprobe`; create `<videos_dir>/edit/`.532. For each source, extract audio:54 `ffmpeg -y -i "$VIDEO" -vn -ac 1 -ar 16000 -codec:a pcm_s16le "$DIR/<stem>.wav"`.553. Call `prepare_file_upload` with `purpose="video_audio"`, `filename="<stem>.wav"`, and `content_type="audio/wav"`; upload `$DIR/<stem>.wav` to the returned `upload_url` with `curl --fail -X PUT -H "Content-Type: audio/wav" --upload-file "$DIR/<stem>.wav" "$UPLOAD_URL"`; then call `create_video_asr_task` with the returned `audio_key` and save the returned normalized transcript JSON to `edit/transcripts/<stem>.json`. Do not call provider HTTP APIs directly.564. Call `pack_video_transcripts` with the transcript map and save the returned markdown to `takes_packed.md`.575. Read `takes_packed.md`, note verbal slips, retakes, strong beats, and likely cuts.586. Ask for or infer target length, aspect, pacing, subtitle style, grade, and overlay needs; write a short strategy and wait for confirmation.597. Write `edl.json` using transcript word boundaries. Include sources, ranges, optional grade, optional overlays, and subtitle settings.608. Use helper scripts from `scripts/`:61 - `timeline_view.py <video> <start> <end>` for filmstrip/waveform checks.62 - `grade.py <in> -o <out>` for grade experiments.63 - `render.py <edl.json> -o preview.mp4 --preview --build-subtitles` for preview, then final render.649. Self-evaluate rendered output around every cut boundary and at start/middle/end. Check visual jumps, audio pops, subtitle readability, overlay timing, and duration.6510. Iterate from user feedback without re-transcribing. Append decisions and final paths to `project.md`.6667## Subtitle Defaults6869Use Source Han Sans / 思源黑体 for burned subtitles. Prefer these font names or paths in `force_style` and helper patches:7071- `Source Han Sans SC`72- `Noto Sans CJK SC`73- `/System/Library/Fonts/PingFang.ttc` only as a local fallback7475Default style: white bold text with black outline, lower third but above platform UI safe zones. Keep subtitles applied LAST. For fast social edits, use short chunks; for narrative or education, use natural sentence chunks.7677## EDL Shape7879Use this minimal shape unless the edit needs more:8081```json82{83 "sources": {"take-a": "/abs/path/take-a.mp4"},84 "ranges": [85 {"source": "take-a", "start": 1.23, "end": 6.78, "beat": "HOOK"}86 ],87 "grade": "neutral_punch",88 "subtitles": {"enabled": true, "style": "source-han-bold"},89 "overlays": [90 {"file": "animations/slot_01/render.webm", "start": 2.0, "end": 5.0, "x": 0, "y": 0}91 ]92}93```9495## Animation Overlays9697Create each overlay under `edit/animations/slot_<id>/` and hand off to the most specific overlay skill:9899- Use official `music-to-video` or `slideshow` skills when the brief matches their HyperFrames workflows, then use `hyperframes-video-overlays` skill for the Anban `edl.json` handoff.100- Use official `remotion-best-practices` skill for Remotion implementation guidance, then use `remotion-video-overlays` skill when React composition, props, or reusable branded templates are useful.101- Use `manim-video-overlays` skill for diagrams, formulas, charts, arrows, timelines, and precise educational motion.102- Use `pil-video-overlays` skill for simple deterministic cards, counters, progress bars, badges, and fallback PNG sequences.103104Overlay skills must return `edit/animations/slot_<id>/render.webm` with alpha when possible and an `overlays[]` item for `edl.json` containing `file`, `start`, `end`, `x`, and `y`. For example: `{"file":"animations/slot_01/render.webm","start":2.0,"end":5.0,"x":0,"y":0}`.105106Render overlays before final composition. Verify duration, dimensions, alpha channel, safe zones, and timing against narration. Keep subtitles applied LAST; subtitles are applied LAST so overlays never hide captions.