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:
- Read subtitle file (.srt)
- 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)
- 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
| Component | Purpose | Configuration Fields |
|---|---|---|
| Lower Third | Show guest info | name, role, company, startMs, durationMs |
| Chapter Title | Topic transition title | number, title, subtitle, startMs, durationMs |
| Fancy Text | Summarize current point | text, style, startMs, endMs, position |
| Term Card | Explain terminology | chinese, english, description, firstAppearanceMs |
| Quote Callout | Highlight key insight | text, author, startMs, durationMs, position |
| Animated Stats | Display numbers | prefix, number, unit, label, startMs |
| Bullet Points | Summarize core points | title, points[], startMs, durationMs |
| Social Bar | Call to action | platform, label, handle, startMs, durationMs |
Fancy Text Usage Guidelines
⚠️ Important: Fancy text must follow these guidelines:
-
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)
-
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")
-
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:
| Theme | Style | Use Case |
|---|---|---|
notion | Warm, knowledge-oriented | Education, knowledge sharing |
cyberpunk | Neon, futuristic | Technology, cutting-edge topics |
apple | Minimalist, elegant | Business, professional interviews |
aurora | Gradient, flowing light | Creative, 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