0.1.15-alpha.6 • Published 6 months ago
@mpv-easy/translate v0.1.15-alpha.6
install
You need to install ffmpeg and curl and add them to PATH, curl is usually installed by default on all systems including windows11, if you only use interactive translation, you don't need to install ffmpeg
- Download the latest version of translate.js and copy it to the mpv script directory
- Add shortcut keys
ctrl+t script-message translateandctrl+i script-message interactive-translateto yourinput.conf - If everything goes well, you can use
ctrl+tto start global translation (requires ffmpeg and curl and only supports local videos),ctrl+ito start interactive translation (requires curl) - You can customize the styles of subtitles and tooltips, see translate.conf
support language
https://cloud.google.com/translate/docs/languages
config
{
"sourceLang": "en-US",
"targetLang": "zh-CN",
}short key
| key | command |
|---|---|
| ctrl+t | script-message translate |
| ctrl+T | script-message mix-translate |
| ctrl+i | script-message interactive-translate |
input.conf
CTRL+t script-message translate
CTRL+i script-message interactive-translate
CTRL+T script-message mix-translatetranslate (ctrl+t)
Default subtitle is English
Translate to Chinese
mix-translate (ctrl+shif+t or ctrl+T)
Display Chinese and English
interactive-translate (ctrl+i)
Click left mouse button to play the audio, and click the wheel to display the full sentence translation
mix-translate and interactive-translate (ctrl+T then ctrl+i)
Mix translation and interactive translation can be used at the same time
todo
- auto detect source language
- remove ffmpeg dependency
- support more languages
- support ass
- support bing, deepl