Hello all,
I am trying to understand how caching works in Kodi / Libreelec. I am new to Kodi, so did my homework on the Kodi wiki. But I feel there is a LOT of background info missing from that article.
System: Libreelec 12.0.1 official, on Pi5, stock skin, no add-on apart from the ones available after a fresh install.
I try to play very high bitrate 4K videos (constant 85+Mbit/sec) on Pi5 4GB / Pi5 2GB, and have serious and annoying buffering issues. I use Pi5 wired LAN interface, but it is running only on 100Mbit/sec, not Gigabit. The video source is on an SMB windows box.
I checked the Kodi wiki: "caching" article.
--> Buffering mode is set as: Buffer all filesystems, including local files
--> Memory size: I tried changing to various hardcoded values (128MB, 256MB). Its unclear, if I need to reboot, or the change gets applied immediately?
--> Read factor: Adaptive. But I also tried 4x, 10x as well.
--> Cache Chunk size: I set it to 1 MB. Neither the UI help text nor the wiki article is really clear about what protocols do indeed honour that setting? How about SMB protocol? Does it benefit from the large chunk size, if I want to playback both giant 4K HEVC files and ordinary H.264 files over LAN?
How about the chunk size setting under the other location: Services \ SMBclient? Does it affect the same behavior as the caching chunk size described in the previous pharagraph? The UI help text is very unclear whether SMB client honours chunk size setup under which settings-location?
After all of this, I checked Kodi wiki: "Player Debug Info":
I see the following behavior: at the start of the video playback, Aq and Vq goes slowly up to @99%, and when it reaches 99%, "forward" starts to increase from 1MB and goes up to max at 95MB. Even if I set up 256MB, it doesnt go above 95MB. The percentage shows 100% for the 95MB cache value, which doesnt really make sense to me.
Under 3-4 minutes of continuous playback, "forward" slowly goes down under 1 MB. Then slowly the Vq goes down from 99% to 0%, and then the playback stops. Then the Aq+Vq starts increasing from 0% to 99%, and then playback starts again. But "forward" does not go up to 95MB, it stays around the same roughly 1 MB size. Then vq slowly goes down to 0%, playback stops and the cycle repeats ad infinitum.
My goal to cache slightly more agressively on both the 4GB and the 2GB Pi5, so that these high bitrate 4K videos can be played back from start to finish without buffering stops.