jrudess / streamdvr

DVR for streaming entertainment
GNU General Public License v3.0
68 stars 16 forks source link

Twitch recordings get stuck/abort randomly #150

Closed challi1337 closed 3 years ago

challi1337 commented 3 years ago

Starting yesterday (22-Apr-2021) streamdvr is having some issues with downloading twitch.tv streams.

I have about 16 streamers in my list and it was working perfectly before. Streamdvr is running on a raspberry pi4 with youtube-dl for twitch and streamlink 1.7 for (selfwritten) afreecatv plugin (which works without issue)

I don't know much about coding or how to find the deeper issue to troubleshoot myself but I tried the newest and some older versions of youtube-dl, changing the site from https to http, recording only 1 stream at a time with no results.

How the error looks in the console: image

It is not always the same gap between streamers and the error. As soon as the error happens the streams that were recording stop recording and whenever it fixes itself after 2-3 minutes the started recordings get moved and new ones start....and the cycle repeats

I'm not sure if its a me specific error or if everyone is experiencing it, but I would appreciate any help you can provide.

challi1337 commented 3 years ago

Seems like it was a twitch related issues that fixed itself

jrudess commented 3 years ago

I've been periodically seeing this happen with twitch as well.

There were cases where streamlink would get stuck and say it is recording, but not actually be recording anything, and then when the streamer would come on the next day, no new recording would start because the old stuck one was still running.

So now when a streamer is detected as offline, all existing recordings for that streamer get terminated. The website glitch caused the streamer to be seen as offline, which stopped the recording, then a couple minutes later when the timer from config.yml expired, the recording would start again.

Since twitch breaking happens less frequently than streamlink processes getting stuck, this path was considered the lesser of two evils. But there are always ways to improve software flows, so if this starts happening on a regular basis, we can think of solutions.