A language-learning toolkit for mpv.
This is a tool for mpv to enable language learning with subtitle files. We send subtitles to a web-front end where you can look up words, create Anki flashcards add the sentence and media to your card. We do this by launching a local Rust server from mpv that connects the web front end to mpv via its IPC interface.
Warning: This is an early release. Expect bugs and rough edges.
https://github.com/user-attachments/assets/47437d89-54f1-4039-bd17-d1fb8b453725
The subtitles you select can be mined to Anki in two ways:
| Word mining | Sentence mining |
|---|---|
| Adds the sentence, audio and screenshot to a card you just made, e.g. after a Yomitan lookup. | Creates a whole new card with the sentence, audio and screenshot, no existing card needed. |
| 1. In Settings > Word mining, choose your note type and map its fields. | |
| 2. Look a word up in Yomitan to make the card. | |
| 3. Select subtitles. | |
| 4. Press Add to word card. | 1. In Settings > Sentence mining, choose a deck and note type, and map its fields. |
| 2. Select subtitles. | |
| 3. Press Create sentence card. |
Grab the matching .zip from the GitHub Releases page:
mpv-subtitleminer-x86_64-unknown-linux-gnu.zipmpv-subtitleminer-x86_64-apple-darwin.zipmpv-subtitleminer-aarch64-apple-darwin.zipmpv-subtitleminer-x86_64-pc-windows-msvc.zipInstall mpv (Windows: Best use winget install mpv).
Download the correct release .zip (see “Downloads”) and extract it.
Copy the extracted mpv folder into your mpv config directory:
%APPDATA%\mpv\ (e.g. C:\Users\YourName\AppData\Roaming\mpv\).
Create the folder if it doesn't exist.~/.config/mpv/~/.var/app/io.mpv.Mpv/config/mpv/Merge the packaged mpv.conf into your existing config (make sure the input-ipc-server line is present).
Configure AnkiConnect to allow opening index.html from disk (file origin = null):
Add "null" to webCorsOriginList so it looks like:
{
"apiKey": null,
"apiLogPath": null,
"ignoreOriginList": [],
"webBindAddress": "127.0.0.1",
"webBindPort": 8765,
"webCorsOriginList": ["http://localhost", "null"]
}index.html in your browser. It should automatically connect to the running mpv instance.Ctrl+a to toggle/restart the server.Ctrl+a.mpv/
├── scripts/
│ └── mpv-subtitleminer.lua
├── script-opts/
│ └── mpv-subtitleminer.conf
├── mpv.conf
├── mpv-subtitleminer.exe
├── ffmpeg.exe (optional; if you don't have ffmpeg in PATH)
└── index.html
No open issues yet, or sync has not completed.