DOCS · 项目文档 PROJECT← 返回索引 · Index

video2md — AI Video-to-Document Toolkit

中文 | English

Turn any video (local files, screen recordings, Bilibili links…) into searchable, readable, well-structured documents: speech transcription (Whisper) + on-screen text (keyframe OCR) → LLM dedup/correction and chaptered write-up → HTML reading site.

📖 Live demo (document library): https://ronfi.github.io/video2md/

Download (opt.)        Extract                  Organize              Read
bili_dl.py    ──►   video2md.py    ──►   DeepSeek structuring ──►  md2html.py
(Bilibili API)     (any video: ASR+OCR       (body + appendix)     (html/index.html)
                    +word correction)

Quick start

pip install -r requirements.txt
export DEEPSEEK_API_KEY=sk-xxx        # for LLM organizing; omit to fall back to raw transcript

# Any local video (screen recording, lecture, meeting…) — two steps
python3 tools/video2md.py your_video.mp4 --auto-crop      # -> <name>-<title>.md
python3 tools/md2html.py                                  # -> html/index.html

# English videos: transcribe and write the document in English
python3 tools/video2md.py talk.mp4 --lang en

# Bilibili videos: one extra download step
python3 tools/bili_dl.py BV1fj5f6iEH5                     # -> ref/ (title recorded automatically)
python3 tools/video2md.py ref/BV1fj5f6iEH5.mp4 --auto-crop

For long videos (>15 min) add --interval 10 to reduce keyframe density. Whole pipeline runs on CPU — no GPU required (≈15 min for a 35-min video).

Features

Layout

tools/            bili_dl.py · video2md.py · md2html.py (details in tools/README.en.md)
ref/              transcribed documents (.md tracked) and videos (*.mp4 ignored)
html/             generated reading site (temporary, rebuild anytime)
requirements.txt  dependencies

Notes