Communitygithub.com

xiao44119-sketch/llm-video-skills

>- Generate, export, or convert finished videos (or code-rendered videos) into native, self-contained JianYing Pro (剪映 / CapCut) project drafts, and automatically launch JianYing to open the project immediately with zero missing-media prompts. Use when the user wants to export a video, script, or timeline to JianYing, create a JianYing project from a video, or automate draft generation.

llm-video-skills 是什么?

llm-video-skills is a Gemini CLI agent skill that >- Generate, export, or convert finished videos (or code-rendered videos) into native, self-contained JianYing Pro (剪映 / CapCut) project drafts, and automatically launch JianYing to open the project immediately with zero missing-media prompts. Use when the user wants to export a video, script, or timeline to JianYing, create a JianYing project from a video, or automate draft generation.

兼容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/xiao44119-sketch/llm-video-skills/tree/HEAD/skills/jianying-draft-export

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

JianYing Pro (剪映) Native Draft Export Skill

This skill provides an automated, hardware-native bridge to generate and deploy production-grade JianYing Pro macOS (11.4+) project drafts directly from video files, audio tracks, and subtitle scripts.

It completely solves the "media missing / permission denied" sandbox prompt by packaging projects under the Self-Contained Draft Architecture.


Quick Reference

1. One-Line CLI Export & Instant Open

python3 scripts/export_draft.py \
  --video "/path/to/my_video.mp4" \
  --name "My Project Name" \
  --cover "/path/to/cover.jpg" \
  --subtitles "/path/to/subtitles.json" \
  --open
ParameterShortRequiredDescription
--video-vYesAbsolute path to the source video file
--name-nNoProject name in JianYing (defaults to video filename)
--cover-cNoCover thumbnail image (.jpg / .png)
--subtitles-sNoSubtitle file (.json or .srt)
--duration-dNoVideo duration in seconds (auto-probed if omitted)
--open-oNoImmediately restart/launch JianYing Pro and open draft

2. Python API Usage

from pathlib import Path
import sys

# Add skill scripts directory
sys.path.insert(0, "/path/to/jianying-draft-export/scripts")
from draft_builder import JianyingDraft

# 1. Initialize draft
draft = JianyingDraft(name="My High-Level Short Video", width=1920, height=1080)

# 2. Set video source (probes duration automatically)
draft.set_video("/path/to/rendered_video.mp4")

# 3. Attach cover image
draft.set_cover("/path/to/cover.jpg")

# 4. Add subtitles programmatically with dual-color highlighting
draft.add_subtitle(
    text="Large language models have strict anti-cheating mechanisms. Self-praise on a single dimension is called 'lone evidence' by the algorithm.",
    start_sec=8.13,
    end_sec=16.46,
    highlight="lone evidence"  # Highlight word will be rendered in pure gold [1.0, 0.84, 0.0] with black strokes
)

# Or load from an external JSON / SRT file:
# draft.load_subtitles("/path/to/subtitles.json")

# 5. Compile, auto-copy to self-contained draft, and launch app
draft.save_and_inject(open_app=True)

3. Subtitle JSON Format

The subtitle parser accepts either standard .srt files or a JSON list:

[
  {
    "start": 0.0,
    "end": 7.68,
    "text": "In 2026, the harshest reality for physical stores is not that the neighbor is lowering prices, but that when customers ask AI which store nearby is good, your store simply doesn't exist.",
    "hl": "doesn't exist"
  },
  {
    "start": 8.13,
    "end": 16.46,
    "text": "Large language models have strict anti-cheating mechanisms. Self-praise on a single dimension is called 'lone evidence' by the algorithm. Single evidence is not established, and is directly excluded.",
    "hl": "directly excluded"
  }
]
  • hl: Optional substring that will be given high-contrast gold highlight styling with thick black borders.

4. Architecture: Why macOS Sandbox Needs "Self-Contained Drafts"

macOS App Sandbox restricts VideoFusion-macOS.app from accessing files in ~/Desktop/, ~/.gemini/, or arbitrary directories.

❌ External Path Mode (Broken):
~/Desktop/IP/video.mp4  ----->  JianYing Pro [Sandbox EACCES]  ----->  "media missing / permission denied" popup

✅ Self-Contained Draft Mode (This Skill):
~/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/<Project>/video.mp4
  └─> JianYing Pro [Full Native Read/Write]  ──>  Zero Prompt, Instant Playback!

See macos_sandbox_bypass.md for deeper technical analysis.


5. Verification & Troubleshooting

To inspect whether a draft was created and decrypted properly:

python3 scripts/verify_draft.py "Project Name"

If libjycodec.dylib needs recompilation (e.g. on a new architecture):

bash scripts/compile_dylib.sh

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

相关技能