streamlink-twitch-gui icon indicating copy to clipboard operation
streamlink-twitch-gui copied to clipboard

Automatically start a new stream when current stream ends/is unable to reconnect

Open t3hstiv opened this issue 9 years ago • 2 comments

This probably sounds really lazy, and may not be within the scope of the project. But I was curious if it would be possible to have some sort of autoplay feature when a stream ends or can't reconnect. It could play the first stream in your followed streams or it could utilize the random stream button.

This also made me curious if it would be possible to sort the streams inside some of the different menus. I've noticed in the followed streams section it's sorted by viewers. This might be better as another feature request, but it'd be nice if the streams could be listed in different ways, like by game first alphabetically, and then by viewer count.

t3hstiv avatar Apr 20 '16 04:04 t3hstiv

I'm not sure about an auto play feature which should start different streams. A stream shutdown detection makes much more sense, so you don't have to do it manually in case the stream was dropped on Twitch's or the broadcaster's end. There are a couple of issues though, which are also the reason why I haven't implemented something like that before. When restarting a stream, you need to be sure that the old player process has been killed first. Otherwise you will stack up multiple instances of players. There are some players in their default configuration, like VLC for instance, which will not be closed by Livestreamer after a stream was closed. These players require certain parameters (like --play-and-exit in VLC). Since most users are using VLC with its default configuration, a different player-launch system needs to be implemented first. I'm having something in mind like a list of known players and parameters, which the GUI will use by default for those users who don't have defined a custom player in the settings menu. This way, the GUI will be able to know that the player was launched with the right configuration and will behave accordingly.

I'm also not sure about sorting elements in an infinite scroll list. It would be fine if you could set the sorting parameters while requesting the streams from the Twitch API, but this is not supported. It's the same issue with filtering streams. Doing this on the client side after receiving a list of streams does not work well.

bastimeyer avatar Apr 20 '16 06:04 bastimeyer

Yeah I can see how having a bunch of instances of players open wouldn't be good. Would it be possible to have a setting that users can check off that will pass the --play-and-exit parameter if a user is using VLC or leaving their player option default? Then have a secondary autoplay setting that only works if that first --play-and-exit setting is checked.

Hmm. Yeah this train of thought seems to lead to the same idea you mentioned, having a list of known players and parameters. Even users who don't use a custom player would just default to VLC and its parameters in that list. You already have the option to pass in custom parameters in the videoplayer section in your settings, so I'm curious if changing the player-launch system to use a list of players and their parameters would be worth it. It could allow for an autoplay option that works for all players, instead of writing something specific for VLC like I mentioned above. And users could have settings that would pass in or ignore specific parameters, instead of having to write in custom parameters themselves. I suppose if the parameters that the GUI can pass into players will configure useful settings, then using a list of players and parameters for the player-launch system could be worthwhile.

And as for the sorting, it was more of an afterthought for the options that would be available if the autoplay was put in. I saw one of the issues about filtering when I searched for sort in the issues, and I was thinking that some of the same problems there might apply.

t3hstiv avatar Apr 20 '16 20:04 t3hstiv