使用 AI 进行视频和播客的转录和总结。开源、多平台,支持多种语言。
.txt (treated as transcript text), .mp3, .mp4, .m4a, .wav, .webm, .mkv, .ogg, .flac. Media is normalized with FFmpeg for Whisper, then runs the same optimize → translate → summarize pipeline as URLsgit clone https://github.com/wendy7756/AI-Video-Transcriber.git
cd AI-Video-Transcriber
chmod +x install.sh
./install.sh
Method 2: Dockergit clone https://github.com/wendy7756/AI-Video-Transcriber.git
cd AI-Video-Transcriber
# Using Docker Compose (easiest)
cp .env.example .env
# Edit .env if you want server-side defaults (optional)
docker-compose up -d
# Or using Docker directly
docker build -t ai-video-transcriber .
docker run -p 8000:8000 --env-file .env ai-video-transcriber
The image uses Python 3.12 (Debian Bookworm), upgrades pip/setuptools/wheel, then installs from requirements.txt — same version constraints as a fresh local venv on a current Python.
Method 3: Manual InstallationTip: transcripts and downloaded videos live in
/app/tempinside the container. Uncomment thevolumesblock indocker-compose.ymlto persist them on the host.
1. Install Python dependencies
# macOS (PEP 668) strongly recommends a virtualenv
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
2. Install FFmpeg
brew install ffmpeg # macOS
sudo apt update && sudo apt install ffmpeg # Ubuntu/Debian
sudo yum install ffmpeg # CentOS/RHEL
3. Configure environment variables (optional)
# Only if you prefer server-side defaults — otherwise configure in the UI
export OPENAI_API_KEY="your_api_key_here"
export OPENAI_BASE_URL="https://openrouter.ai/api/v1" # any OpenAI-compatible endpoint
python3 start.py
Then open http://localhost:8000.
Production mode (recommended for long videos) — disables hot-reload so the SSE connection stays stable across 30–60+ minute tasks:
python3 start.py --prod
Run with explicit env (example)source venv/bin/activate
export OPENAI_API_KEY=your_api_key_here # optional: server-side default
# export OPENAI_BASE_URL=https://openrouter.ai/api/v1 # optional: server-side default
python3 start.py --prod
1. Choose your input — URL or file
POST /api/process-video with a multipart file), which helps when a reverse proxy only allows that path2. Pick your options
3. (Optional) Configure your AI model — click AI Settings to expand
https://openrouter.ai/api/v1) and API KeylocalStorage, never sent anywhere but your chosen provider4. Start processing — click Transcribe. For URL jobs a badge shows the active mode:
Badge Meaning ⚡ Subtitle (green) Native subtitles found — transcript extracted in seconds ** Whisper** (cyan) No subtitles available — audio downloaded and transcribedFor local uploads, media is normalized with FFmpeg then transcribed with Whisper. Plain .txt files skip download and Whisper entirely, going straight into the text pipeline.
5. Review the results
Besides the web UI there is a headless entry point, so agents and scripts can run the same pipeline with no server and no browser.
venv/bin/python transcribe.py "https://www.youtube.com/watch?v=VIDEO_ID" --json
venv/bin/python transcribe.py talk.mp4 -l zh --no-video
venv/bin/python transcribe.py notes.txt --no-llm # no API key needed
--json puts a machine-readable result on stdout and keeps progress on stderr.
Exit codes: 0 success, 2 bad input, 1 download/transcode failure.
-l, --summary-language
Summary language (en, zh, es, fr, de, it, pt, ru, ja, ko, ar)
--no-llm
Transcript only — skips optimize/translate/summarize, needs no API key
--no-video
Don't keep the original video
--whisper-model
tiny … large, default base
-o, --output-dir
Where to write the Markdown, default ./temp
--json / -q
Machine-readable output / silence progress
For CLI/agent use, configure the OpenAI-compatible provider with environment variables:
export OPENAI_API_KEY="your_api_key_here"
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
export OPENAI_TRANSLATION_MODEL="gpt-4o" # optional
For one-off CLI runs you can also pass --api-key, --base-url, and --model,
but environment variables are safer because API keys do not end up in shell history.
The repo also ships a skills-only Codex plugin:
.codex-plugin/plugin.json
skills/video-transcribe/SKILL.md
This repository root is the plugin root. Import or install this folder as a local
plugin in Codex App, then start a new task and select AI Video Transcriber from
Plugins. Shipping the plugin files does not install the plugin automatically; after
changing the plugin, refresh or reinstall it and start a new task so Codex reloads
the skill. The skill wraps the same CLI pipeline above, so the machine running
Codex still needs this repo's venv and ffmpeg.
Codex App does not provide a plugin-specific settings panel for this skills-only
plugin. To switch from OpenRouter to another OpenAI-compatible endpoint, update the
environment variables available to the Codex task, or ask Codex to run the CLI with
--base-url / --model for that specific run.
This plugin intentionally does not bundle the local stdio MCP server. If you want
Codex to call the transcribe_video MCP tool directly, register the MCP server
separately as shown below.
The repo ships .claude/skills/video-transcribe/SKILL.md, so Claude Code picks it up
automatically when you work in this directory — just ask it to transcribe a link. To
use it from anywhere, copy the folder to ~/.claude/skills/.
The project includes an optional stdio MCP server. It is not registered automatically; add it once per client.
pip install "mcp>=2.0"
# From the repository root:
claude mcp add video-transcriber \
-e OPENAI_API_KEY=your_api_key_here \
-e OPENAI_BASE_URL=https://openrouter.ai/api/v1 \
-- "$(pwd)/venv/bin/python" "$(pwd)/mcp_server.py"
codex mcp add \
--env OPENAI_API_KEY=your_api_key_here \
--env OPENAI_BASE_URL=https://openrouter.ai/api/v1 \
video-transcriber -- "$(pwd)/venv/bin/python" "$(pwd)/mcp_server.py"
If you prefer editing Codex config directly, add this to ~/.codex/config.toml:
[mcp_servers.video-transcriber]
command = "/abs/path/venv/bin/python"
args = ["/abs/path/mcp_server.py"]
[mcp_servers.video-transcriber.env]
OPENAI_API_KEY = "your_api_key_here"
OPENAI_BASE_URL = "https://openrouter.ai/api/v1"
For Claude Desktop, add the same command and args to your Claude Desktop MCP configuration:
{
"mcpServers": {
"video-transcriber": {
"command": "/abs/path/venv/bin/python",
"args": ["/abs/path/mcp_server.py"],
"env": {
"OPENAI_API_KEY": "your_api_key_here",
"OPENAI_BASE_URL": "https://openrouter.ai/api/v1"
}
}
}
}
To change providers later, update the MCP client's saved environment variables
or remove and re-add the MCP server with the new OPENAI_BASE_URL / model settings,
then restart or reload the client if it keeps MCP servers running.
Exposes one tool, transcribe_video, returning the transcript, summary, optional
translation, file paths, and a no_speech flag. Verify the wiring with
venv/bin/python mcp_server.py --selftest, then check client registration with
claude mcp list or codex mcp list.
no_speechmatters: when the source has no speech, the pipeline skips the LLM entirely and returns empty text. Agents should report that rather than guessing at the content — feeding an empty transcript to an LLM produces confident fabrications.
All endpoints are served from the same origin as the UI.
| Method | Endpoint |
暂无开放 Issues,或尚未同步最近议题。