CrendKing / mpv-twitch-chat

Show Twitch chat messages as subtitles when watching Twitch VOD with mpv.
MIT License
89 stars 4 forks source link

Add support for Youtube chat replay for premiers/livestream vods #7

Closed BanchouBoo closed 2 years ago

BanchouBoo commented 2 years ago

Similar to Twitch vods, yt-dlp includes a live_chat.json subtitle file with all the information for the chat messages, would be very nice to have

CrendKing commented 2 years ago

I can take a look. Any sample URL?

BanchouBoo commented 2 years ago

https://youtu.be/O4oixjzvrZk

CrendKing commented 2 years ago

It seems, unlike Twitch, Youtube does not provide a direct API to get the live chat JSON. Instead, yt-dlp has this 200-line Python script to parse and download the chat JSON fragments. I'm not planning to rewrite this into Lua and maintain it up-to-date. Sorry.

BanchouBoo commented 1 year ago

In case anyone stumbles across this in the future, I decided to make it myself: https://github.com/BanchouBoo/mpv-youtube-chat

CrendKing commented 1 year ago

Thanks for sharing. I quite like the way you scroll the messages interactively. However, I think Twitch's GQL API now aggregates messages in a more coarse time granularity, which might make the scrolling less enticing.