@mpv-easy/translate
v0.1.12
Published
@mpv-easy/translate
Downloads
13
Readme
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 mpv-translate.js and copy it to the mpv script directory, or use mpsm
mpsm install mpv-translate
- Add shortcut keys
ctrl+t script-message translate
andctrl+i script-message interactive-translate
to yourinput.conf
- If everything goes well, you can use
ctrl+t
to start global translation (requires ffmpeg and curl and only supports local videos),ctrl+i
to start interactive translation (requires curl) - You can customize the styles of subtitles and tooltips, see mpv-translate.conf
support language
https://cloud.google.com/translate/docs/languages
config
{
"sourceLang": "en-US",
"targetLang": "zh-CN",
}
translate (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