HOW-TO:Modify the video cache: Difference between revisions
Line 50: | Line 50: | ||
|} | |} | ||
|- | |- | ||
| <code><cachemembuffersize>''' | | <code><cachemembuffersize>'''20971520'''</cachemembuffersize></code> | ||
| {{infobox|datastyle=background:#ddf;|data1=Requires XBMC v12.0 or higher}}{{big|'''Increasing the cache'''}} | | {{infobox|datastyle=background:#ddf;|data1=Requires XBMC v12.0 or higher}}{{big|'''Increasing the cache'''}} | ||
Line 59: | Line 59: | ||
* '''{{Big|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.}} | * '''{{Big|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.}} | ||
|- | |- | ||
| <code><readbufferfactor>''' | | <code><readbufferfactor>'''1'''</readbufferfactor></code> | ||
| {{infobox|datastyle=background:#ddf;|data1=Requires XBMC v13.0 or higher}}{{big|'''Increase the fill-rate of the cache'''}} | | {{infobox|datastyle=background:#ddf;|data1=Requires XBMC v13.0 or higher}}{{big|'''Increase the fill-rate of the cache'''}} |
Revision as of 08:45, 24 May 2014
advancedsettings.xml Video library |
HOW-TO:Modify the video cache |
This page describes three advancedsettings.xml settings that can be used to maximize the video playback cache. You can use all or just a couple of these settings to see significant improvements in cache performance, should you require it (most users will not require these modifications). This can help with intermittent network issues, reduce how long the network is tied up, and sometimes improve battery life.
Note: Even if you change the cache settings in XBMC, that won't change how fast the video file data comes in over the network: It won't make a slow server load the video any faster, etc.
Steps
If you don't already have an advancedsettings.xml file, it's very simple to make. XBMC uses this file for advanced settings and features that normal users shouldn't modify without first knowing what they do, as well as for experimental features, etc.
1 | Since you can use all or just some of the following settings, let's start out with the basic file. Create a plain text file (no rich text formatting, don't use .doc, etc) and save it as advancedsettings.xml. Make sure that the file extension is ".xml" and not ".txt" or ".xml.txt". | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | Cut and paste this into your new plain text file:
| ||||||||||||||||||||||||||||
3 | Add some or all of the settings tags from the next section. | ||||||||||||||||||||||||||||
4 | Save this file in your userdata folder:
Note: If you have an existing file, make sure the <network></network> tags, and settings we'll add between them, are between the main <advancedsettings></advancedsettings> tags. The Userdata folder is a subfolder of the Kodi Data Folder and is located as shown in the table below.
|
Cache settings
advancedsettings.xml tag | what it does | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
<buffermode>1</buffermode>
|
This setting will force XBMC 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.
| ||||||||||
<cachemembuffersize>20971520</cachemembuffersize>
|
Here we can do two things:
or
| ||||||||||
<readbufferfactor>1</readbufferfactor>
|
By default (value: 1), XBMC 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.
|
Examples
Example 1
All three options enabled, using local hard drive for cache.
- advancedsettings.xml
<advancedsettings> <network> <buffermode>1</buffermode> <cachemembuffersize>0</cachemembuffersize> <readbufferfactor>4.0</readbufferfactor> </network> </advancedsettings>
Example 2
Only cache size changed, using 100MB of RAM for cache (which requires 300MB of free RAM).
- advancedsettings.xml
<advancedsettings> <network> <cachemembuffersize>104857600</cachemembuffersize> </network> </advancedsettings>
Example 3
Two options enabled, using 50MB of RAM for cache (which requires 150MB of free RAM), and cache both internet, LAN, and local content.
- advancedsettings.xml
<advancedsettings> <network> <buffermode>1</buffermode> <cachemembuffersize>52428800</cachemembuffersize> </network> </advancedsettings>
Notes