Skip to content

hssqz/video2note

Repository files navigation

video2note

Turn any video into a beautiful note image. Powered by Claude.

Works on YouTube, Bilibili, and 1000+ sites via yt-dlp.

简体中文 · Examples · Prompts


Infographic style News-headline style Editorial style Dashboard style

One pipeline. Many styles. Swap the prompt template — change the look.


What it does

   any video URL
        │
        ▼
   ┌─────────┐   ┌─────────┐   ┌─────────┐   ┌─────────┐
   │ yt-dlp  │ → │ Claude  │ → │  HTML   │ → │   PNG   │
   │ subtitle│   │  notes  │   │ render  │   │ 2000px  │
   └─────────┘   └─────────┘   └─────────┘   └─────────┘

Feed it a video link. Get back a magazine-quality note image you can ship to WeChat, Twitter, or anywhere.

Why

Reading a 60-minute video is slow. Reading a single beautiful image is fast. This pipeline turns hours of video into seconds of skim.

The note style is fully driven by prompt templates in prompts/ — write one for your use case (tech tutorial / lecture / podcast / news), reuse the rest of the pipeline.

Quick start

# 1. Clone
git clone https://github.com/hssqz/video2note.git
cd video2note

# 2. Install
npm install         # html2png renderer
uv sync             # Python pipeline (in core/)

# 3. Configure (copy and edit)
cp .mcp.json.example .mcp.json   # optional: stock data MCP server

# 4. Get subtitles from a video
yt-dlp --write-auto-sub --sub-lang zh-Hans --skip-download "VIDEO_URL"

# 5. Run the pipeline inside Claude Code
cd core/
/note path/to/subtitle.txt       # → produces notes.md + magazine.html
html2png notes.html notes.png    # → 2000px PNG

Architecture

video2note/
├── core/                          # Subtitle → structured notes (Python + Claude Agent SDK)
│   ├── subtitle_to_notes.ipynb    # Jupyter entry point
│   ├── scripts/                   # Chunking + merging
│   └── .claude/                   # Slash commands and sub-agents
│
├── render/                        # HTML → 2000px PNG (Node + Puppeteer)
│   ├── convert-html-to-png.js     # The renderer
│   └── notebook-example.ipynb     # Usage example
│
├── prompts/                       # ★ The personality layer ★
│   ├── note.md                    # Structured-note style
│   ├── infographic.md             # Visual-heavy infographic
│   ├── infographic-minimal.md     # Minimalist version
│   ├── magazine.md                # Long-form magazine layout
│   └── interactive-web.md         # Interactive HTML
│
├── examples/
│   ├── showcase/                  # Hero gallery (4 styles)
│   └── stock-review/              # Full pipeline demo: input → notes → render
│
└── docs/                          # Agent design philosophy + SDK references

Examples

See examples/stock-review/ for a complete end-to-end run:

Stage File
Input 01-input-subtitle.txt
Notes 02-output-notes.md
Render 03-output-render.html

How to customize

The pipeline is content-agnostic. To make it work on your domain:

  1. Write a new prompt in prompts/your-style.md (use prompts/note.md as reference)
  2. Point the agent at it inside core/.claude/commands/
  3. Run as usual — the renderer doesn't care what's in the HTML

Domains people are using it for: stock market recap (built-in), legal-exam reviews, tech-tutorial summaries, academic lecture notes, podcast transcripts.

Requirements

  • Python 3.10+
  • Node.js 18+
  • uv — Python package manager
  • yt-dlp — video subtitle downloader
  • Claude Code — to drive the agent loop

Tech stack

Layer Tool
Subtitle DL yt-dlp
Note convert Claude Sonnet 4 (via Agent SDK)
Orchestration Jupyter Notebook + Slash commands
Renderer Puppeteer (via node-html-to-image)
Optional data MCP servers (.mcp.json.example)

License

MIT — see LICENSE

Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors