streamlink / streamlink-twitch-gui

A multi platform Twitch.tv browser for Streamlink
https://streamlink.github.io/streamlink-twitch-gui/
MIT License
2.68k stars 202 forks source link

Automatically record streams #322

Closed hhtesntwr closed 8 years ago

hhtesntwr commented 8 years ago

Hi, this is not a bug report. I am new to this forum, so hopefully I'm not banned for posting in the wrong section. I just wanted to know if there was a way to make the application open a stream as soon as one was detected? i want to do this so that I can automatically record streams of channels I follow that don't archive it themselves. I used to be able to do this using a little program called "twitch_poller.sh", but with the new client authentication API stuff, I just get 'error 400: bad request' and that .json thing. So I was wondering if this could be a solution. I'm sure I could search forums on VLC to figure out how to start recording as soon as its opened, but I can't do that if its not open already. Thank you very much - this graphical interface has been the only way i've been able to even access the streams with livestreamer at all.

bastimeyer commented 8 years ago

Hi. Asking questions on this issue tracker here is okay in general, but the title should at least include the question, so it can be found easily later on.

I just wanted to know if there was a way to make the application open a stream as soon as one was detected?

No, I don't like implementing stuff that does things automatically on its own. That's not what this GUI is meant for. It's a Twitch.tv browser for Livestreamer...

error 400: bad request this graphical interface has been the only way i've been able to even access the streams with livestreamer at all

You need to add a livestreamer parameter to your livestreamer config file that sets either the application client-id (--http-header Client-ID=jzkbprff40iqj646a697cyrvl0zt2m6) or your personal oauth token (--twitch-oauth-token=YOURTOKENHERE) for each Twitch API request. See the issue tracker of livestreamer itself, it is full of threads with the same question. The GUI does this automatically, that's why you don't have any issues while using it. Btw, the Livestreamer project is dead and will not be updated anymore. There is a fork of livestreamer called streamlink and the GUI will be rebranded in the future.

VLC to figure out how to start recording

I really hope that you don't mean capturing and re-encoding the stream on the fly with VLC, it's a terrible idea.

Livestreamer does support writing streams onto your filesystem. Just use the -o filename.ts parameter for that.

Unfortunately, the GUI doesn't support recording streams yet, because implementing this would require a complete rewrite of the stream launch logic, which is a pretty big task. Right now there is much more important stuff for me to fix or add/implement.

hhtesntwr commented 8 years ago

@bastimeyer thank you so much for the response. Only one problem - When I try to put that personal oauth token into the config file, it doesn't seem to recognize it when i try to open a stream. It works if I do that directly every time, but I would much rather not have to go through that whole process every time. Thank you again

hhtesntwr commented 8 years ago

@bastimeyer Ok actually I have just figured it out - the dash was messing it up - now the recorder is working again like a charm! thank you so much! I'm surprised you think its a terrible idea - here is the link to the "twitch_poller.sh" script I was referring to: http://askubuntu.com/questions/546548/twitch-livestream-downloading You gotta check it out man - it actually works and is very simple to run - only downside is i have to leave my computer on perpetually! But I just create a much more power saving power plan for whenever i leave the house.

bastimeyer commented 8 years ago

now the recorder is working again like a charm

👍

I'm surprised you think its a terrible idea

I was talking about VLC, not the script. The script is using the -o livestreamer parameter, which is the correct way of downloading and saving streams.