Video Cache Advance Settings

Hi,

Trying a few things to make my streaming (IPTV) work a little better and avoid the occasional blip in playback (I realise a lot of issues are out of my control - server, internet speed etc). One thing I have looked into is changing the cache buffer size in Kodi which seems to be optimised for devices that are RAM limited which the VERO 4K isn’t (compared to a pi 1 for example).

I added the following lines to my advanced settings file. My Vero 4K rebooted 3 times with a sad face but seems to have settled and works correctly now.

Couple of questions. OSMC seems to have various great tweaks over the base Kodi setup (automatically turning on wait on network when I use MYSQL for example). Does OSMC use the standard Kodi default (60mb?) cache size for the Vero 4K? Is it OK to make changes to these settings and does the advance settings file I’ve come up with seem sensible? Does anyone else use an advance settings for something similar and what settings do you use?

> <cache>
>           <buffermode>1</buffermode>
>           <memorysize>139460608</memorysize>
>           <readfactor>20</readfactor>
> </cache>

That’s a very precise memorysize you have there! Since you need 3x that figure free in RAM, are you sure you have 418381824 bytes (or 399 MB) free?

And are you sure you need the speed of RAM for your cache? The network bandwidth is a relative trickle compared to the write speed of RAM. Since you’re using a Vero 4K, it has eMMC, which should be faster than most SD cards.

Finally, the readfactor seems too high. If, for example, your movie requires 5 Mbits/sec, it means that it will try to fill the buffer at 100 Mbits/sec. This will cause the download to be very “bursty” in nature. and will probably max out the network each time it occurs, followed by periods of no download activity. The default value of 4 would place a more reasonable maximum load of 20 Mbits/sec on the network for the same movie.

So the figures come from the Kodi wiki:
http://kodi.wiki/view/HOW-TO%3AModify_the_video_cache

The Vero has 2gb RAM I believe and those settings are supposed to be suitable for a device with 1gb so hopefully appropriate.

I have tweaked slightly and changed the buffer mode back to zero. I am really focusing here on internet streamed content rather than local (NFS in my case). I do get the occasional blip in NFS playback but I’m pretty sure this is down to either database cleaning durning playback or the writing of files to disk on my NFS server (New downloads being moved to the correct folder and a library update and clean). I’ve also gone back to the default read factor. As you say 20 Mbits/sec should be more than enough.

I was under the impression that using cache in RAM was preferable to eMMC etc due to excessive read writes on the internal memory?

Hi,

There shouldn’t issues reading and writing to eMMC, its a common storage media players and mobile phones.

But If you still concerned about this you could still buffer to ram safely, but as dillthedog has suggested you should probably lower this value. (I don’t own a vero4k, but looking though the forum; the best suggestion seems to be 90mb.)

If you’re having blips on both NFS and IPTV, you may wish to increase the read factor. So perhaps a read factor of 5.

So e.g.

<advancedsettings>
 <cache>
           <buffermode>0</buffermode>
           <memorysize>94371840</memorysize>
           <readfactor>5</readfactor>
</cache>
</advancedsettings>

Thanks Tom.

Thanks,

Just to make sure I’m understanding these settings correctly. If I set buffer mode to 0 then the buffer isn’t used for local streams like MKV’s via NFS?

Hi,

Your need to set buffer mode to 1, to buffer local streams including nfs shares.

Thanks Tom.