jianchang512/pyvideotrans
Self-hostable Python pipeline for video translation, subtitles, and dubbing
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
pyVideoTrans is a Python 3.10 application that orchestrates four stages: ASR, subtitle translation, TTS, and video synthesis. Timed subtitles are the boundary users can inspect and edit between stages; SRT is both a transcription output and an input for standalone translation and speech synthesis. FFmpeg handles media processing, including the final assembly of audio and video.
The application package lives under videotrans/, with sp.py, cli.py, and webui.py as the desktop, headless, and Gradio browser entrypoints. Backend selection happens per stage: a local recognizer can feed either a local translator or a provider API, independently of the TTS choice. This is a selectable-backend architecture, not evidence of a public plugin SDK or a versioned job API.
Key Capabilities & Differentiators
The end-to-end mode produces dubbed, subtitled video, but the stages can also run independently. cli.py --task stt --name ./audio.wav --model_name large-v3 is one route to a timed subtitle track. The application supports batch audio and video transcription, speaker diarization, and timestamp alignment through options such as WhisperX and Parakeet. It can assign a different synthetic voice to each speaker and pause for manual review of recognition, translation, or dubbing.
ASR choices include local Faster-Whisper and services such as Alibaba Qwen3-ASR and Azure. Translation can use offline HY-MT2 or M2M100, local Ollama, or providers such as DeepSeek and Gemini. TTS options include online Edge-TTS and Azure as well as integrations with F5-TTS, CosyVoice, and GPT-SoVITS for voice cloning. The utility set covers vocal separation, subtitle merging, audio-video alignment, and transcript matching, which is useful when an existing subtitle track needs repair rather than regeneration.
Trade-offs & Limitations
Faster-Whisper alone is the simpler choice when the job ends at transcription. pyVideoTrans earns its additional dependencies when translation, per-speaker voices, timing, and final muxing must stay in one workflow. The review checkpoints matter because a misattributed speaker can receive the wrong voice, and a longer translated line can sound rushed or overrun its original time slot. Compared with a managed dubbing service, self-hosting gives more control over backend choice and where processing occurs, but shifts model and media-runtime maintenance to the operator.
Local throughput and peak RAM or VRAM depend on the selected ASR and TTS models, clip duration, and concurrent jobs. Benchmark a representative dialogue clip and a long input before setting batch capacity; the CPU container is an option, not a performance guarantee. Cloud backends reduce the local inference burden but add data transfers, provider fees, and service dependencies. GPL-3.0 applies to the application code; model licenses, provider terms, and permission to use source media or replicate a voice require separate review.
Hardware & Deployment Guide
Windows 10/11 users can run the packaged sp.exe. The source path uses Python 3.10, FFmpeg, and uv sync; macOS and Ubuntu/Debian setup also calls for libsndfile packages. The default sync does not install WebUI or Whisper.NET extras. For browser access, run uv sync --extra webui and then uv run webui.py; use uv run cli.py for headless jobs.
The Dockerfile selects python:3.10-slim by default or nvidia/cuda:12.8.0-cudnn-runtime-ubuntu22.04 with USE_CUDA=true. Gradio binds to 0.0.0.0:7860; restrict network access before exposing the port. The volume example mounts /app/output and all of /app/videotrans, so check the latter before copying the command: an empty host directory can hide the application package. Releases v4.18 through v4.20 retain the packaged Windows and source-based macOS/Linux paths. An offline run requires local backends and their model files for every stage used.
sp.py for desktop, webui.py for browser access, and cli.py with vtv, stt, sts, and tts tasks.Localization teams and creators who need reviewable subtitles, speaker-specific dubbing, and a choice of local or online backends before rendering a final video.
You only need transcription, or you require a supported managed job API and predictable throughput without maintaining models, FFmpeg, or provider integrations.
Quick Start & Installation
brew install libsndfile git python@3.10 brew uninstall --ignore-dependencies ffmpeg brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| pyvideotrans ★ | 19.9k | +88 | Python | GPL-3.0 | Self-hostable Python pipeline for video translation, subtitles, and dubbing |
| voice-pro | 13.5k | +34 | Python | GPL-3.0 | Self-hosted Gradio studio for transcription, translation, and dubbing |
| speech-to-speech | 13.9k | +137 | Python | Apache-2.0 | A modular speech cascade for self-hosted voice agents over OpenAI Realtime |
| ComfyUI | 149.9k | +945 | Python | GPL-3.0 | A node-graph engine for building and running multimodal AI workflows locally |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/jianchang512/pyvideotrans.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about pyvideotrans
How do I integrate pyVideoTrans without using the desktop app?
Can I start on CPU, and how much VRAM should I budget?
Can I self-host it for commercial localization?
When is it a better choice than standalone Faster-Whisper or a managed dubbing service?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy