Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Recording Vods and Chat #1294

Open
2 tasks done
TheMadog24 opened this issue Jan 31, 2025 · 15 comments
Open
2 tasks done

Live Recording Vods and Chat #1294

TheMadog24 opened this issue Jan 31, 2025 · 15 comments
Labels
enhancement New feature or request

Comments

@TheMadog24
Copy link

TheMadog24 commented Jan 31, 2025

Checklist

Write your feature request here

I know this has been suggested before, so I apologize, but it has been quite some time.

With more and more chat features being stripped from playback, and twitch more aggressively muting streams and almost instantly removing un-muted ts files, this feels like it is the only real solution.

Live recording would also allow for many more features that currently are not possible, such as hype trains, announcements and channel point redemption messages.

I would ask that this please be re-considered as an option, because there really is no longer any alternative.

EDIT:
TwitchLink is the only program I know of that live-records twitch VODs, but does not do so with chapters, or any real metadata, and only for VODs, not chat files.

@TheMadog24 TheMadog24 added the enhancement New feature or request label Jan 31, 2025
@superbonaci
Copy link
Contributor

The best thing is to record the screen with audio. There you have everything: subscriptions, announcements, removed comments, the chat is synced with the video, that's perfect.

Twitch is adding a lot of stuff, removes emotes (#1241), so on it's impossible to keep up.

Sincerely the best thing you can do and the easiest by far is to just record with screen with the Twitch audio . Don't include your personal data and that's it, it has everything you really need:

therealknossi_clip.mp4

@ScrubN
Copy link
Collaborator

ScrubN commented Feb 1, 2025

Ganymede uses chat-dowlodaer to download chats (albeit missing some events like message pins, message deletions), then converts them into TD compatible chats. Ages ago I began working on an application to standardize the conversion process so others can use chat-downloader, however I never finished it and I'm way too busy at the moment to pick it back up.

Chat-downloader does have a flaw however, which is that it has not received a commit since 2023, meaning if Twitch changes something about the chat pubsub, it might not ever get fixed. Nevermind, it seems someone else has forked the repo and made a few patches: https://github.com/stream-gizmos/chat-downloader/tree/fixed-master

@superbonaci
Copy link
Contributor

This fork has been updated more recently:
https://github.com/owsombra/chat-downloader

but may not have the same important fixes..

Do this chat downloaders get the chat as soon as it happens, so deleted comments are captures also, or is just like the chat replay? Do they capture other things than the chat, like the announcements, subscriptions, basically all what you see on the website?

@superbonaci
Copy link
Contributor

To download live streams I've found this project, which works for what is it @TheMadog24:
https://github.com/DmitryScaletta/twitch-dlp

@TheMadog24
Copy link
Author

There are a few ways to do it, I personally use TwitchLink, but they all make the file size much larger, no chapter support, and none of them live-download chat. The VOD download is less important since there are ways, the Chat is the important part.
Twitch is stripping more and more away from the chat playback, so there is less and less to use.

The only real way is to live-download the chat. However, it sounds like this is not something anyone intends to peruse.
I will look into https://github.com/owsombra/chat-downloader , hopefully it has the same json output as this project, with embedded chapters, emotes and badges, since that is what my project replies on, and would require me to completely re-write it to adapt.

@Zibbp
Copy link

Zibbp commented Feb 2, 2025

Saving chapters for live streams isn't that simple. The only sane way I can think of is subscribing to the eventsub and listening for "channel update" events then storing those locally. This is why no project that I know of has implemented it, mainly because the eventsub API isn't great.

@superbonaci
Copy link
Contributor

Are there "different" types of chapters?

  • Chapter change
  • Title change
  • Game change
  • Markers, maybe only visible to the streamer and/or moderators?

No idea if some of them are the same or if they apply only to VODS or also to live streams.

About the chat-downloader, I'll check what it has to offer. For now the best way is just to record the screen. The only issue that could happen is if the chat speed is faster than lines available on the comment box, simply some comments may not be shown at all. That would depend on your screen resolution and if you have the monitor portrait or landscape, and the zoom. And for the video, have the display resolution enough to fit the video without downscaling it.

The chat downloader to work 100%, they should capture what's shown on the web browser, not using the API. My guess is that some info never gets stored to Twitch servers, it's just displayed in the browser as-is for a period of time.

The chat maybe it's important now, but that wasn't the case a few years ago. Plus some streamers already put the chat in the video, for those that watch fullscreen. But it's getting less common.

@TheMadog24
Copy link
Author

TheMadog24 commented Feb 2, 2025

Are there "different" types of chapters?

To my knowledge, the only chapters that save to the vods are the game changes.
Title changes don't save to vod, whatever the first stream title is when it goes live is the vod title, and all Markers are only available on the back-end for the streamer/mods (I believe).

For now the best way is just to record the screen.

While I do not disagree, that is a significant jump in storage space vs a Json file and comes at the risk of missing a lot when multiple message happen at once, such as a large gift sub.
The aim with my project was to/is to display chat alongside the vod without having to render, saving a massive amount of storage space, and for preservation purposes, leaving a smaller footprint.

When large amounts of subs are gifted at once, most of them are lost, with only the first/last 10 or so being saved to the Vod Replay, as well as things such as announcements, channel point redemption messages and Hype trains not being recorded.
Even some basic things like people losing the badges they had during replays.

Hype trains, polls, sticky messages and others would be MUCH, MUCH harder to preserve outside of a screen recording, so I don't see that as viable, even if you went the route of live-recording chats.

@ScrubN
Copy link
Collaborator

ScrubN commented Feb 2, 2025

This fork has been updated more recently:
https://github.com/owsombra/chat-downloader

The changes on this fork are for adding chzzk support. The twitch bug fixes from the other fork are not present.

@superbonaci
Copy link
Contributor

@TheMadog24 what is that you don't see as viable?

@superbonaci
Copy link
Contributor

I'll try to make a fork with the patches of all the other forks but can't promise anything.

@TheMadog24
Copy link
Author

@TheMadog24 what is that you don't see as viable?

Hype trains, polls and sticky messages, but that is only IF you were going to go the route of live-recording chats.
I just assume they would be too difficult to save.

@superbonaci
Copy link
Contributor

@TheMadog24 do you mean also recording the poll results live as the countdown goes? I don't think that's stored anywhere in twitch servers, maybe the only way is to record it live. I don't know even if the results are saved.

In this video it's clear that poll results are updated every 1 second it's not "instantaneous" probably because would be uncomfortable.
https://youtu.be/EYDYRWDy6_U?t=909

@TheMadog24
Copy link
Author

I was saying that if you went down the road of live-recording chat, certain things may be too difficult to warrant recording/saving, such as polls, sticky messages and hype trains.

Although, if you do go down the route of live recording chats, it would be nice to have those, especially hype trains.

But that was not the point of my initial post, it was just to allow chats to be saved with the most amount of data possible for preservation purposes, since quite a bit of it is stripped or not saved to the vods afterwards.

@ScrubN
Copy link
Collaborator

ScrubN commented Feb 4, 2025

I'm not opposed to live recording chats, nor recording polls/hype trains. I think it is a much easier goal for me to reach than live recording VODs, though that is also still up for consideration, and it would be more practical given streamlink > ffmpeg works for downloading live streams. Either way however, I don't have the time right now to work on TwitchDownloader at the same rate as I used to, so I can't give any deadlines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants