{"id":13835380,"url":"https://github.com/oltodosel/interSubs","last_synced_at":"2025-07-10T07:31:51.115Z","repository":{"id":48078286,"uuid":"81303675","full_name":"oltodosel/interSubs","owner":"oltodosel","description":"Interactive subtitles for mpv. Instantly translate selected word/sentence. ","archived":false,"fork":false,"pushed_at":"2023-03-13T20:25:58.000Z","size":895,"stargazers_count":213,"open_issues_count":5,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-05T14:16:12.152Z","etag":null,"topics":["mpv","mpv-script","subtitles"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oltodosel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-08T08:01:29.000Z","updated_at":"2024-07-16T11:55:06.000Z","dependencies_parsed_at":"2024-01-15T20:05:52.939Z","dependency_job_id":null,"html_url":"https://github.com/oltodosel/interSubs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oltodosel%2FinterSubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oltodosel%2FinterSubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oltodosel%2FinterSubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oltodosel%2FinterSubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oltodosel","download_url":"https://codeload.github.com/oltodosel/interSubs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225627370,"owners_count":17498970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpv","mpv-script","subtitles"],"created_at":"2024-08-04T14:01:00.732Z","updated_at":"2025-07-10T07:31:51.110Z","avatar_url":"https://github.com/oltodosel.png","language":"Python","readme":"[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)\n\ninterSubs\n=========\n\nInteractive subtitles for [mpv](https://github.com/mpv-player/mpv), that was made to help study languages.  \nEasily tweaked and customizable.\n\nv. 2.10 - Changelog at the bottom.  \nIf Qt version doesn't work for you - use [Tk](https://github.com/oltodosel/interSubs/tree/master/Tk). It was abandoned(2017), but maybe still works.\n\n![z 00_00_5 75-00_00_19 96](https://user-images.githubusercontent.com/10230453/38359595-7f56acc0-38d1-11e8-9a65-257466a44e08.gif)\n\n* Supported dictionaries for words:\n\t* https://dict.cc/\n\t* https://pons.com/\n\t* http://reverso.net/\n\t* https://dict.leo.org/\n\t* https://translate.google.com/\n\t* http://morfix.co.il/\n\t* https://redensarten-index.de/\n* Supported dictionaries for sentences:\n\t* https://www.deepl.com/translator\n\t* https://translate.google.com/\n* Supported dictionaries for word pronunciation:\n\t* https://forvo.com/\n\t* https://pons.com/\n\t* https://translate.google.com/\n* Offline \\t separated dictionary. [details](https://github.com/oltodosel/interSubs/issues/36#issuecomment-803541985) | [pyglossary](https://github.com/ilius/pyglossary)\n* http://linguee.com/ redirecting to browser by click.\n* Can use multiple dictionaries simultaneously.\n* Reassigning mouse buttons functions in config.\n* Doesn't work with DVD (picture based) subtitles, only the text-based ones.\n\t* [Script](https://github.com/oltodosel/extract_n_convert_dvd_bd_subtitles) to convert picture based subtitles into *.srt; also extracts them from *.mkv \n* Can extend time of subs showing; for slow readers\n```\n    00:02:23,046 --\u003e 00:02:25,990\n    bla bla\n    00:02:28,020 --\u003e 00:02:33,084\n    waka waka\n    \n    00:02:23,046 --\u003e 00:02:28,020\n    bla bla\n    00:02:28,020 --\u003e 00:02:33,084\n    waka waka\n```\n\nRequirements\n------------\n   * mpv 0.27 (I don't know if it will work with mpv front-ends.)\n   * Xorg (ignore for Mac users)\n   * composite manager; `xcompmgr` or sth. (ignore for Mac users)\n   * python =\u003e 3.6\n   * python-pyqt5\n   * python-numpy\n   * python-beautifulsoup4\n   * python-requests\n   * python-lxml\n   * python-httpx\n   * lua\n   * socat\n   * pkill\n   * xdotool (for hiding subtitles when minimizing mpv or switching window) \n   * optional: chromium (for external translation, other browser can be specified)\n   * optional: wget (for listening to pronunciation)\n\nInstallation\n------------\n* `mv interSubs.py interSubs.lua interSubs_config.py ~/.config/mpv/scripts/;`\n* Edit configuration file `interSubs_config.py`\n* Edit `interSubs.lua` to add option where interSubs will start automatically. \n* For Mac also edit configuration at `interSubs.lua`\n* On KDE(kwin) go to Compositor and uncheck \"Allow applications to block compositing\". [Screenshot](https://iwf1.com/wordpress/wp-content/uploads/2017/09/Disable-applications-override-compositor-KDE.jpg).\n* For Windows - port it yourself. (It does NOT work on Windows. [reason](https://github.com/mpv-player/mpv/blob/master/DOCS/man/ipc.rst#command-prompt-example)) and [a possible way to do it](https://github.com/oltodosel/interSubs/issues/40#issuecomment-835767040)). Consider installing VirtualBox and Ubuntu or some other user-friendly distro.\n\nUsage\n-----\n* Start video with mpv \u0026 select subtitles.\n* F5 to start/stop interSubs.\n\t* Starts automatically with files/paths specified in interSubs.lua\n* Point cursor over the word to get popup with translation.\n* F6 to hide/show without exiting.\n\nButtons bellow may be reassigned in config\n-----\n* Left-click - show translation in your browser.\n* Right-click - listen to pronunciation.\n* Wheel - scroll through transitions in popup.\n* Wheel+Ctrl - resize subtitles.\n* Wheel+Shift - change subtitles' vertical position.\n* Wheel-click - cycle through auto_pause options.\n* Wheel-click-left/right - +/- auto_pause_min_words. (fancy mouses)\n* Back-click - translate whole sentence. (fancy mouses)\n\nTroubleshooting\n-----\n* Does not work at all - launch `mpv` in a console, then start `interSubs` and see if there are any errors that might indicate on missing packages and install them.\n* Background and subtitles are shown as solid black bars - install/launch a compositor.\n* May have issues working in a multi-monitor system.  See [the solution](https://github.com/oltodosel/interSubs/issues/26).\n* On KDE subtitles might sometimes be invisible. See [the solution](https://github.com/oltodosel/interSubs/issues/12#issuecomment-433960146).\n* On KDE subtitles fade instead of appearing immediately. See [the solution](https://github.com/oltodosel/interSubs/issues/39#issuecomment-810483614)\n* Instead of changing system settings you may change [--x11-bypass-compositor](https://mpv.io/manual/stable/#options-x11-bypass-compositor)\n* Stuttering video during subtitles change might be solved by changing mpv's video output `mpv --vo gpu`.\n* On MacOS subtitles are not rendered on top of `mpv`. See [a possible solution](https://github.com/oltodosel/interSubs/issues/42#issuecomment-841725012)\n* On MacOS subtitles are not rendered on top of `mpv` only in fullscreen mode. See [the solution](https://github.com/oltodosel/interSubs/issues/42#issuecomment-841746404)\n* Xfce4 - subtitles do not show - https://github.com/oltodosel/interSubs/issues/54\n\nChangelog\n-----\n* 2.0a\n\t* Configs are incompatible with previous version.\n\t* Tk is abandoned in favor of Qt.\n\t\t* Background can be fully transparent or semi/fully opaque.\n\t\t* Rendering is faster than with Tk.\n\t\t* requires pyqt5 for python 3\n\t\t\t* `pip install pyqt5` / `pacman -S python-pyqt5`\n\t\t* requires composite manager for not solid bg; `xcompmgr` or sth.\n\t\t* tested on Openbox, i3, KDE(kwin).\n\t\t* On KDE(kwin) go to composite and uncheck \"Allow applications to block compositing\". [screenshot](https://iwf1.com/wordpress/wp-content/uploads/2017/09/Disable-applications-override-compositor-KDE.jpg)\n\t* No more stalling when pointing on a wrong word; those words will be translated and saved in background.\n\t* R2L isn't ready yet.\n\t* Option to not save translations on the disk was removed.\n\t* Noun colorization was removed.\n\t* Randomization of translations was removed.\n\t* Option to show N of previous subtitles is suspended for now, I might add it in the future.\n\t* Tk version won't be updated unless something critical happens.\n* 2.1\n\t* R2L support (checked on Hebrew; works more or less).\n\t* Minor corrections.\n* 2.2\n\t* Added https://dict.leo.org/ - de\u003c\u003een/es/fr/it/pl/pt/ru/zh(cn)\n\t* Minor corrections.\n\n* 2.3\n\t* Added option to limit extension of subtitles during long scenes without talking.\n\t\t* `extend_subs_duration_limit_sec = 15`\n\t* Updated https://translate.google.com/\n\t\t* Now it gives complete output instead of single result.\n\t\t* `mtranslate_google` -\u003e `google`\n\t* Added http://www.morfix.co.il/\n\t\t* `morfix`\n\t* Minor error corrections.\n* 2.4\n\t* Fixed non-working deepl.com\n\t* Minor corrections.\n* 2.5\n\t* Added option to hide/show interSubs without exiting - F6\n\t* Minor corrections.\n* 2.6\n\t* Fixed inability to start after update to pyqt5 5.11.3 or sth in that area. Didn't look for version that causes it specifically.\n* 2.7\n\t* Fixed residual flickering of previous lines during subtitles change. Began to happen at qt5.12 or so.\n* 2.8\n\t* Fixed gtts/pons pronunciation.\n\t* Fixed google-translation.\n* 2.9\n\t* Added google-translation for full sentences(default mouse Back-click):\n\t\t* `f_translation_full_sentence` to bind to mouse instead of `f_deepl_translation`\n\t\t* in config `translation_function_name_full_sentence = 'google'`\n* 2.10\n\t* Fixed google-translation\n\n\n\u003ca href=\"https://trackgit.com\"\u003e\n\u003cimg src=\"https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/m88kqkidu8aeis5dk6m8\" alt=\"trackgit-views\" /\u003e\n\u003c/a\u003e\n\n\u003cimg src=\"https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/m88kqkidu8aeis5dk6m8\" alt=\"trackgit-views\" style=\"position:absolute; visibility:hidden; height:1px; width:1px;\" /\u003e\n","funding_links":[],"categories":["Learning","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foltodosel%2FinterSubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foltodosel%2FinterSubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foltodosel%2FinterSubs/lists"}