Rpi4 freeze when watching twitch (pretty sure at midroll ad)

  • Hello community!

    I use LibreELEC and Kodi for a couple months now and it is great! I love it so much that I started developing my own plugins for Kodi.

    Anyway, the issue why I came to the forum is recently my pi started freezing when watching twitch with the kodi twitch addon. Here are the base facts:

    - When watching twitch, it freezes occasionally, mostly on streams that have midroll ads enabled

    - It doesnt freeze on other apps, i.e. Youtube

    - It doesnt freeze on streams that definitely dont have midroll ads

    - when it happens, the stream just stops, the picture stays visible, no sound and my tv remote doesnt work anymore. I tried the mobile app but to no avail

    I have seen issues on github but it was unclear to me if it was the same issue I have. Also, I'm not sure if I'm even at the right place since its likely a kodi issue but I figured since the whole system is affected, I'd start asking here.

    I added a log which I made with the pastelog function. kodi.log I can read logs but I couldnt really find the issue there. Also the last freeze was late at night so maybe something is with the timezone. Lmk if I need to adjust something and send a new log.

    Thank you in advance for reading and have a great day.

  • Add-on issues are rarely OS specific but you could prove that by testing the add-on under Kodi on RaspiOS instead of LE. If the issue exists there too you can focus on the Twitch add-on and log issues with the add-on devs via the support thread in the Kodi forums.

    I'd also suggest using LE12 to see if anything is different. Development for LE and Kodi has been focussed on Kodi Omega for a while now and even if there's a bug found, the fix will go into LE12/Omega first.

  • Thanks for the fast reply! I agree. The question here would only be if it is an LE issue that the whole system freezes since even if kodi needs a restart due to a misbehaving app that should not render the whole OS useless if you catch my drift. So I'll proceed with asking in kodi forums.

  • It's worth testing with video acceleration disabled.

    In settings/player/video disable "Use DRM PRIME decoder".

    Any change?

    If it avoids the issue, then it it suggests the problem is in the hw accelerated codec.

    If it doesn't (which I suspect is more likely), then it's a kodi/addon issue and best pursued on kodi forum.

  • I'm seeing the same issue (Raspi 4)

    It is definitely triggered by the ads in a stream. If I watch a stream that I subscribe to (doesn't have ads) there is no issue.

    If I disable 'allow hardware acceleration with DRM PRIME' then the freezes don't happen, but there is a loss in quality. I guess it is something to do with switching to a different video 'mode' when the ads start.

    I wonder who developes the hw accelerated codec?

  • I'm seeing the same issue (Raspi 4)

    It is definitely triggered by the ads in a stream. If I watch a stream that I subscribe to (doesn't have ads) there is no issue.

    If I disable 'allow hardware acceleration with DRM PRIME' then the freezes don't happen, but there is a loss in quality. I guess it is something to do with switching to a different video 'mode' when the ads start.

    I wonder who developes the hw accelerated codec?

    Thanks for mentioning it. I was thinking I'm the only one. Also, the add creator didnt reply to my question. Will try again after I recently updated everything again (which helped with youtube).