Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mpv-subtitleminer

> 编程语言
Open source

A language-learning toolkit for mpv.

170 stars0 likes0 views
WebsiteGitHub

About

A language-learning toolkit for mpv.

mpv-subtitleminer

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.

Demo

https://github.com/user-attachments/assets/47437d89-54f1-4039-bd17-d1fb8b453725

Features

  • Stream subtitles to web front end and interactively look up words.
  • Anki integration via AnkiConnect: Select your note type, make a card and add media.
  • Two mining workflows: add to the card you just made, or create a new sentence card from scratch (see Mining workflows).
  • Replay sentences with audio anytime.
  • Custom regex to clean subtitle text (e.g. strip parentheticals) before display and Anki export.
  • Page title reflects the currently playing media file name.
  • Secondary subtitle support: stream mpv secondary subtitles and export them to Anki.
  • Timeline view: primary and secondary subs are displayed as parallel columns in a vertical timeline, each independently selectable.
  • Overlapping / Simultaneous subtitle handling (Ex: signs, SFX, TL notes) displayed side-by-side in the timeline
  • Style/Name filter: hide or show subtitle lines by their ASS Style or Name, per track, as a live display filter.

Mining workflows

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.

Downloads

Grab the matching .zip from the GitHub Releases page:

  • Linux (x86_64): mpv-subtitleminer-x86_64-unknown-linux-gnu.zip
  • macOS (Intel): mpv-subtitleminer-x86_64-apple-darwin.zip
  • macOS (Apple Silicon): mpv-subtitleminer-aarch64-apple-darwin.zip
  • Windows (x86_64): mpv-subtitleminer-x86_64-pc-windows-msvc.zip

Setup

  1. Install mpv (Windows: Best use winget install mpv).

  2. Download the correct release .zip (see “Downloads”) and extract it.

  3. Copy the extracted mpv folder into your mpv config directory:

    • Windows: %APPDATA%\mpv\ (e.g. C:\Users\YourName\AppData\Roaming\mpv\). Create the folder if it doesn't exist.
    • Linux/macOS: ~/.config/mpv/
    • Flatpak: ~/.var/app/io.mpv.Mpv/config/mpv/
  4. Merge the packaged mpv.conf into your existing config (make sure the input-ipc-server line is present).

  5. Configure AnkiConnect to allow opening index.html from disk (file origin = null):

    Add "null" to webCorsOriginList so it looks like:

    json
    {
      "apiKey": null,
      "apiLogPath": null,
      "ignoreOriginList": [],
      "webBindAddress": "127.0.0.1",
      "webBindPort": 8765,
      "webCorsOriginList": ["http://localhost", "null"]
    }

Usage

  • The server starts automatically with mpv, simply open a video with subtitles.
  • Open index.html in your browser. It should automatically connect to the running mpv instance.
  • Press Ctrl+a to toggle/restart the server.

Troubleshooting

  1. Connection errors: restart your browser.
  2. Restart the server with Ctrl+a.
  3. Ensure everything is at the correct place. The final folder structure should look like this:
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
  1. Open mpv from the command line to see error messages. Press Ctrl+a to restart the server and check for errors.

Issues· 7 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言