{"id":13578550,"url":"https://github.com/CrendKing/mpv-twitch-chat","last_synced_at":"2025-04-05T19:33:16.066Z","repository":{"id":39698891,"uuid":"386900357","full_name":"CrendKing/mpv-twitch-chat","owner":"CrendKing","description":"Show Twitch chat messages as subtitles when watching Twitch VOD with mpv.","archived":false,"fork":false,"pushed_at":"2023-07-30T06:25:38.000Z","size":581,"stargazers_count":81,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-09T21:27:16.081Z","etag":null,"topics":["mpv","mpv-scripts","twitch","twitch-chat"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/CrendKing.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-17T09:56:38.000Z","updated_at":"2024-06-23T14:55:10.647Z","dependencies_parsed_at":"2024-06-23T14:55:09.466Z","dependency_job_id":"7dafb170-726d-4b13-ba08-86b1e6ad3ba3","html_url":"https://github.com/CrendKing/mpv-twitch-chat","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/CrendKing%2Fmpv-twitch-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fmpv-twitch-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fmpv-twitch-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fmpv-twitch-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrendKing","download_url":"https://codeload.github.com/CrendKing/mpv-twitch-chat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393070,"owners_count":20931804,"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-scripts","twitch","twitch-chat"],"created_at":"2024-08-01T15:01:31.729Z","updated_at":"2025-04-05T19:33:15.607Z","avatar_url":"https://github.com/CrendKing.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# [mpv Twitch Chat](https://github.com/CrendKing/mpv-twitch-chat)\n\nShow Twitch chat messages as subtitles when watching Twitch VOD with mpv.\n\nmpv internally uses youtube-dl to handle Twitch VOD URL. In addition to the regular video track, it also adds a \"rechat\" subtitle track. This track points to the Twitch API `videos/\u003cvideo_id\u003e/comments`, which contains the full transcript of a VOD's chat messages in JSON. Unfortunately, mpv can't directly consume the JSON as subtitle. This script converts it into a SubRip subtitle track so that mpv can directly display the chat messages.\n\nNote that since subtitle is text-based only, all Twitch emotes are shown as text.\n\nThe API this script uses to get the chat data is undocumented and not intended for public use, [according to Twitch](https://discuss.dev.twitch.tv/t/getting-chat-messages-on-new-api/26176). It could change or be broken at any moment, and there is no guarantee from the author. Use at your own risk.\n\n## Features\n\n* Configurable to show commenter's name.\n* Configurable to show colored messages.\n* Configurable message duration.\n* Friendly to mpv's built-in subtitle options.\n\n## Requirement\n\n* [curl](https://curl.se/), which should be preinstalled in most operating systems\n\n## Install\n\nBest way to install is `git clone` this repo in mpv's \"scripts\" directory. This approach allows easy update by simply `git pull`.\n\nAlternatively, one can [download the repo as zip](https://github.com/CrendKing/mpv-twitch-chat/archive/refs/heads/master.zip) and extract to mpv's \"scripts\" directory. Updates must be made manually.\n\nScript option file should be placed in mpv's `script-opts` directory as usual. Options are explains in the script file.\n\nUser should specify a working Twitch API client ID in the option file.\n\n## Usage\n\nTo activate the script, play a Twitch VOD and switch on the \"rechat\" subtitle track. The script will replace it with its own subtitle track.\n\nYou can use mpv's auto profiles to conditionally apply special subtitle options when Twitch VOD is on. For example,\n```\n[twitch]\nprofile-cond=get(\"path\", \"\"):find(\"^https://www.twitch.tv/\") ~= nil\nprofile-restore=copy-equal\nsub-font-size=30\nsub-align-x=right\nsub-align-y=top\n```\nmakes the Twitch chat subtitles smaller than default, and moved to the top right corner.\n\n## Screenshot\n\n![Screenshot](screenshot.webp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCrendKing%2Fmpv-twitch-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCrendKing%2Fmpv-twitch-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCrendKing%2Fmpv-twitch-chat/lists"}