Open camjac251 opened 6 years ago
Heya! Indeed, the script isn't really compatible with Windows. I wasn't really expecting anyone to stumble upon this project so I didn't really make it portable. It's mostly the Bash part that's an issue, the Python part could probably run under Windows assuming you've got all the required modules.
Obviously the easiest solution would be to run Linux under Windows. If you're running Windows 10 you should be able to use WSL to install Debian, which would then be able to run the whole script. There's also cygwin but that's a bit more complicated. If you already have either of those installed, it should work.
I understand if you don't want to install all that just to run this script, though. So I'd need to find a way to make it run natively under Windows. There are multiple solutions, and a web-based GUI is one of them, but I'm not actually sure which method would be the easiest and most practical.
I'll think about it and once I have something that seems to work, I'll ping you here so you can give it a try too. Thanks for the suggestion!
If this was required to run on Linux, could it be served using a web server? Like going to a page would show the list of VODs available and you'd be able to choose one and have it load the twitch player and a live chat replay? I currently use streamlink and a script that runs in a screen checking in an interval for a stream to go online and when it does, streamlink will record the stream live and close the file when it's over. This can be better than downloading VODs since they could have muted segments for music detections.
It'd be cool if the twitch player page could be recreated and it could be 1:1 for "offline" web viewing. I follow a channel that deletes the VODs shortly after the stream ends so it'd be nice to be able to watch the stream with chat in case you miss a stream day, or if the VOD gets deleted midstream.
Alright, so it took a while, but the script should now work under Windows. Turns out what I originally wrote wasn't portable at all, so I had to refactor and rewrite a bunch of stuff. Either way, it works on my Windows 10 machine with Python 3.5, so hopefully it will work on your machine too now.
There's still no GUI (that would have taken a lot more time), but the script is simple enough to use through the command line. I'll probably try to implement a GUI a some point, but considering I'm completely unfamiliar with web-based GUI in Python, it will take a while.
Again, though, using it through the CLI should be simple enough. I also rewrote the Readme to be more clear, so you hopefully won't have any trouble running the script. Lemme know if it works on your machine or if you encounter any kind of issue.
I currently use streamlink and a script that runs in a screen checking in an interval for a stream to go online and when it does, streamlink will record the stream live and close the file when it's over. This can be better than downloading VODs since they could have muted segments for music detections.
The problem I see with this method is that, unless I'm mistaken, there's no way to record the chat in text form alongside the recorded stream. My script needs the chat in text form to be able to render it alongside the original video.
That being said, if the stream you recorded is also available as a VOD, you should be able to grab the chat the same way as usual. You'll just have to put the video you recorded and name it the same as the video that would be downloaded, and the script will use it as normal. The chat and the video might not be synchronized, though. I could make an option to manually synchronize the chat, if you'd like.
It'd be cool if the twitch player page could be recreated and it could be 1:1 for "offline" web viewing.
So basically make a new webpage with the video and the chat alongside it, as if you were watching it on Twitch, but available offline? That should be doable. I might not be able to make something that looks exactly like the official player, but I should be able to do something close enough.
It might be possible to record the chat live possibly with these CBenni/logviewer bernardopires/twitch-chat-logger They log it to a DB though. I'm wondering if it can save time info and use that to sync up with the start of the stream recording.
Here is another twitch chat logger. Not sure if it is better than rechat but it was updated more recently. https://github.com/PetterKraabol/Twitch-Chat-Downloader
Would it be possible for this to happen inside a webpage or web app? For windows to work? Like if it were python based? I've been looking for a project that can use streamlink to record live channels while also grabbing the chat log and later being able to play it back locally with chat following seeking. Your project is the only one that I've been able to find that works with chat offline. Is this something that you think could be possible with this project?