Stremio / stremio-bugs

🐛 Post bug reports in Issues here
57 stars 9 forks source link

Extremely long loading times exclusive to Stremio TV Version #796

Closed nightknight111 closed 1 month ago

nightknight111 commented 1 month ago

Describe the bug It takes about anywhere from 19-30 seconds for the flashing/loading title screen before the video player actually shows up. Or sometimes it would fail to load completely. Basically the load times are incredibly inconsistent.

Expected behavior I have tested this extensively, almost all the external players like just player along with the stremio mobile version app on the same the chromecast 4k that im using loads and play the video within 2-5 seconds max regardless of the size or anything.

TV (please complete the following information):

Additionally although i have already mentioned it works perfectly with every other player and the mobile version. The streams i have tested are all realdebrid streams, I have a gigabit connection and i get about 350 mbps on my chromecast speedtest. And I dont even have problems with buffering once a video loads. it is just the title loading screen.

Video Playback settings: Player Exoplayer hardware decoding on tunneled playback off frame rate matching off ( have tried all the settings individually both enabled and disabled

TRtomasz commented 1 month ago

Please provide a video of the issue because it is simply not possible to understand what is the issue

nightknight111 commented 1 month ago

The only way i figure would be best to show you is to compare the mobile and the tv version on the same chromecast 4k. TV version is obviously the one im having issues with. Following are the results. Same source. And this issue is consistent with other files/videos. Following are the 2 videos.

https://github.com/Stremio/stremio-bugs/assets/146107313/47bde156-2013-45bd-a096-a1a7397913a1

https://github.com/Stremio/stremio-bugs/assets/146107313/03cfdc10-a935-4e15-abea-6195dccd865c

jaruba commented 1 month ago

did you try changing the internal video player (from the Stremio app's settings) to VLC?

jaruba commented 1 month ago

because it sounds to me like the default video player option (Media3) is just pre-buffering more than other video players?

nightknight111 commented 1 month ago

yes as i mentioned in my original post it works instantly with vlc, justplayer basically every external player and stremio mobile itself works instantly. I can use an external player but im missing out on some great features like episode select skip next episode you get the gist.

jaruba commented 1 month ago

Stremio Android TV supports choosing between Media3 (ExoPlayer) and VLC as the INTERNAL player, you can choose between them in the app settings. Which is why I asked if u tried to set VLC as the internal player, it may load at the expected speed.

nightknight111 commented 1 month ago

my bad yes i have tried switching to libvlc it made no difference and i get stutters with subtitles on libvlc anyway.

nightknight111 commented 1 month ago

I have tried the same test with tcl tv as well which runs google tv os and the results were the same. I actually only got a chromecast 4k thinking its my hardware thats the problem. So i'm pretty sure the issue is faced by quite a few people.

jaruba commented 1 month ago

well vlc and media3 simply could not have similarly long pre-buffering times imo, not in the context that you are describing at least, the subtitle stutters are a known VLC bug

i would suggest that you re-test using VLC as the internal player to ensure the validity of the details

nightknight111 commented 1 month ago

Yes it is better right now im getting about 12 seconds but its inconsistent as in even with exoplayer at times the same show friends an episode would load in 12 seconds or 10 if i get lucky but other times 20 or even a minute like you saw in the video. Is it not at least worth looking into as the mobile version is almost instant and its consistently like that with everything i throw at it. And does the mobile version not run exoplayer aswell?

jaruba commented 1 month ago

the mobile version uses only libVLC

nightknight111 commented 1 month ago

Could it be something else that causing this issue maybe just on google tv specifically? Just now i tried it again with libvlc and it took 20 seconds instead of the 12 like the previous.

jaruba commented 1 month ago

i would say that the main suspect is an addon load issue, there is a practice of doing header redirects to handle url resolving in addons, as some APIs, i would presume debrid services too, require you to resolve only the item that you want to play to a stream url for the player

addons are just http servers, so in order to handle higher loads, they make use of CDN cache (and maybe other cache layers too) while the response with the stream options may be faster, due to caching, the url resolving is a request that is handled individually, per each user, as it uses the api key of the user to generate a unique streaming link

as url resolving is something that is part of the video loading stage, and handled by addons, which during high load could answer very slowly, it can cause the entire loading process to take a long time

and yes, attempting any other player after an initial attempt, even the VLC internal player, would be much faster because the first request for the redirect url was handled by the first player that made the request, all other attempts after that make use of the CDN cache, so they are handled much faster

nightknight111 commented 1 month ago

You are completely right. It definitely has to do with the addon. The way i tested it is playing the same files on stremio but directly where the all the cached debrid files appear in the debrid catalogue. I can load into the player within 5-8 seconds.

Bayo99 commented 1 month ago

I am having the exact same issue as @nightknight111 using a Google TV (HD), takes 90 seconds to load using ExoPlayer or libVLC but JustPlayer is almost instant

Bayo99 commented 1 month ago

Other information, I am getting the same issue on my pixel 6 pro but not on my PC

TRtomasz commented 1 month ago

as @nightknight111 confirmed it is addon related and i couldnt reproduce it myself using popular addons i will close the issue