HOW-TO:Modify the video cache: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{divbox|orange|| {{big|'''NOTICE:''' These are considered advanced and experimental features. Some tags require a '''[[nightly build]]''' in order to work!}} }}[[Category:Gotham feature]] | {{divbox|orange|| {{big|'''NOTICE:''' These are considered advanced and experimental features. Some tags require a '''[[nightly build]]''' in order to work!}} }}[[Category:Gotham feature]] | ||
This page describes '''three [[advancedsettings.xml]] settings''' that can be used to maximize the 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. This can help with intermittent network issues, reduce how long the network is tied up, and/or improve battery life <ref>Certain devices (laptops, tablets, etc) that use sustained slow/medium-wifi usage, over the length of the video, will use more power than using fast-wifi usage for a shorter time. In other words, slowly loading a video file that is 30 minutes long, over a period of 30 minutes, can actually take more power than loading a 30 minute video in 5 minutes, even though more wifi speed/power is used during that 5 minutes.</ref>. | ||
{{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. It won't fix a slow local network.}} | {{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. It won't fix a slow local network.}} |
Revision as of 06:55, 20 August 2013
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. This can help with intermittent network issues, reduce how long the network is tied up, and/or improve battery life [1].
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. It won't fix a slow local network.
How-to modify the cache
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.
- 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".
- The basic advancedsettings.xml file will look like this:
<advancedsettings> <network> <!--- The three settings will go in this space, between the two network tags. ---> </network> </advancedsettings>
- Save this file in your userdata folder:
- 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.
Operating system | Userdata Folder |
---|---|
Android | Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note) |
iOS | /private/var/mobile/Library/Preferences/Kodi/userdata/ |
LibreELEC | /storage/.kodi/userdata/ |
Linux | ~/.kodi/userdata/ |
macOS | /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ |
Nvidia Shield (SMB) | smb://<nvidiashieldurl>/internal/Android/data/org.xbmc.kodi/files/.kodi/userdata |
OSMC | /home/osmc/.kodi/userdata/ |
tvOS | /private/var/mobile/Library/Preferences/Kodi/userdata/ |
webOS | /media/developer/apps/usr/palm/applications/org.xbmc.kodi/.kodi/userdata/ |
Windows | %APPDATA%\Kodi\userdata |
Windows Portable | <Install location chosen by you>\portable_data\userdata\ |
Windows via Microsoft Store | %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\ |
Windows Xbox | %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\ |
- Note: In some Android setups the path may be slightly different to the one stated above.
Cache settings
advancedsettings.xml tag | what it does |
---|---|
<alwaysforcebuffer>1</alwaysforcebuffer> |
Enable cache for local videos
This setting will force XBMC to use a cache for all video files, including local network, internet, and even the local hard drive. We do this because by default XBMC will only cache videos that use internet file paths/sources. |
<cachemembuffersize>0</cachemembuffersize> |
Increasing the cache
Here we can do two things:
or
|
<readbufferfactor>4.0</readbufferfactor> |
Increase the fill-rate of the cache
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
- All three options enabled, using local hard drive for cache
<advancedsettings> <network> <alwaysforcebuffer>1</alwaysforcebuffer> <cachemembuffersize>0</cachemembuffersize> <readbufferfactor>4.0</readbufferfactor> </network> </advancedsettings>
Notes
- ↑ Certain devices (laptops, tablets, etc) that use sustained slow/medium-wifi usage, over the length of the video, will use more power than using fast-wifi usage for a shorter time. In other words, slowly loading a video file that is 30 minutes long, over a period of 30 minutes, can actually take more power than loading a 30 minute video in 5 minutes, even though more wifi speed/power is used during that 5 minutes.