If you've ever wanted to watch a foreign-language video but found the subtitle options lacking, xiaohu-video-translate is a project worth bookmarking. This MIT-licensed Python tool from xiaohuailabs automates the entire pipeline — from downloading a video to burning Chinese subtitles directly into the file — with a single command.
With 535 stars and growing, it's clearly struck a chord with developers and content consumers alike.
Adding accurate Chinese subtitles to foreign-language video content is surprisingly tedious. You'd normally need to download the video, run it through a transcription service, translate the result, clean up the output, and then use a separate tool to embed the subtitles — often paying API fees at multiple steps along the way.
xiaohu-video-translate collapses all of that into one workflow. The project description sums it up well: "对 AI 说一句话,把外语视频自动配上中文字幕" — roughly, tell the AI in one sentence, and it automatically adds Chinese subtitles to your foreign-language video.
Based on the repository description and project scope, the tool covers these core stages:
The emphasis on fully local transcription is a meaningful detail. Transcription APIs can get expensive fast, especially for long-form content. Running it locally means you can process as many videos as you want without worrying about per-minute billing.
This tool is a good fit for several types of users:
It's worth noting that the tool is opinionated — it's specifically oriented toward generating Chinese subtitles. If your target language is different, you'd need to adapt the translation step.
While transcription runs locally (a genuine cost advantage), the translation and polishing steps are where AI models do meaningful work. Depending on how the tool is configured, this is where a service like KodaAPI could slot in naturally. KodaAPI provides a unified API key that routes to OpenAI, Anthropic, Google Gemini, DeepSeek, and 100+ other models — so if you're experimenting with which model produces the most fluent Chinese translations or best handles domain-specific terminology, you can swap models without managing multiple credentials or billing accounts.
That said, many users will simply use the defaults and get solid results without touching the API layer at all.
The project is open source under the MIT License and written in Python, so setup should be straightforward for most developers.
git clone https://github.com/xiaohuailabs/xiaohu-video-translateHead over to the GitHub repository for full setup instructions, configuration options, and usage examples.
xiaohu-video-translate is a practical, well-scoped tool that solves a real workflow pain point. It doesn't try to do everything — it does one thing end-to-end and does it locally where it matters most. For Chinese-speaking developers drowning in foreign-language video content, this is the kind of automation that quietly saves hours every week.
Repo: xiaohuailabs/xiaohu-video-translate · ★ 535 · MIT License
One API key, 100+ models from Anthropic, OpenAI, Google, DeepSeek and more.