jocala.com content starts below.

Kodi Cache Video Cache in Kodi

Each device you set up with adbLink can have its own custom video cache. This is done via the advancedsettings.xml file that is stored in the Kodi userdata directory. The preferences screen contains individual data for each defined device and this is where you set up custom cache for Kodi.

Set buffer mode

<buffermode>1</buffermode>

This setting will force Kodi to use a cache for all video files, including local network, internet, and even the local hard drive. Default value is 0 and will only cache videos that use internet file paths/sources.

memorysize 0 Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
1 Buffer all filesystems, both internet and local
2 Only buffer true internet filesystems (streams) (http, etc.)
3 No buffer

Define the cache size

<memorysize>20971520</memorysize>

Here we can do two things:

Value: 20971520 (or any value, in bytes) - keep the cache in RAM, but increase how much RAM is used. The number is the buffer size in bytes (20971520 is the default, which is 20MB, which requires 60MB of free RAM). Kodi will not buffer ahead more than this. Note: For the memory size set here, Kodi will require 3x the amount of RAM to be free. Setting this too high might cause Kodi to crash if it can't get enough RAM.

Value: 0 - we can use the local disk memory (typically your hard drive), which will not put any limit on the size (outside of the size of your drive). This also allows devices with low RAM, such as the Raspberry Pi, to cache more than they normally would due to the small amount of RAM they have. The cache is deleted from the local disk whenever playback is stopped. Note: This will likely cause increased wear-and-tear on your drive.

Increase the fill-rate of the cache

<readfactor>1</readfactor>

By default (value: 1), Kodi will only fill the cache a little above what is needed to play it back. It does this as to not max out your network and possibly max out some hardware. For most users and hardware, this setting shouldn't cause any issues, but be aware of it if you have unusual CPU spikes in your HTPC.

The value of this setting is a multiplier of the default limit. If Kodi is loading a typical bluray raw file at 36 Mbit/s, then a value of 2 will need at least 72 Mbit/s of network bandwidth. However, unlike with the RAM setting, you can safely increase this value however high you want, and Kodi won't crash. Just know that it might cause Kodi to attempt to use all available bandwidth on your HTPC during playback.

Some popular settings
These settings come from the Kodi Fire TV Wiki (see below) and are included as selectable presets under Device Setup. Device Setup also allows you to fine-tune cache.

Preset 1
<cache>
<buffermode>1</buffermode>
<memorysize>0</memorysize>
<readfactor>10</readfactor>
</cache>

Preset 2
<cache>
<buffermode>0</buffermode>
<memorysize>104857600</memorysize>
<readfactor>1</readfactor>
</cache>

Preset 3
<cache>
<buffermode>1</buffermode>
<memorysize>52428800</memorysize>
<readfactor>1</readfactor>
</cache>

Note that the settings above are for Kodi 17 and above; for Kodi 16.1 and previous make the following changes:

Replace the parent tag <cache> <cache> tags with <network> </network>

Replace the <memorysize> </memorysize> tags with <cachemembuffersize></cachemembuffersize>

Replace the <readfactor></readfactor> tags with <readbufferfactor></readbufferfactor>

The Old cache xml checkbox will tell adbLink to write the advancedsettings.xml file using the 16.1 cache tags. Left unchecked, it defaults to the new 17.x style.

If you have questions or comments, please email jocala@jocala.com. adbLink produces a log file, adblink.log, with each run. Include it in your email or post if you're having problems.

help menu

Donations are gratefully accepted!