Skip to content

v1.0.0 - Initial Release

Latest

Choose a tag to compare

@Wjavan Wjavan released this 12 Sep 13:27
· 5 commits to main since this release

PotPlayer AI Subtitle Translation v1.0.0

A powerful AngelScript plugin for real-time subtitle translation in PotPlayer using any OpenAI-compatible LLM API.


Features

AI-Powered Translation

  • Multi-platform Support — OpenAI, DeepSeek, Alibaba Bailian (Qwen), Zhipu GLM, Moonshot, Google Gemini, Ollama, and any OpenAI-compatible API
  • 80+ Languages — Translate into or from any of 80+ languages with automatic source language detection
  • Context-Aware Translation — Uses previous subtitle lines as context for more accurate translations
  • Hallucination Detection — Automatically detects and retries overlong or anomalous translations

Performance & Cost Optimization

  • Prompt Caching — Supports prompt cache retention for OpenAI official API, reducing costs
  • Context Caching — Caches translation context to minimize token usage
  • Minimal Token Usage — Optimized for extremely low token consumption per subtitle line

Smart Error Handling

  • Echo Detection — Detects when models output original text instead of translating
  • Retry Mechanisms — Configurable retry modes (0-3) for unstable networks
  • Integer Overflow Protection — Safe parsing of numeric values

Developer-Friendly

  • Single Config String — Fine-tune all parameters via one pipe-separated string
  • Reasoning Model Support — Compatible with DeepSeek-R1, QwQ (auto-strips / tags)
  • Multilingual UI — Korean, Traditional Chinese, Simplified Chinese, English
  • Local Model Support — Use Ollama for completely free, private, offline translation

Download

File Description
SubtitleTranslate - Universal.as Main plugin file (68 KB)
SubtitleTranslate - Universal.ico Plugin icon (23 KB)

Quick Install

  1. Download both files above
  2. Copy to: D:\PotPlayer\Extension\Subtitle\Translate\
  3. Completely restart PotPlayer (kill via Task Manager)
  4. Preferences → Subtitles → Subtitle Translation → select "AI Translate"
  5. Enter your API config

Config Examples

# Alibaba Bailian (qwen-flash, free tier)
qwen-flash|https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions|nullkey|500|retry1|3|auto

# DeepSeek
deepseek-chat|https://api.deepseek.com/v1/chat/completions|nullkey|0|0|3|auto

# OpenAI
gpt-4o-mini|https://api.openai.com/v1/chat/completions|nullkey|0|0|3|auto

# Ollama (local, free)
qwen2.5:7b|http://localhost:11434/v1/chat/completions|nullkey|0|0|3|off

# Google Gemini
gemini-2.0-flash|https://generativelanguage.googleapis.com/v1beta/openai/chat/completions|nullkey|0|0|3|auto

Config format: Model|API_URL|nullkey|Delay_ms|Retry_mode|Context_lines|Cache_mode

FAQ

Q: Is this free? A: The plugin is free (GPL-3.0). Cloud APIs charge per token. Use Ollama for zero-cost offline translation.

Q: Which model is best? A: Beginners → qwen-flash (Bailian). General → gpt-4o-mini or deepseek-chat. Offline → qwen2.5:7b (Ollama).

Q: Cost per movie? A: ~1,500 subtitle lines for a 2-hour movie. qwen-flash: <¥0.01. gpt-4o-mini: ~$0.01-0.02.

Q: VPN/proxy support? A: Yes, uses PotPlayer's HTTP client which respects system proxy settings.

Contributing

Contributions welcome! See CONTRIBUTING.md.

License

GPL-3.0 — see LICENSE.


⭐ If you like this project, please star the repo!