{"id":13835353,"url":"https://github.com/Ajatt-Tools/autosubsync-mpv","last_synced_at":"2025-07-10T07:31:39.184Z","repository":{"id":43162846,"uuid":"298676886","full_name":"Ajatt-Tools/autosubsync-mpv","owner":"Ajatt-Tools","description":"🍦 Automatic subtitle synchronization script for mpv media player.","archived":false,"fork":true,"pushed_at":"2024-10-29T20:20:09.000Z","size":75,"stargazers_count":31,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-20T20:39:06.700Z","etag":null,"topics":["add-on","mpv","mpv-script","subtitles","synchronization"],"latest_commit_sha":null,"homepage":"https://tatsumoto-ren.github.io/blog/join-our-community.html","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"joaquintorres/autosubsync-mpv","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ajatt-Tools.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}},"created_at":"2020-09-25T20:51:04.000Z","updated_at":"2024-10-29T20:20:03.000Z","dependencies_parsed_at":"2023-01-31T00:01:41.711Z","dependency_job_id":null,"html_url":"https://github.com/Ajatt-Tools/autosubsync-mpv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ajatt-Tools/autosubsync-mpv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajatt-Tools%2Fautosubsync-mpv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajatt-Tools%2Fautosubsync-mpv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajatt-Tools%2Fautosubsync-mpv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajatt-Tools%2Fautosubsync-mpv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajatt-Tools","download_url":"https://codeload.github.com/Ajatt-Tools/autosubsync-mpv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajatt-Tools%2Fautosubsync-mpv/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":["add-on","mpv","mpv-script","subtitles","synchronization"],"created_at":"2024-08-04T14:01:00.131Z","updated_at":"2025-07-10T07:31:38.184Z","avatar_url":"https://github.com/Ajatt-Tools.png","language":"Lua","funding_links":[],"categories":["Subtitle"],"sub_categories":[],"readme":"# autosubsync-mpv\n\nAutomatic subtitle synchronization script for [mpv](https://wiki.archlinux.org/index.php/Mpv).\n\nA demo can be viewed on \u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=w1vwnUiF6Bc\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/69171671/115097010-4bd13c80-9f17-11eb-83e9-2583658f73bc.png\" width=\"80px\"\u003e\u003c/a\u003e\n\nSupported backends:\n* [ffsubsync](https://github.com/smacke/ffsubsync)\n* [alass](https://github.com/kaegi/alass)\n\n## Installation\n\n0. Make sure you have mpv v0.33 or higher installed.\n    ```\n    $ mpv --version\n    ```\n1. Install [FFmpeg](https://wiki.archlinux.org/index.php/FFmpeg):\n    ```\n    $ pacman -S ffmpeg\n    ```\n    Windows users have to manually install FFmpeg from [here](https://ffmpeg.zeranoe.com/builds/).\n2. Install your retiming program of choice,\n[ffsubsync](https://github.com/smacke/ffsubsync), [alass](https://github.com/kaegi/alass) or both:\n    ```\n    $ pip install ffsubsync\n    ```\n    ```\n    $ trizen -S alass-git # for Arch-based distros\n    ```\n\n3. Download the add-on and save it to your mpv scripts folder.\n\n    | GNU/Linux | Windows |\n    |---|---|\n    | `~/.config/mpv/scripts` | `%AppData%\\mpv\\scripts\\` |\n\n    To do it in one command:\n\n    ```\n    $ git clone 'https://github.com/Ajatt-Tools/autosubsync-mpv' ~/.config/mpv/scripts/autosubsync\n    ```\n\n## Configuration\n\nYou can skip this step if the add-on works out of the box.\n\nCreate a config file:\n\n| GNU/Linux | Windows |\n|---|---|\n| `~/.config/mpv/script-opts/autosubsync.conf` | `%AppData%\\mpv\\script-opts\\autosubsync.conf` |\n\nExample config:\n\n```\n# Absolute paths to the executables, if needed:\n\n# 1. ffmpeg\nffmpeg_path=C:/Program Files/ffmpeg/bin/ffmpeg.exe\nffmpeg_path=/usr/bin/ffmpeg\n\n# 2. ffsubsync\nffsubsync_path=C:/Program Files/ffsubsync/ffsubsync.exe\nffsubsync_path=/home/user/.local/bin/ffsubsync\n\n# 3. alass\nalass_path=C:/Program Files/ffmpeg/bin/alass.exe\nalass_path=/usr/bin/alass\n\n# Preferred retiming tool. Allowed options: 'ffsubsync', 'alass', 'ask'.\n# If set to 'ask', the add-on will ask to choose the tool every time:\n\n# 1. Preferred tool for syncing to audio.\naudio_subsync_tool=ask\naudio_subsync_tool=ffsubsync\naudio_subsync_tool=alass\n\n# 2. Preferred tool for syncing to another subtitle.\naltsub_subsync_tool=ask\naltsub_subsync_tool=ffsubsync\naltsub_subsync_tool=alass\n\n# Unload old subs (yes,no)\n# After retiming, tell mpv to forget the original subtitle track.\nunload_old_sub=yes\nunload_old_sub=no\n\n# Overwrite the original subtitle file.\n# Replace the old subtitle file with the retimed file.\noverwrite_old_sub=yes\noverwrite_old_sub=no\n```\n\n## Notes\n\n* On Windows, you need to use forward slashes or double backslashes for your path.\nFor example, `\"C:\\\\Users\\\\YourPath\\\\Scripts\\\\ffsubsync\"`\nor `\"C:/Users/YourPath/Scripts/ffsubsync\"`,\nor it might not work.\n\n* On GNU/Linux you can use `which ffsubsync` to find out where it is.\n\n## Usage\n\nWhen you have an out of sync sub, press `n` to synchronize it.\n\n`ffsubsync` can typically take up to about 20-30 seconds\nto synchronize (I've seen it take as much as 2 minutes\nwith a very large file on a lower end computer), so it\nwould probably be faster to find another, properly\nsynchronized subtitle with `autosub` or `trueautosub`.\nMany times this is just not possible, as all available\nsubs for your specific language are out of sync.\n\nTake into account that using this script has the\nsame limitations as `ffsubsync`, so subtitles that have\na lot of extra text or are meant for an entirely different\nversion of the video might not sync properly. `alass` is supposed\nto handle some edge cases better, but I haven't fully tested it yet,\nobtaining similar results with both.\n\nNote that the script will create a new subtitle file, in the same folder\nas the original, with the `_retimed` suffix at the end.\n\n## Issues and feedback\n\nIf you are having trouble getting it to work or you've found a bug,\nfeel free to [join our community](https://tatsumoto-ren.github.io/blog/join-our-community.html) to ask directly.\n\nTry to check if\n[ffsubsync](https://github.com/smacke/ffsubsync)\nor\n[alass](https://github.com/kaegi/alass)\nworks properly outside of `mpv` first.\nIf the retiming tool of choice isn't working, `autosubsync` will likely fail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAjatt-Tools%2Fautosubsync-mpv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAjatt-Tools%2Fautosubsync-mpv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAjatt-Tools%2Fautosubsync-mpv/lists"}