Posts: 70
Joined: Jun 2014
Reputation:
0
2014-07-14, 16:19
(This post was last modified: 2014-07-14, 16:20 by hydraSlav.)
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
Posts: 478
Joined: Feb 2013
Reputation:
15
2014-07-14, 17:20
(This post was last modified: 2014-07-14, 17:21 by DBMandrake.)
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.
Posts: 70
Joined: Jun 2014
Reputation:
0
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?
Posts: 167
Joined: Aug 2014
Reputation:
19
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