{"id":13835361,"url":"https://github.com/Ben-Kerman/mpv-sub-scripts","last_synced_at":"2025-07-10T07:31:40.761Z","repository":{"id":49219580,"uuid":"307844859","full_name":"Ben-Kerman/mpv-sub-scripts","owner":"Ben-Kerman","description":"Two mpv scripts for automatically pausing after each subtitle line and skipping intervals between subtitles.","archived":false,"fork":false,"pushed_at":"2024-07-11T14:47:59.000Z","size":36,"stargazers_count":79,"open_issues_count":7,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T15:37:04.505Z","etag":null,"topics":["condensed-audio","language-learning","mpv-script","subtitles"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ben-Kerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-27T22:37:01.000Z","updated_at":"2025-04-16T00:20:39.000Z","dependencies_parsed_at":"2024-01-15T19:43:27.480Z","dependency_job_id":"9e70b934-20fb-4f09-aefa-1274724311c9","html_url":"https://github.com/Ben-Kerman/mpv-sub-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ben-Kerman/mpv-sub-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ben-Kerman%2Fmpv-sub-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ben-Kerman%2Fmpv-sub-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ben-Kerman%2Fmpv-sub-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ben-Kerman%2Fmpv-sub-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ben-Kerman","download_url":"https://codeload.github.com/Ben-Kerman/mpv-sub-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ben-Kerman%2Fmpv-sub-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545167,"owners_count":23625404,"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":["condensed-audio","language-learning","mpv-script","subtitles"],"created_at":"2024-08-04T14:01:00.282Z","updated_at":"2025-07-10T07:31:40.516Z","avatar_url":"https://github.com/Ben-Kerman.png","language":"Lua","readme":"# sub-pause\n\nAn mpv script that automatically pauses before and/or after each subtitle line.\nMostly intended for language learning.\n\n## Key Bindings\n\n- `(none)`: toggle auto-pause at start of line (`toggle-start`)\n- `n`: toggle auto-pause at end of line (`toggle-end`)\n- `Alt+r`: skip next pause (`skip-next`)\n- `Ctrl+r`: replay active/last line, always available (`replay`)\n\nTo use a key binding other than the defaults above add a line like the\nfollowing to your `input.conf` (where `X` is the binding and `\u003caction_id\u003e`\nis the value in parentheses in the list above):\n```\nX script-binding sub_pause/\u003caction_id\u003e\n```\n\n`sub-pause-toggle-start` doesn't have a default binding and must be assigned\nmanually.\n\nIf you want a binding for both replaying and skipping add a line like this:\n```\nCtrl+Alt+SPACE script-binding sub-pause-replay; script-binding sub-pause-skip-next\n```\n\n---\n\n`sub_pause/` can be left out, however events triggered from bindings defined\nwithout it will be sent to all scripts, which can lead to conflicts if two\nscripts use the same action ID.\n\nWhen using scoped actions, the script ID before `/` is derived from script's\nfilename, with the extension removed and all characters except alphanumeric\nASCII characters (A-Z, a-z, 0-9) replaced by `_`.\n\n## Configuration\n\nCreate a file at `script-opts/sub_pause.conf` in your mpv config directory:\n```\n# To set a value remove the leading # and modify it after the =.\n# All values given here are defaults. Seconds can be decimal values.\n\n# if set to 'yes', enable pausing at the start of each line by default\n#default_start=no\n\n# if set to 'yes', enable pausing at the end of each line by default\n#default_end=no\n\n# pause roughly this many seconds before the end of each line\n# very low values can result in the line no longer being active after pausing\n#end_delta=0.1\n\n# if autopausing is enabled, hide subtitles while not paused\n#hide_while_playing=no\n\n# automatically resume playback this many seconds after autopausing\n# no effect if less than or equal to zero\n#unpause_time=0\n\n# if unpause_time is set, prevent the next automatic unpause by pressing this key\n# can be anything that would be an acceptable key binding in mpv's input.conf\n#unpause_override=SPACE\n\n# if set to 'yes' (the default), the previous line will be replayed after\n# invoking `replay` if there is currently no active line\n#replay_prev=yes\n```\n\n## Known Issues\n\nIf there are multiple subtitles visible at the same time (e.g. one at the top\nand one at the bottom, or on-screen text with SubStation Alpha(ASS) subs) the\nscript will only pause at the end of the last visible line. While it would be\npossible to fix this at least some of the time by saving every change in the\nsubtitle end time this(in my opinion) doesn't justify the additional\ncomplexity considering how rare such situations are.\n\n---\n\nIf you come across any other problems while using the script feel free to open\na GitHub issue or send a pull request.\n\n\n# sub-skip\n\nThis script allows automatically skipping parts of a video that don't contain\nany subtitles. Skipping can be done either by speeding up playback while no\nsubtitles are present or by seeking to the start of the next subtitle line,\nskipping the interval between lines entirely.\n\n## How To Use\n\nThe script works by briefly changing subtitle delay so that the next line\nstarts at the current video/audio time, recording the difference between the\noriginal and shifted subtitle delay and then speeding up or seeking to the\nstart of the next line (calculated from the difference).\n\nThis works best if mpv is forced to always demultiplex enough of the video for\nthe next subtitle line to be almost always available by setting\n`demuxer-readahead-secs` to a value between 60-120 in `mpv.conf`.\nAlternatively, enabling cache for all videos with `cache=yes` also works.\n\nIf demuxer readahead or cache are not set explicitly it is possible for the\nnext subtitle line to be unavailable even if it starts within the next few\nseconds. The script can deal with this but works best if one of the config\nentries from above is set.\n\n## Key Bindings\n- `Ctrl+n`: activate skipping (`toggle`)\n- `Ctrl+Alt+n`: toggle between speedup and seek skip (`switch-mode`)\n- `Ctrl+Alt+[`: decrease skip speed by 0.1 (`decrease-speed`)\n- `Ctrl+Alt+]`: increase skip speed by 0.1 (`increase-speed`)\n- `Ctrl+Alt+-`: decrease skip interval by 0.25s (`decrease-interval`)\n- `Ctrl+Alt++`: increase skip interval by 0.25s (`increase-interval`)\n\nWhen changing the interval using the numpad +/- keys, it might be necessary to\nalso press shift, even if it's not part of the binding.\n\nAs explained for `sub-pause`, additional bindings can be assigned in `input.conf`:\n```\nX script-binding sub_skip/\u003caction_id\u003e\n```\n\n## Configuration\n\nCreate a file at `script-opts/sub_skip.conf` in your mpv config directory:\n```\n# To set a value remove the leading # and modify it after the =.\n# All values given here are defaults. Seconds can be decimal values.\n\n# if set to 'yes', enable skipping by default\n#default_state=no\n\n# if set to 'yes', use seek mode by default\n#seek_mode_default=no\n\n# any interval between subtitle lines longer than this value in seconds will be skipped\n#min_skip_interval=3\n\n# what speed to use while skipping if not in seek mode\n#speed_skip_speed=2.5\n\n# how many seconds after the end of a line to wait for before starting to skip\n#lead_in=0\n\n# how many seconds before the start of the next line to stop skipping at\n#lead_out=1\n\n# how much to change skip speed by when invoking sub-skip-{de,in}crease-speed\n#speed_skip_speed_delta=0.1\n\n# how many seconds to change the minimum interval by when invoking sub-skip-{de,in}crease-interval\n#min_skip_interval_delta=0.25\n```\n\n---\n\n`sub-skip` is inspired by and partially based on `speed-transition` from\nhttps://github.com/zenyd/mpv-scripts, but rewritten from scratch.\n","funding_links":[],"categories":["Subtitle"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBen-Kerman%2Fmpv-sub-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBen-Kerman%2Fmpv-sub-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBen-Kerman%2Fmpv-sub-scripts/lists"}