Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morrah/mpv-twitch-chat-irc
Show Twitch chat messages as subtitles when watching Twitch Live with mpv.
https://github.com/morrah/mpv-twitch-chat-irc
Last synced: about 2 months ago
JSON representation
Show Twitch chat messages as subtitles when watching Twitch Live with mpv.
- Host: GitHub
- URL: https://github.com/morrah/mpv-twitch-chat-irc
- Owner: morrah
- Created: 2021-10-15T21:05:04.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-03T22:32:59.000Z (10 months ago)
- Last Synced: 2024-08-05T14:16:20.909Z (5 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mpv - twitch-chat-irc - Show Twitch chat messages as subtitles when watching Twitch LIVE. (Social)
README
Show Twitch chat messages as subtitles when watching Twitch Live with mpv.
Based on [mpv Twitch Chat](https://github.com/CrendKing/mpv-twitch-chat/) for VODs, but since `mpv-twitch-chat` uses Twitch API to retrieve comments history, it doesn't support live chat comments. This script uses a python subprocess to keep a background irc connection to a channel and dump last 10 messages to file in SubRip format.
## Issues
* Subtitle track is deleted and re-added on every refresh, so it blinks.
## Requirement
python3
## Install
`git clone` or download and unpack to mpv's `scripts` directory.
`pip install certifi` – added `certifi` dependency to fix "certificate verify failed: unable to get local issuer certificate" error popped out on some win10 system;
## TODO
Remove python dependency: re-write in Lua using [lua-irc-engine](https://github.com/mirrexagon/lua-irc-engine) and [luasocket](https://github.com/diegonehab/luasocket).
## Usage
To activate the script, play a Twitch Live and switch on the "Twitch Chat" subtitle track. The script will replace it with its own subtitle track.
You can use mpv's auto profiles to conditionally apply special subtitle options when Twitch Live is on. For example,
```
[twitch]
profile-cond=get("path", ""):find("^https://w?w?w?%.?twitch%.tv/") ~= nil
profile-restore=copy-equal
sub-font-size=25
sub-align-x=right
sub-align-y=top
```
makes the Twitch chat subtitles smaller than default, and moved to the top right corner.