Skip to content

Repository files navigation

JitenMPV

GitHub downloads star Discord server

An mpv plugin that colours Japanese subtitles by how well you know each word, powered by Jiten.

Subtitles are parsed as they play, each word coloured by its state in your Jiten account. Hover a word for its dictionary entry, review it, or mine it to Jiten with a screenshot, audio clip and sentence.

An anime frame in mpv with a Japanese subtitle whose words are coloured by knowledge state, and a dictionary popup for 魔女 showing furigana, pitch accent, frequency rank and review buttons

Features

  • Subtitle colouring by word state, with themes and per-state customization
  • Dictionary popup on hover, with furigana, pitch accent and frequency
  • One-click mining to a word list with the subtitle as example sentence
  • Media mining: screenshot, audio clip, animated clip, sentence context (requires Jiten+ subscription)
  • i+1 detection and frequency marking
  • Blur words depending on their status to help you rely on subtitles less
  • Tons of settings for a customised experience

Requirements

  • mpv
  • A Jiten account and API key
  • ffmpeg, for audio and clip mining. JitenMPV can download it for you.
  • Windows, Linux or macOS. Linux supports Plasma Wayland and X11/XWayland.

On Plasma with window-management protocol v18 or newer, JitenMPV and mpv use native Wayland with accurate popup placement in every setup. JitenMPV follows mpv's reported GPU context and probes the compositor protocols directly so no specific configuration is required.

Other Wayland compositors use native Wayland with approximate placement. To make the dictionary popup follow the cursor through X11/XWayland, add this to ~/.config/mpv/mpv.conf:

gpu-context=x11vk,x11egl

Use JITEN_MPV_WINDOWING=x11 or wayland to override automatic detection.

Installation

Windows

Download JitenMPV-Setup.exe and run it. Then start mpv and press Ctrl+J.

It installs per-user, needs no administrator rights, and puts nothing system-wide. It is not code-signed, so Windows will warn that it does not recognise the publisher: choose More info, then Run anyway.

If you would rather not see that warning, or prefer a scriptable install, this one-liner does the same thing:

irm https://raw.githubusercontent.com/Sirush/JitenMPV/master/installers/windows.ps1 | iex

Linux

curl -fsSL https://raw.githubusercontent.com/Sirush/JitenMPV/master/installers/unix.sh | sh

Then start mpv and press Ctrl+J. Nothing needs administrator rights and nothing is installed system-wide.

macOS

curl -fsSL https://raw.githubusercontent.com/Sirush/JitenMPV/master/installers/unix.sh | sh

Then give mpv permission to run the plugin. macOS blocks locally signed executables, so mpv cannot start JitenMPV until you allow it. Without this step the plugin will be killed the moment mpv launches it. Nothing else needs administrator rights and nothing is installed system-wide.

  1. Open System Settings > Privacy & Security, and select Developer Tools.

    System Settings with Privacy & Security selected in the sidebar and Developer Tools highlighted in the list

  2. Press the + button.

    The Developer Tools pane, empty, with the + button highlighted

  3. Pick mpv in Applications and press Open.

    The file picker showing the Applications folder with mpv selected and the Open button highlighted

  4. Make sure the toggle next to mpv is on, then restart mpv and press Ctrl+J.

    The Developer Tools pane listing mpv with its toggle switched on

The permission needs to be added for mpv itself, as it is the process that launches the plugin, so allowing Terminal instead wouldn't change anything.

Install script options

The install scripts download the latest release, check it against its published SHA-256, and install it. Two environment variables adjust what they do:

  • JITEN_MPV_VERSION=0.2.0 installs that release instead of the latest.
  • JITEN_MPV_MPV_CONFIG_DIR=/path/to/mpv overrides the mpv config directory. The installer prints the one it picked, so set this if that is not where your mpv reads its config from.

Installing manually

Every release is also available as an archive, jiten-mpv-win-x64.zip / jiten-mpv-linux-x64.tar.gz / jiten-mpv-osx-*.tar.gz, that holds a self-contained executable, with no runtime to install. They are the same build used by setup program and the scripts.

Download the archive for your platform from the releases page, extract it, and run the executable — JitenMPV.App on Windows and Linux, JitenMPV on macOS — with no arguments. It offers to install itself, showing the directory it will write the mpv script to.

Each archive also contains jiten-mpv.lua. You never need it — the installer writes its own copy — but it is there if you would rather drop the script into portable_config\scripts yourself and keep everything under your own control.

For scripted installs, JitenMPV.App install (JitenMPV install on macOS) does the same without a window (--mpv-config-dir <path>, --dry-run, --quiet). On Windows the prompt returns before it finishes, since the executable has no console of its own.

On macOS, download with curl rather than a browser, and re-sign the extracted binary before running it:

codesign --force --sign - JitenMPV

Recent macOS kills executables whose ad-hoc signature was made on another machine and only a signature made on your own Mac satisfies it. The install script above does this automatically. Browser downloads are additionally quarantined (macOS 15 removed the right-click-Open bypass); xattr -d com.apple.quarantine JitenMPV clears that, but clearing quarantine alone is not enough. You still need the Developer Tools permission described under macOS.

Where things go

Windows Linux and macOS
Program %APPDATA%\jiten-mpv\ ~/.local/share/jiten-mpv/ ($XDG_DATA_HOME)
Settings %APPDATA%\jiten-mpv\ ~/.config/jiten-mpv/ ($XDG_CONFIG_HOME)
mpv script %APPDATA%\mpv\scripts\, or portable_config\scripts\ beside mpv.exe ~/.config/mpv/scripts/
Desktop registration ~/.local/share/applications/jiten-mpv.desktop

Set JITEN_MPV_EXE if you keep the executable somewhere else.

Updating and uninstalling

JitenMPV checks for new releases once a day and tells you in mpv and in the settings window. Nothing is downloaded until you press Install update. Turn the check off under Settings > Advanced.

Re-running the install command above also updates, and works when the in-app updater cannot.

JitenMPV.App uninstall (JitenMPV uninstall on macOS) removes the mpv script; add --all to delete the program as well. Settings are always kept.

Building from source

dotnet publish src/JitenMPV.App -c Release -r win-x64 -o publish

Use linux-x64, osx-x64 or osx-arm64 in place of win-x64. This produces one self-contained executable in publish/; run JitenMPV.App install from there to place it and the mpv script.

Setup

Press Ctrl+J during playback to open the settings window, and paste your API key from the bottom of the Jiten settings page.

If ffmpeg is missing, the same screen offers a one-click download. Without it, subtitle colouring and screenshots still work, but audio and clip mining do not.

Usage

  • Ctrl+J opens settings
  • F10 starts JitenMPV, or restarts it if it stopped
  • mpv's subtitle visibility key (v by default) hides or shows JitenMPV's coloured subtitles
  • Hover a word for its dictionary entry, click to interact

JitenMPV starts automatically when a file is opened. Turn that off under Settings > Advanced if you would rather start it with F10 only.

Development

test-mpv.bat <video> builds the solution and launches mpv with the script and binary from the working tree.

Contributing

Issues and ideas are welcome. There is also a Discord server.

License

Apache 2.0.

JitenMPV does not bundle ffmpeg and is not a derivative of it. See THIRD-PARTY-NOTICES.md.

About

A MPV plugin to parse & highlights your known words in subtitles for Japanese immersion powered by Jiten

Topics

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages