Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
readbufferfactor vs cachemembuffersize
#1
I am a little confused on how these two settings coexist together.

From my understanding:
- cachemembuffersize sets the amount of cache to keep in RAM (amount x 3 for actual RAM usage)
- readbufferfactor increases the amount of cache saved per stream (avg stream bitrate x factor)

So, let's say I have a stream with:
- avg bitrate of 10Mbps
- cachemembuffersize of 3.75MB (30Mbps) [hypothetical]
- readbufferfactor of 2 (20Mbps)

So how much buffering will it do? Will it fill up 3.75MB of cache as per buffersize? Or will it fill up 2.5MB of cache as per bufferfactor?

Should I not be using these two settings together?

Thank you
Reply
#2
cachemembuffersize is supposed to set the maximum buffer size during buffering - I say supposed to, because there are certain situations where it will use more than the specified amount, and it's not clear whether it's a bug or not.

But generally the cache size that you see when you bring up the codec info page (press O during playback) will either grow to the size you specify or half the setting depending on video format.

readbufferfactor is supposed to throttle the download rate based on the average bitrate of the video. So for example if you're playing a video with an average bitrate of 5Mbps and you set readbuffer factor to 2.0 it will limit the download rate (and thus the speed at which the cache fills) to about 10Mbps. A readbuffer factor of 4.0 would limit it to 20Mbps in this example. (Assuming your internet connection and the server could handle that speed of course)

There is some evidence that readbufferfactor can cause issues if its set too low, including the default of 1.0, so most people set it relatively high such as 4.0 to avoid this. (Again, might be a bug or a design flaw, I'm not sure that anyone has really looked into it seriously)

So I would just set readbuffer factor to 4 and set cachemembuffersize to whatever suits you, bearing in mind you don't want it too huge wasting too much ram. (Alternatively use 0 which buffers to disk)
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#3
Ahhh.... so the readbufferfactor is the "speed" at which it fills up, and the cachemembuffersize is the amount it will fill.

Thank you.

Also, do you know how I can get the codec info from the remote?
Reply
#4
Yes for a 5Mbps video, setting the readbufferfactor to 2 would need a bandwidth of 10Mbps (2×5 = 10) remember that the readbufferfactor is a multiplier also setting the readbufferfactor is also seconds in your video data filling up example. Setting a readbufferfactor of 10 or 20 or any # will fill up to that # in seconds, every one second so 10 would fill up 10 seconds of your video data for every 1 second and so on
Reply

Logout Mark Read Team Forum Stats Members Help
readbufferfactor vs cachemembuffersize0