Skip to content
arrufatPublic

About

Interactive OpenSubtitles downloader for mpv in pure Lua, zero dependencies

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

mpv-jamak

jamak (자막, Korean for "subtitles") is an interactive subtitle downloader for mpv: plain Lua, curl as the only dependency, backed by OpenSubtitles.com. Needs mpv 0.39+.

jamak's subtitle picker over Sintel

Features

  • Fuzzy-filterable picker in mpv's console UI (same look as the built-in g-s selector) instead of a blindly loaded top match. Results are cached: a wrong pick costs a reopen, not a re-query.
  • Moviehash matching, computed in Lua: subs for your exact file rank first, tagged [HASH], with frame-rate cross-checks against the video.
  • Optional quota-aware auto mode that never spends a download on a guess (5 per day without an account, 20 with a free one).
  • Async everywhere: network calls never block playback.

Installation

git clone https://github.com/arrufat/mpv-jamak ~/.config/mpv/scripts/jamak

or as a dotfiles submodule. Keep the directory name jamak, or your script-opts file won't be found.

Configuration

jamak works out of the box with no configuration. OpenSubtitles then counts downloads anonymously, 5 per day per IP address. To get 20 a day:

  1. Create a free opensubtitles.com account.
  2. Export OPENSUBTITLES_USERNAME and OPENSUBTITLES_PASSWORD in your environment, or copy jamak.conf.example to ~/.config/mpv/script-opts/jamak.conf and fill them in there. Environment variables win over the config file, key by key. The file is plain text; keep it out of public dotfiles.

jamak ships its own API key. To use your own instead, register a consumer at opensubtitles.com/consumers and set OPENSUBTITLES_API_KEY (or api_key).

Recommended in mpv.conf, so downloaded subtitles auto-load on replay:

sub-auto=fuzzy
slang=en,eng,ko,kor

Usage

Key Action
Ctrl+u Search by moviehash + guessed title, pick from the list. Press again to reopen cached results.
Ctrl+U Manual search: edit the title, choose a language, pick.

Rebindable via script-binding jamak/jamak-search and .../jamak-search-manual.

Ranking: hash match, language priority, human before AI-translated ([AI]), matching frame rate, regular before hearing-impaired ([HI], flip with prefer_hi=yes), download count. A hash match that contradicts the file name's episode code or the other hash matches is tagged [HASH?] and ranks below trusted ones. The prompt shows the video's fps; a row shows its own only when it disagrees. Downloads land next to the video as <video>.<lang>.srt (or in fallback_dir) and load immediately.

With auto=yes, a video without subtitle tracks gets a hands-free download when a trusted hash match exists; otherwise jamak only hints that results are available. Audio files and images are skipped.

Debugging: script-message jamak-hash prints the file's moviehash; --msg-level=jamak=v logs queries and result counts.

License

MIT

About

Interactive OpenSubtitles downloader for mpv in pure Lua, zero dependencies

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages