Skip to content

iamnigellee/cutcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jianyingpro-mix-edit — 剪映专业版混剪 Skill

中文用户使用指南:docs/USAGE.md —— 第一次怎么装、日常怎么用、跟 AI 怎么发指令。

An Anthropic Skill for macOS that:

  1. Stitches a list of video clips end-to-end.
  2. (Optional) Synthesizes a voiceover from a text script via edge-tts — free, no API key.
  3. (Optional) Auto-places sound effects (whoosh / ding / boom / pop / boing / …) at semantically appropriate moments. SFX are synthesized procedurally with ffmpeg — no license issues, no network dependency, no missing files.
  4. Generates a 剪映专业版 draft and opens 剪映 to it.
  5. Hands off to the user for transitions, captions, color grading, BGM, and export.

The skill itself lives at skills/jianyingpro-mix-edit/.

Two workflows

  • Mode A — Clips + script: user has clips, gives a narration script. Skill TTSs, places SFX on the beats, builds the draft.
  • Mode B — Script-driven cut: user has script + raw clips. Skill TTSs, helps map sentences to clips, places SFX, builds the draft.

In both modes, BGM is added inside 剪映 (剪映 has a great built-in music library).

Install

The skill ships with an OpenClaw metadata block in its frontmatter, so it loads cleanly in OpenClaw. It also works in Anthropic-native clients (Claude Code, Claude Desktop) that ignore unknown frontmatter keys.

For OpenClaw (recommended):

git clone https://github.com/iamnigellee/cutcut ~/code/cutcut

mkdir -p ~/.openclaw/skills
ln -s ~/code/cutcut/skills/jianyingpro-mix-edit ~/.openclaw/skills/jianyingpro-mix-edit

brew install ffmpeg
python3 -m pip install --user -r ~/.openclaw/skills/jianyingpro-mix-edit/scripts/requirements.txt

For Claude Code / Claude Desktop:

mkdir -p ~/.claude/skills
ln -s ~/code/cutcut/skills/jianyingpro-mix-edit ~/.claude/skills/jianyingpro-mix-edit

Restart your client. Ask "用剪映把这些素材混剪一下,文案我给你",skill 自动触发。

If a client doesn't follow symlinks, replace ln -s with cp -R.

Requirements

  • macOS (skill is macOS-only).
  • 剪映专业版 installed at /Applications/JianyingPro.app.
  • Python 3.9+.
  • ffmpeg / ffprobe (brew install ffmpeg).
  • pyJianYingDraft ≥ 0.2.6 — draft file generation.
  • edge-tts ≥ 6.1.0 — voiceover synthesis (free, no API key).

What the skill does

  1. TTStts.py calls edge-tts, writes vo.mp3 + word-level SRT + sentence-level timing JSON.
  2. Probeprobe_media.py runs ffprobe on each media file (handles rotation metadata).
  3. SFXgenerate_sfx.py synthesizes 13 categories of SFX with ffmpeg lavfi (sine waves, filtered noise, vibrato, fades). Idempotent; runs on demand.
  4. Buildbuild_draft.py generates draft_content.json and draft_meta_info.json via pyJianYingDraft. Lays clips on the main video track, voiceover on track 2, SFX on track 3.
  5. Openopen_jianying.sh restarts 剪映 (it caches the draft list).

What the skill does not do

  • ❌ Background music (BGM): use 剪映's built-in music library.
  • ❌ Real recorded SFX (applause, laughter, ambient rain): use 剪映's audio library; the skill flags timestamps for the user to drag them in.
  • ❌ Headless export: 剪映 disables third-party draft export on macOS.
  • ❌ Transitions, color grading, captions, effects: 剪映 GUI.

SFX library — procedural synthesis

13 categories synthesized with ffmpeg's lavfi sources:

transition.whoosh.fast   transition.whoosh.slow   transition.swoosh
emphasis.ding.bright     emphasis.ding.soft       emphasis.pop
impact.boom              impact.thud              reaction.boing
meta.click.tick          meta.page.flip           meta.camera.shutter
meta.bell.chapter

Each is a single ffmpeg recipe in assets/sfx_manifest.json. Edit the recipe + python3 scripts/generate_sfx.py --force to retune.

Why procedural instead of bundled audio files: zero copyright risk, zero network dependency, zero file-rot risk. The waveforms are simple but adequate for short-video punctuation. For complex sounds (applause, laughter, ambient), use 剪映's built-in audio library.

Layout

skills/jianyingpro-mix-edit/
├── SKILL.md
├── scripts/
│   ├── tts.py                  # script.txt → vo.mp3 + vo.srt + vo.json
│   ├── probe_media.py          # ffprobe wrapper
│   ├── generate_sfx.py         # ffmpeg-synthesized SFX library
│   ├── build_draft.py          # spec.json → 剪映 draft folder
│   ├── open_jianying.sh        # Restart 剪映 to refresh draft list
│   └── requirements.txt
├── references/
│   ├── spec_schema.md
│   ├── script_workflow.md      # Mode B end-to-end walkthrough
│   ├── tts_styles.md           # voice + style decision table
│   ├── draft_format.md
│   └── troubleshooting.md
└── assets/
    ├── example_spec.json
    ├── sfx_manifest.json       # 13 SFX recipes
    └── sfx/                    # generated WAVs (created on first run)

Manual usage (without an LLM client)

# 1. TTS the script.
python3 skills/jianyingpro-mix-edit/scripts/tts.py \
    /tmp/script.txt /tmp/vo --voice zh-CN-YunjianNeural

# 2. Edit a copy of the example to point at your media + the TTS output.
cp skills/jianyingpro-mix-edit/assets/example_spec.json /tmp/mix.json
$EDITOR /tmp/mix.json

# 3. Build (auto-synthesizes SFX library on first run).
python3 skills/jianyingpro-mix-edit/scripts/build_draft.py /tmp/mix.json

# 4. Open 剪映.
bash skills/jianyingpro-mix-edit/scripts/open_jianying.sh demo_mix

License

MIT. SFX waveforms are generated procedurally and not subject to third-party copyright. TTS output is subject to Microsoft's edge-tts terms of use.

About

剪映多素材混剪 Skill

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors