0.1.15-alpha.6 • Published 6 months ago

@mpv-easy/translate v0.1.15-alpha.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

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 translate and ctrl+i script-message interactive-translate to your input.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 translate.conf

support language

https://cloud.google.com/translate/docs/languages

config

{
  "sourceLang": "en-US",
  "targetLang": "zh-CN",
}

short key

keycommand
ctrl+tscript-message translate
ctrl+Tscript-message mix-translate
ctrl+iscript-message interactive-translate

input.conf

CTRL+t     script-message translate
CTRL+i     script-message interactive-translate
CTRL+T     script-message mix-translate

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
0.1.13

11 months ago

0.1.14

9 months ago

0.1.15-alpha.6

6 months ago

0.1.12

1 year ago