Communitygithub.com

Kiratuu/Video-Wrapper-Skills

为访谈视频添加综艺特效(花字、卡片、人物条、章节标题等)。支持 4 种视觉主题,先分析字幕内容生成建议供用户审批,再渲染视频。

Video-Wrapper-Skills 是什么?

Video-Wrapper-Skills is a Claude Code agent skill that 为访谈视频添加综艺特效(花字、卡片、人物条、章节标题等)。支持 4 种视觉主题,先分析字幕内容生成建议供用户审批,再渲染视频。.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add Kiratuu/Video-Wrapper-Skills

在你喜欢的 AI 中提问

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

文档

Interview Video Processor

A video effects processing tool based on Python + Playwright + MoviePy, using HTML/CSS/Anime.js to render high-quality visual effects.

Workflow

Step 1: Analyze Subtitle Content

When the user provides video and subtitle files, first analyze the subtitle content to generate effect suggestions:

  1. Read subtitle file (.srt)
  2. Analyze content, identify:
    • Guest information (for lower thirds)
    • Topic transition points (for chapter titles)
    • Keywords and terminology (for fancy text)
    • Technical terms (for term cards)
    • Key insights (for quote callouts)
    • Numerical data (for animated stats)
    • Core points (for bullet points)
  3. Generate a suggestion list for user review

Step 2: User Review

Display suggestions in Markdown format to the user:

## Visual Effects Suggestions

**Theme**: notion

### 1. Lower Third
- **Name**: Dario Amodei
- **Role**: CEO
- **Company**: Anthropic
- **Appearance Time**: 1000ms

### 2. Fancy Text Highlight
1. **AGI** (emphasis)
   Time: 2630ms - 5500ms
   Reason: First mention of core concept

...

Users can:

  • Confirm all suggestions
  • Modify some suggestions
  • Remove unwanted components
  • Add new components

Step 3: Generate Config and Render

Generate config.json based on the user-approved suggestions, then render the video.

Available Components

ComponentPurposeConfiguration Fields
Lower ThirdShow guest infoname, role, company, startMs, durationMs
Chapter TitleTopic transition titlenumber, title, subtitle, startMs, durationMs
Fancy TextSummarize current pointtext, style, startMs, endMs, position
Term CardExplain terminologychinese, english, description, firstAppearanceMs
Quote CalloutHighlight key insighttext, author, startMs, durationMs, position
Animated StatsDisplay numbersprefix, number, unit, label, startMs
Bullet PointsSummarize core pointstitle, points[], startMs, durationMs
Social BarCall to actionplatform, label, handle, startMs, durationMs

Fancy Text Usage Guidelines

⚠️ Important: Fancy text must follow these guidelines:

  1. Must be a phrase: Summarize the speaker's point in a short sentence

    • ✅ Correct: "AI development is a smooth curve" / "Intelligence growth resembles Moore's Law"
    • ❌ Incorrect: "Artificial Intelligence" / "Moore's Law" (these are single terms; use term cards instead)
  2. Complementary to term cards:

    • Fancy text: Summarizes a point (e.g., "Intelligence doubles every year")
    • Term card: Explains a concept (e.g., "Moore's Law: The number of transistors on an integrated circuit doubles every 18-24 months")
  3. Position above: Displayed in the upper area of the screen (above subtitles) by default to avoid obscuring faces

Social Bar Usage Guidelines

  • Default display duration: 8 seconds (longer than other components to give users enough time to remember)
  • Typically appears at the end of the video
  • Supported platforms: twitter, weibo, youtube

Theme System

Supports 4 visual themes:

ThemeStyleUse Case
notionWarm, knowledge-orientedEducation, knowledge sharing
cyberpunkNeon, futuristicTechnology, cutting-edge topics
appleMinimalist, elegantBusiness, professional interviews
auroraGradient, flowing lightCreative, artistic content

Configuration File Format

{
  "theme": "notion",
  "lowerThirds": [
    {
      "name": "Dario Amodei",
      "role": "CEO",
      "company": "Anthropic",
      "startMs": 1000,
      "durationMs": 5000
    }
  ],
  "chapterTitles": [
    {
      "number": "Part 1",
      "title": "The Nature of Exponential Growth",
      "subtitle": "Why growth accelerates over time",
      "startMs": 0,
      "durationMs": 4000
    }
  ],
  "keyPhrases": [
    {
      "text": "AGI",
      "style": "emphasis",
      "startMs": 2630,
      "endMs": 5500
    }
  ],
  "termDefinitions": [
    {
      "chinese": "摩尔定律",
      "english": "Moore's Law",
      "description": "The number of transistors on an integrated circuit doubles every 18-24 months",
      "firstAppearanceMs": 37550,
      "displayDurationSeconds": 6
    }
  ],
  "quotes": [
    {
      "text": "AI development is a very smooth exponential curve",
      "author": "— Dario Amodei",
      "startMs": 30000,
      "durationMs": 5000
    }
  ],
  "stats": [
    {
      "prefix": "Growth rate ",
      "number": 240,
      "unit": "%",
      "label": "Annual compute growth",
      "startMs": 45000,
      "durationMs": 4000
    }
  ],
  "bulletPoints": [
    {
      "title": "Core Insights",
      "points": [
        "AI development is a smooth exponential curve",
        "Intelligence growth resembles Moore's Law",
        "No sudden singularity moment"
      ],
      "startMs": 50000,
      "durationMs": 6000
    }
  ]
}

Dependency Installation

# Enter virtual environment
cd ~/.claude/skills/video-wrapper
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Install Playwright browser
playwright install chromium

Command Line Usage

# Use browser renderer (recommended)
python src/video_processor.py video.mp4 subs.srt config.json output.mp4

# Specify a renderer
python src/video_processor.py video.mp4 subs.srt config.json -r browser
python src/video_processor.py video.mp4 subs.srt config.json -r pil

Technical Implementation

  • Visual Rendering: HTML + CSS + Anime.js (screenshots via Playwright)
  • Video Compositing: MoviePy
  • Animation Engine: Anime.js (spring physics animation)
  • Fallback Renderer: Python PIL

File Structure

~/.claude/skills/video-wrapper/
├── src/
│   ├── video_processor.py    # Main processing script
│   ├── browser_renderer.py   # Playwright renderer
│   ├── content_analyzer.py   # Content analyzer
│   ├── fancy_text.py         # PIL fancy text (fallback)
│   └── term_card.py          # PIL card (fallback)
├── templates/
│   ├── fancy-text.html       # Fancy text template
│   ├── term-card.html        # Term card template
│   ├── lower-third.html      # Lower third template
│   ├── chapter-title.html    # Chapter title template
│   ├── quote-callout.html    # Quote callout template
│   ├── animated-stats.html   # Animated stats template
│   └── bullet-points.html    # Bullet points template
├── static/
│   ├── css/
│   │   ├── effects.css       # Base effects
│   │   ├── theme-notion.css  # Notion theme
│   │   ├── theme-cyberpunk.css
│   │   ├── theme-apple.css
│   │   └── theme-aurora.css
│   └── js/
│       └── anime.min.js      # Anime.js
└── requirements.txt

Notes

  • Video processing takes a long time; please be patient
  • Ensure sufficient disk space for the output video
  • Playwright rendering produces better results but requires Chromium installation
  • If Playwright is unavailable, the tool automatically falls back to PIL rendering

相关技能