Advancedsettings.xml: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(286 intermediate revisions by 29 users not shown)
Line 2: Line 2:
{{bigger|{{note|'''The advancedsettings.xml file does not exist by default. You have to create it first!'''}} }}
{{bigger|{{note|'''The advancedsettings.xml file does not exist by default. You have to create it first!'''}} }}


<section begin="intro" />The [[advancedsettings.xml]] file, which does not exist by default, can be created by a user in their '''[[userdata folder]]'''. This file is used for advanced settings and options that do not have GUI controls inside of {{kodi}}. Some settings are experimental or very rarely set, so they can only be used via the advancedsettings.xml file. The file is simply a plain text file and can be edited by various text editors, so long as the name is "advancedsettings.xml". These advanced settings can be used to tweak various things such as episode naming patterns, special network ports, special behaviors, and more.<section end="intro" />
<section begin="intro" />The [[advancedsettings.xml]] file, which does not exist by default, can be created by a user in their '''[[Userdata|userdata folder]]'''.
 
This file is used for advanced settings and options that do not have GUI controls inside of {{kodi}}. Some settings are experimental or very rarely set, so they can only be used via the advancedsettings.xml file. The file is simply a plain text file and can be edited by various text editors, so long as the name is "advancedsettings.xml". These advanced settings can be used to tweak various things such as episode naming patterns, special network ports, special behaviors, and more.<section end="intro" />


The following page will describe the structure of the advancedsettings.xml file and the various individual settings.
The following page will describe the structure of the advancedsettings.xml file and the various individual settings.
Line 8: Line 10:
{{note|
{{note|
# All XML tags must be lowercase. The start and end of the advancedsettings.xml file must have the <advancedsettings> and </advancedsettings> tags.
# All XML tags must be lowercase. The start and end of the advancedsettings.xml file must have the <advancedsettings> and </advancedsettings> tags.
# {{kodi}} will only read the advancedsettings.xml file when it starts up. If you make changes while it is running then you must restart {{kodi}}.
# Kodi will only read the advancedsettings.xml file when it starts up. If you make changes while it is running then you must restart Kodi.
# For some Windows versions, {{kodi}} has two <code>\userdata\</code> folders. The correct one to put the advancedsettings.xml file in is not the one in Program Files, but in <code>%appdata%\Kodi\userdata\.</code>}}
# For some Windows versions, Kodi has two <code>\userdata\</code> folders. The correct one to put the advancedsettings.xml file in is not the one in Program Files, but in <code>%appdata%\Kodi\userdata\.</code>}}


== Layout ==
== Layout ==
Line 15: Line 17:
The layout of <code>advancedsettings.xml</code> is as follows:
The layout of <code>advancedsettings.xml</code> is as follows:


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<advancedsettings>
<advancedsettings version="1.0">
     <setting>value</setting>
     <setting>value</setting>
     ...
     ...
Line 23: Line 25:
</syntaxhighlight>
</syntaxhighlight>


where "setting" gives the name of the setting, and "value" gives it's value.
where "setting" gives the name of the setting, and "value" gives its value.


A list of the available "setting" strings and their values is given below.
A list of the available "setting" strings and their values is given below.


= List of available settings =
= List of available settings =
List of available settings that are recognised in the advancedsettings.xml file <ref>https://github.com/xbmc/xbmc/blob/master/xbmc/settings/AdvancedSettings.cpp</ref>
Recommended: Use the table of contents or the search function in your browser to locate items.


== Troubleshooting settings ==
== Troubleshooting settings ==


=== loglevel ===
=== loglevel ===
{{Anchor|.3Cloglevel.3E}}
{{Anchor|.3Cloglevel.3E}}
{{see also|debug log}}
 
<section begin="loglevel" />
<section begin="loglevel" />
{{xml setting
Sets the logging level used to log errors and information. The "hide" attribute is optional.  
| tag name = loglevel
 
| tag attribute = hide
<syntaxhighlight lang=xml>
| tag attribute type = true_false
  <loglevel hide="attribute">options</loglevel>
| tag attribute values =
{{option values
| value1= true | value1 description= Hides "enable debugging" guisetting.
| value2= false | value2 description= "enable debugging" guisetting will switch between min(loglevel, 0) and max(loglevel, 2) for off and on respectively. '''(Default)'''
}}
| tag attribute default values = true
| option type = list
| option values =
{{option values
| value1= -1 | value1 description= No logging, suppresses all log output
| value2= 0 | value2 description= Normal logging, only logging errors '''(Default)'''
| value3= 1 | value3 description= Debug logging ''(without showing text on screen)''
| value4= 2 | value4 description= Debug logging with freemem, fps and cpu usage shown on screen
| value5= 3 | value5 description= Debug logging with freemem, fps and cpu usage and full smb logging
}}
| default values = 0
| example values =
| platform = all
| {{kodi}} version = 8-12
| description =
The logging level that {{kodi}} will use to log errors and information. The "hide" attribute is optional.
| example =
Example:
<syntaxhighlight lang="xml" enclose="div">
    <loglevel hide="false">1</loglevel>
</syntaxhighlight>
</syntaxhighlight>


<br />
{| class="mw-collapsible mw-collapsed wikitable"
|-
! style="width:100px;" | Attribute
! style="width:500px;" | Action
|-
! '''true'''
| Hides the "enable debugging" setting in the Settings page. (default)
|-
! '''false'''
| Allows "enable debugging" setting to switch between '''0''' and '''2'''.
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
|-
! style="width:100px;" | Option
! style="width:500px;" | Action
|-
! '''-1'''
| No logging, suppresses all log output
|-
! '''0'''
| Normal logging, only logging errors (default)
|-
! '''1'''
| Debug logging with freemem, fps and cpu usage (no on screen)
|-
! '''2'''
| Same as 1 (with on screen display)
|-
! '''3'''
| Same as 2 + full smb logging (no on screen display)
|}


{{Note| If debugging is switched on in the GUI, loglevel will be set to 2 (''log to both file and on-screen information''); this will over-ride any <code>advancedsettings.xml</code> setting.}}<br />
{| class="mw-collapsible mw-collapsed wikitable"
|-
! style="width:100px;" | Example
! style="width:500px;" |
|-
! Example 1:
|<syntaxhighlight lang=xml enclose="div">
<advancedsettings>
    <loglevel>2</loglevel> 
</advancedsettings>
</syntaxhighlight>
|-
! Example 2:
|<syntaxhighlight lang=xml enclose="div">
<advancedsettings>
    <loglevel hide="true">2</loglevel>
</advancedsettings>
</syntaxhighlight>
|}


{{Note| If debugging is switched on in the GUI when {{kodi}} is shut down, then it will be automatically be re-enabled at level 2 when it  is re-started. This is true even if 'hide' is subsequently set to 'true' - in other words, if you enable it in the GUI and then hide the GUI toggle, it will stay on level 2 irrespective of what you subsequently set in <code>advancedsettings.xml</code>.}}<br />
'''Note:''' The setting is persistent through shutdown and restarts.<br>
}}
'''Note:''' If debugging is enabled in the GUI, loglevel will be set to '''2'''. This will over-ride the <code>advancedsettings.xml</code> setting. You must disable the GUI Setting before adding the entry to <code>advancedsettings.xml</code>.<br />
<section end="loglevel" />
<section end="loglevel" />
:''{{see also|Log_file|label 1=Debug Log}}''


=== jsonrpc ===
=== jsonrpc ===
{{Anchor|.3Cjsonrpc.3E}}
{{Anchor|.3Cjsonrpc.3E}}
To make it easier for developers using the [[JSON RPC]] API in their (third party) applications to debug during development the json output of {{kodi}} can be prettified by setting '''compactoutput''' to '''false'''. Default json output mode is a compact print which does not contain any unnecessary whitespaces and therefore is difficult to read for humans.
To make it easier for developers using the [[JSON-RPC_API]] API in their (third party) applications to debug during development the json output of Kodi can be prettified by setting '''compactoutput''' to '''false'''. Default json output mode is a compact print which does not contain any unnecessary whitespaces and therefore is difficult to read for humans.
Furthermore using the '''tcpport''' setting it is possible to change the default TCP port used by {{kodi}} for JSON RPC (which is 9090) to any other valid port.
Furthermore using the '''tcpport''' setting it is possible to change the default TCP port used by Kodi for JSON RPC (which is 9090) to any other valid port.


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<jsonrpc>
<jsonrpc>
     <compactoutput>false</compactoutput>
     <compactoutput>false</compactoutput>
Line 86: Line 118:
</jsonrpc>
</jsonrpc>
</syntaxhighlight>
</syntaxhighlight>
=== other - enableairtunesdebuglog ===
{{see|#enableairtunesdebuglog}}


== Audio/video playback settings ==
== Audio/video playback settings ==
Line 94: Line 123:
=== skiploopfilter ===
=== skiploopfilter ===
{{anchor|.3Cskiploopfilter.3E}}
{{anchor|.3Cskiploopfilter.3E}}
The amount of the loop filter to skip on h264 decoding.  This can help the performance of slower machines when decoding h264 content.  Values, in decreasing CPU usage (and decreasing quality)
The amount of the loop filter to skip on h.264 decoding.  This can help the performance of slower machines when decoding h264 content.  Values, in decreasing CPU usage (and decreasing quality)
* -16 None
* -16 None
* 0 Skip only empty frames (default)
* 0 Skip only empty frames (default)
* 8 Skip non-reference frames (default on ATV)
* 8 Skip non-reference frames
* 16 Skip bi-dir frames
* 16 Skip bi-dir frames
* 32 Skip all non-key frames
* 32 Skip all non-key frames
* 48 Skip all frames
* 48 Skip all frames
Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
   <skiploopfilter>8</skiploopfilter>
   <skiploopfilter>8</skiploopfilter>
</syntaxhighlight>
</syntaxhighlight>
Line 108: Line 137:
=== video ===
=== video ===
{{anchor|.3Cvideo.3E}}
{{anchor|.3Cvideo.3E}}
{{see also|HOW-TO:Modify automatic watch and resume points|HOW-TO:Modify time seeking}}
 
<syntaxhighlight lang="xml" enclose="div">
The <video> section also includes the following child-tags, which have their own sections:
*[[#cleandatetime]]
*[[#cleanstrings]]
*[[#excludefromscan]]
*[[#excludefromlisting]]
*[[#excludetvshowsfromscan]]
 
 
{{note|Some tags that have a "third-level" and are grouped together are highlighted in color.}}
 
{| class="prettytable"
! Tag !! Description
|-
|
<syntaxhighlight lang=xml>
<video>
<video>
  <subsdelayrange>10</subsdelayrange> <!-- Delay range for subtitles, in seconds. -->
</syntaxhighlight>
   <audiodelayrange>10</audiodelayrange> <!-- Delay range for audio/video sync, in seconds. -->
| Parent tag that all other child tags need to be placed inside of. Do not use more than one '''<code><video></code>''' tag, but instead place all other child-tags within a single '''<code><video></video></code>''' set.
   <smallstepbackseconds>7</smallstepbackseconds> <!-- Length of the small skip back when playing a video --> <!-- Will be replaced by a GUI option in v15 -->
|-
  <usetimeseeking>true</usetimeseeking> <!-- Whether to use time based or percentage based seeking. -->
|
   <timeseekforward>30</timeseekforward> <!-- Time to seek forward in seconds when doing a short seek.  Defaults to 30. --> <!-- Deprecated. Will be replaced by a GUI option in v15. Note: Need to double check if it will actually be removed? -->
<syntaxhighlight lang=xml>
   <timeseekbackward>-30</timeseekbackward> <!-- Time to seek backward in seconds when doing a short seek. Defaults to -30. --> <!-- Deprecated. Will be replaced by a GUI option in v15. Note: Need to double check if it will actually be removed? -->
   <subsdelayrange>10</subsdelayrange>
   <timeseekforwardbig>600</timeseekforwardbig>  <!-- Time to seek forward in seconds when doing a long seek.  Defaults to 600 (10 minutes). -->
</syntaxhighlight>
   <timeseekbackwardbig>-600</timeseekbackwardbig> <!-- Time to seek forward in seconds when doing a long seek.  Defaults to -600 (10 minutes). -->
| Delay range for subtitles, in seconds.
   <percentseekforward>2</percentseekforward>  <!-- Amount to seek forward as a percentage, when doing a short seek.  Defaults to 2. -->
|-
   <percentseekbackward>-2</percentseekbackward> <!-- Amount to seek backward as a percentage, when doing a short seek.  Defaults to -2. -->
|
   <percentseekforwardbig>10</percentseekforwardbig>  <!-- Amount to seek forward as a percentage, when doing a long seek.  Defaults to 10. -->
<syntaxhighlight lang=xml>
   <percentseekbackwardbig>-10</percentseekbackwardbig> <!-- Amount to seek forward as a percentage, when doing a long seek.  Defaults to -10. -->
   <maxtempo>2.1</maxtempo>
  <blackbarcolour>1</blackbarcolour>  <!-- colour of the black bars (0->255), (black->white) on videos. -->
</syntaxhighlight>
   <fullscreenonmoviestart>true</fullscreenonmoviestart> <!-- Whether to go to fullscreen or not when starting a movie. Defaults to true. -->
| Allow further increase of playback speed over the default of 1.5<br>
   <defaultplayer>dvdplayer</defaultplayer> <!-- Set the default video player: dvdplayer or extplayer. -->
maxtempo must be in the range of 1.5 to 2.1 <br>
   <excludefromscan> <!-- Regular expressions that if evaluated to true won't be added to library. -->
Be aware of the limitations of your platform / hardware as not all are capable of the increased maxtempo <ref>https://forum.kodi.tv/showthread.php?tid=10023&pid=2795069#pid2795069</ref>
|-
|
<syntaxhighlight lang=xml>
   <audiodelayrange>10</audiodelayrange>
</syntaxhighlight>
| Delay range for audio/video sync, in seconds.
|-  
|
<syntaxhighlight lang=xml>
   <usetimeseeking>true</usetimeseeking>
</syntaxhighlight>
| Whether to use time based or percentage based seeking. {{small see also|Skip steps}}
|-
|
<syntaxhighlight lang=xml>
   <timeseekforwardbig>600</timeseekforwardbig>
   <timeseekbackwardbig>-600</timeseekbackwardbig>
</syntaxhighlight>
| Time to seek forward in seconds when doing a long seek.  Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. ''{{small|See also: [[Skip steps]] }}''
|-
|
<syntaxhighlight lang=xml>
   <percentseekforward>2</percentseekforward>
   <percentseekbackward>-2</percentseekbackward>
</syntaxhighlight>
| Amount to seek forward as a percentage, when doing a short seek.  Defaults to 2 (2%) and -2 (2%) respectively. ''{{small|See also: [[Skip steps]] }}''
|-
|
<syntaxhighlight lang=xml>
   <percentseekforwardbig>10</percentseekforwardbig>
   <percentseekbackwardbig>-10</percentseekbackwardbig>
</syntaxhighlight>
| Amount to seek forward as a percentage, when doing a long seek.  Defaults to 10 (10%) and -10 (10%) respectively. ''{{small|See also: [[Skip steps]] }}''
|-  
|
<syntaxhighlight lang=xml>
   <fullscreenonmoviestart>true</fullscreenonmoviestart>
</syntaxhighlight>
| Whether to go to fullscreen or not when starting a movie. Defaults to true.
|-
|
<syntaxhighlight lang=xml>
   <defaultplayer>VideoPlayer</defaultplayer>
</syntaxhighlight>
| Set the default video player: VideoPlayer or an external player. See '''[[External players]]''' for more info.
|-
|
<syntaxhighlight lang=xml>
   <excludefromscan>
     <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
     <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
   </excludefromscan>
   </excludefromscan>
  <excludefromlisting> <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
</syntaxhighlight>
| Regular expressions that if evaluated to true won't be added to library.  It is possible to add multiple <code><regexp></code> tags to match multiple patterns
|-
|
<syntaxhighlight lang=xml>
  <excludefromlisting>
     <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
     <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
   </excludefromlisting>
   </excludefromlisting>
   <playcountminimumpercent>90</playcountminimumpercent> <!--Minimum percentage that has to be played before it is marked as watched. Set to 101 to never auto-mark items as watched -->
</syntaxhighlight>
   <ignoresecondsatstart>180</ignoresecondsatstart> <!-- Number of seconds to ignore at video start after which a resume point is created -->
| Regular expressions that if evaluated to true won't be displayed in files view.
   <ignorepercentatend>8</ignorepercentatend>  
|-
  <!-- percentage of video to ignore at the end. If you stop watching the video here no resume point is created. Set to 101 to never save a resume point. The video is already marked as watched at 90%, see above. -->
|
 
<syntaxhighlight lang=xml>
  <forcevaapienabled>true</forcevaapienabled> <!-- VAAPI is only tested on intel hardware. This flag helps wrapper developers and fglrx users to easily test current VAAPI state on their hardware. Default is false. Please report crashes directly to your driver vendor -->
   <playcountminimumpercent>90</playcountminimumpercent>
 
</syntaxhighlight>
| Minimum percentage that has to be played before it is marked as watched. Set to 101 to never auto-mark items as watched. ''{{small|See also: [[HOW-TO:Modify automatic watch and resume points]] }}''
|-
|
<syntaxhighlight lang=xml>
   <ignoresecondsatstart>180</ignoresecondsatstart>
</syntaxhighlight>
| Number of seconds to ignore at video start after which a resume point is created. ''{{small|See also: [[HOW-TO:Modify automatic watch and resume points]] }}''
|-
|
<syntaxhighlight lang=xml>
   <ignorepercentatend>8</ignorepercentatend>
</syntaxhighlight>
| Percentage of video to ignore at the end. If you stop watching the video here no resume point is created. Set to 101 to never save a resume point. The video is already marked as watched at 90%, see above. ''{{small|See also: [[HOW-TO:Modify automatic watch and resume points]] }}''
|-
|
<syntaxhighlight lang=xml>
   <vdpauscaling>true</vdpauscaling>
   <vdpauscaling>true</vdpauscaling>
  <!-- scales with vdpau instead of opengl and turns on its HQ scaler when available, enabling this might slow down rendering and cause framedrops especially on ION systems,
</syntaxhighlight>
  this setting requires a vdpau feature set C gpu-->
| Scales with vdpau instead of opengl and turns on its HQ scaler when available, enabling this might slow down rendering and cause framedrops especially on ION systems, this setting requires a vdpau feature set C GPU.
 
|-
   <enablehighqualityhwscalers>true</enablehighqualityhwscalers> <!-- allow turning on the spline36 and lanczos3 shader (for GL builds) -->
|
   <ppffmpegdeinterlacing>linblenddeint</ppffmpegdeinterlacing> <!-- override the deinterlacing options passed to libpostproc -->
<syntaxhighlight lang=xml>
   <ppffmpegpostprocessing>ha:128:7,va,dr</ppffmpegpostprocessing> <!-- override the post processing options passed to libpostproc when 'Video post-processing' is activated in GUI Videos-Settings-Playback -->
   <enablehighqualityhwscalers>true</enablehighqualityhwscalers>
   <autoscalemaxfps>30</autoscalemaxfps> <!-- when scaling method is set to auto, bilinear is chosen when the fps is higher than this limit, the default is 30 -->
</syntaxhighlight>
 
| Allow turning on the spline36 and lanczos3 shader (for GL builds).
 
|-
  <!-- Settings for when "Adjust refreshrate to match video fps" is enabled, available since r33806. -->
|
  <!-- NOT available in the Dharma release or any release before that -->
<syntaxhighlight lang=xml>
  <dxvaallowhqscaling>false</dxvaallowhqscaling>
</syntaxhighlight>
| Enables high quality video upscaling for Windows.
|-
|
<syntaxhighlight lang=xml>
   <ppffmpegdeinterlacing>linblenddeint</ppffmpegdeinterlacing>
</syntaxhighlight>
| Override the deinterlacing options passed to libpostproc.
|-
|
<syntaxhighlight lang=xml>
   <ppffmpegpostprocessing>ha:128:7,va,dr</ppffmpegpostprocessing>
</syntaxhighlight>
| Override the post processing options passed to libpostproc when 'Video post-processing' is activated in GUI Videos-Settings-Playback.
|-
|
<syntaxhighlight lang=xml>
   <autoscalemaxfps>30</autoscalemaxfps>
</syntaxhighlight>
| When scaling method is set to auto, bilinear is chosen when the fps is higher than this limit, the default is 30.
|-
|
<syntaxhighlight lang=xml>
   <adjustrefreshrate>  
   <adjustrefreshrate>  
 
</syntaxhighlight>
    <!-- "Adjust refreshrate to match video fps" will try to select the best refreshrate for the video fps -->
| style="background:#CADCFB;" | Settings for when "Adjust refreshrate to match video fps" is enabled in the video playback GUI settings.
    <!-- but it doesn't always get it right, for example it might switch to an unsupported refreshrate. -->
|-
 
|
    <!-- You can add overrides here to switch to a certain refreshrate based on video fps -->
<syntaxhighlight lang=xml>
    <!-- It's possible to add as many overrides as you need. -->
    <!-- Overrides are processed in order, if the first one doesn't match the fps or no refreshrates match -->
    <!-- that override, it will try the next one until no overrides are left -->
 
     <override>
     <override>
       <fps>23.976</fps>      <!-- if the fps is between 23.966 and 23.986 -->
       <fps>23.976</fps>
       <refresh>60.0</refresh> <!-- switch to the first found refreshrate that is between 59.99 and 60.01 -->
       <refresh>60.0</refresh>
     </override>
     </override>
</syntaxhighlight>
| style="background:#CADCFB;" | '''Example -''' "Adjust refreshrate to match video fps" will try to select the best refreshrate for the video fps but it doesn't always get it right, for example it might switch to an unsupported refreshrate. You can add overrides here to switch to a certain refreshrate based on video fps. It's possible to add as many overrides as you need.  Overrides are processed in order, if the first one doesn't match the fps or no refreshrates match that override, it will try the next one until no overrides are left.


* '''fps''' - if the fps is between 23.966 and 23.986
* '''refresh''' - switch to the first found refreshrate that is between 59.99 and 60.01
|-
|
<syntaxhighlight lang=xml>
     <override>
     <override>
       <fpsmin>29.96</fpsmin>        <!-- You can also specify the fps range yourself -->
       <fpsmin>29.96</fpsmin>
       <fpsmax>30.01</fpsmax>
       <fpsmax>30.01</fpsmax>
       <refreshmin>59.0</refreshmin> <!-- Same for the refreshrate -->
       <refreshmin>59.0</refreshmin>
       <refreshmax>61.0</refreshmax>
       <refreshmax>61.0</refreshmax>
     </override>
     </override>
   
</syntaxhighlight>
    <!-- It none of the overrides match, or none of the refreshrates match any of the fps matching overrides, -->
| style="background:#CADCFB;" | '''Example -'''
    <!-- it will choose a fallback refreshrate. Fallbacks are process in order, if the first fallback doesn't match -->
* '''fpsmin''' / '''fpsmin''' - You can also specify the fps range yourself.
    <!-- any refreshrate, it will try the next one until no fallbacks are left -->
* '''refreshmin''' / '''refreshmax''' - Same for the refreshrate
|-
|
<syntaxhighlight lang=xml>
     <fallback>
     <fallback>
       <refresh>50.0</refresh> <!-- switch to the first found refreshrate that is between 49.99 and 50.01. -->
       <refresh>50.0</refresh>
     </fallback>
     </fallback>
</syntaxhighlight>
| style="background:#CADCFB;" | '''Example -''' If none of the overrides match, or none of the refreshrates match any of the fps matching overrides, it will choose a fallback refreshrate. Fallbacks are process in order, if the first fallback doesn't match any refreshrate, it will try the next one until no fallbacks are left.


    <!-- You can also specify the range for the fallback yourself -->
* '''refresh''' - Switch to the first found refreshrate that is between 49.99 and 50.01.
|-
|
<syntaxhighlight lang=xml>
     <fallback>
     <fallback>
       <refreshmin>49.0</refreshmin>
       <refreshmin>49.0</refreshmin>
       <refreshmax>51.0</refreshmax>
       <refreshmax>51.0</refreshmax>
     </fallback>
     </fallback>
</syntaxhighlight>
| style="background:#CADCFB;" | '''Example -''' You can also specify the range for the fallback yourself.


    <!-- If none of the overrides match the video fps, or no refreshrates match any of the fps matching overrides, -->
If none of the overrides match the video fps, or no refreshrates match any of the fps matching overrides, and no fallbacks are specified or no refreshrates match any fallbacks, it will automatically choose the best refreshrate (same as having no overrides and fallbacks).
    <!-- and no fallbacks are specified or no refreshrates match any fallbacks, -->
|-
    <!-- it will automatically choose the best refreshrate (same as having no overrides and fallbacks). -->
|
<syntaxhighlight lang=xml>
   </adjustrefreshrate>
   </adjustrefreshrate>
 
</syntaxhighlight>
| style="background:#CADCFB;" |
|-
|
<syntaxhighlight lang=xml>
   <checkdxvacompatibility>value</checkdxvacompatibility>
   <checkdxvacompatibility>value</checkdxvacompatibility>
  <!-- Advanced setting not present: let {{kodi}} autodetect cards that support H264 profile > L4.1. Set value to false to enable DXVA no matter what.
</syntaxhighlight>
  Set value to true if {{kodi}} doesn't autodetect that the graphics card doesn't support > L4.1 -->
| Advanced setting not present: let Kodi autodetect cards that support H.264 profile > L4.1. Set value to false to enable DXVA no matter what. Set value to true if Kodi doesn't autodetect that the graphics card doesn't support > L4.1.
 
|-
   <useocclusionquery>-1</useocclusionquery> <!--Use an occlusion query when capturing videoframes, -1 means auto detect, 0 means disabled, 1 means enabled, the default is -1.-->
|
   <fpsdetect>1</fpsdetect> <!-- fps detection for video playback, 0 = trust codec fps, 1 = recalculate from video timestamps with uniform spacing, 2 = recalculate from video timestamps always -->
<syntaxhighlight lang=xml>
 
   <useocclusionquery>-1</useocclusionquery>
  <!-- Compensate display latency (video lag). Latency is given in msecs. -->
</syntaxhighlight>
  <!-- Requires {{subst:Name}} 11.0 (Eden) or later. -->
| Use an occlusion query when capturing videoframes, -1 means auto detect, 0 means disabled, 1 means enabled, the default is -1.
|-
|
<syntaxhighlight lang=xml>
   <fpsdetect>1</fpsdetect>
</syntaxhighlight>
| FPS detection for video playback
* 0 = trust codec fps
* 1 = recalculate from video timestamps with uniform spacing
* 2 = recalculate from video timestamps always
|-  
|
<syntaxhighlight lang=xml>
   <latency>
   <latency>
 
</syntaxhighlight>
    <!-- Global default display latency -->
| style="background:#F0E68C;"| Start of '''latency''' tags. Display latency (video lag). Latency is given in msecs.
|-  
|
<syntaxhighlight lang=xml>
     <delay>0</delay>
     <delay>0</delay>
</syntaxhighlight>
| style="background:#F0E68C;" | Global default display latency.
|-
|
<syntaxhighlight lang=xml>
    <refresh></refresh>
</syntaxhighlight>
| style="background:#F0E68C;" | Override latency for given display (not video) refresh rates. When Kodi is in windowed mode, override is ignored. Multiple overrides are allowed.


    <!--
Syntax of an override entry:
      Override latency for given display (not video) refresh rates.
<syntaxhighlight lang=xml>
      When {{subst:Name}} is in windowed mode, override is ignored. Multiple
<refresh>
      overrides are allowed.
  <min>, <max> refresh rate range, OR
 
  <rate> exact refresh rate
      Syntax of an override entry:
  <delay> display latency for the given refresh rate
        <refresh>
</refresh>
          <min>, <max> refresh rate range, OR
</syntaxhighlight>
          <rate> exact refresh rate
|-
          <delay> display latency for the given refresh rate
|
        </refresh>
<syntaxhighlight lang=xml>
    -->
 
    <!-- Example: display has 125 msec latency at 23-24 Hz -->
     <refresh>
     <refresh>
       <min>23</min>
       <min>23</min>
Line 224: Line 399:
       <delay>125</delay>
       <delay>125</delay>
     </refresh>
     </refresh>
 
</syntaxhighlight>
    <!-- Example: display has 50 msec latency at 50 (+/-0.01) Hz -->
| style="background:#F0E68C;" | '''Example:''' display has 125 msec latency at 23-24 Hz
|-
|
<syntaxhighlight lang=xml>
     <refresh>
     <refresh>
       <rate>50</rate>
       <rate>50</rate>
       <delay>50</delay>
       <delay>50</delay>
     </refresh>
     </refresh>
 
</syntaxhighlight>
| style="background:#F0E68C;" | '''Example:''' display has 50 msec latency at 50 (+/-0.01) Hz
|-
|
<syntaxhighlight lang=xml>
   </latency>
   </latency>
    <!-- Filename triggers for 3D (stereoscopic) mode. -->
</syntaxhighlight>
    <stereoscopicregex3d>[-. _]3d[-. _]</stereoscopicregex3d>
| style="background:#F0E68C;" |
    <stereoscopicregexsbs>[-. _]h?sbs[-. _]</stereoscopicregexsbs>
|-
    <stereoscopicregextab>[-. _]h?tab[-. _]</stereoscopicregextab>
|
    <stagefright>
<syntaxhighlight lang=xml>
      <!--  -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
  <stereoscopicregex3d>[-. _]3d[-. _]</stereoscopicregex3d>
      <useavccodec>-1</useavccodec>
  <stereoscopicregexsbs>[-. _]h?sbs[-. _]</stereoscopicregexsbs>
      <usevc1codec>-1</usevc1codec>
  <stereoscopicregextab>[-. _]h?tab[-. _]</stereoscopicregextab>
      <usevpxcodec>-1</usevpxcodec>
</syntaxhighlight>
      <usemp4codec>-1</usemp4codec>
| Filename triggers for 3D (stereoscopic) mode.
      <usempeg2codec>-1</usempeg2codec>
|-
      <useswrenderer>false</useswrenderer>
|
    </stagefright>
<syntaxhighlight lang=xml>
    <mediacodec>
  <assfixedworks>false</assfixedworks>
      <!--  -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
</syntaxhighlight>
      <useavccodec>-1</useavccodec>
| Position behavior of ass subtitiles when setting "subtitle position on screen" set to "fixed". True to show at the fixed position set in video calibration. False to show at the bottom of video (default). {{note|Removed in Kodi v20.}}
      <usevc1codec>-1</usevc1codec>
|-
      <usevpxcodec>-1</usevpxcodec>
|
      <usemp4codec>-1</usemp4codec>
<syntaxhighlight lang=xml>
      <usempeg2codec>-1</usempeg2codec>
  <subtitleverticalmargin>120</subtitleverticalmargin>
      <useswrenderer>false</useswrenderer>
</syntaxhighlight>
    </mediacodec>
| Allows to customise the vertical margin of subtitles, which will be applied to each type of subtitle position in subtitle settings. {{note|Available in Kodi v20 and above.}}
    <disableswmultithreading>false</disableswmultithreading> <!-- Replaces disablehi10pmultithreading. Set this to true if you want software decoding to use only one CPU thread. -->
|-
    <dxvaallowhqscaling>false</dxvaallowhqscaling> <!-- enables high quality video upscaling for Windows -->
|
    <useffmpegvda>false</useffmpegvda> <!-- Experimental hardware video decoding mode for OS X. Option is available for development/testing purposes. -->
<syntaxhighlight lang=xml>
</video>
</video>
</syntaxhighlight>
</syntaxhighlight>
|
|}


=== audio ===
=== audio ===
{{anchor|.3Caudio.3E}}
{{anchor|.3Caudio.3E}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<audio>
<audio>
   <!-- Amount of headroom {{subst:Name}} should use above the maximum volume level, in decibels.  Defaults to 0, valid values 0, 6, 12. -->
   <!-- Amount of headroom Kodi should use above the maximum volume level, in decibels.  Defaults to 0, valid values 0, 6, 12. -->
   <headroom>0</headroom>
   <headroom>0</headroom>
   <!-- Default audio player: paplayer or dvdplayer -->
   <!-- Default audio player: paplayer or videoplayer -->
   <defaultplayer>paplayer</defaultplayer>
   <defaultplayer>paplayer</defaultplayer>
   <!-- Regular expressions that if evaluated to true won't be added to library. -->
   <!-- Regular expressions that if evaluated to true won't be added to library. -->
Line 278: Line 462:
   <!-- Amount of gain (dB) to be applied to AC3 streams that have been mixed-down to 2 channels. Default is 12.0. Valid values are: -96.0 to 96.0. -->
   <!-- Amount of gain (dB) to be applied to AC3 streams that have been mixed-down to 2 channels. Default is 12.0. Valid values are: -96.0 to 96.0. -->
   <ac3downmixgain>12.0</ac3downmixgain>
   <ac3downmixgain>12.0</ac3downmixgain>
  <!-- Whether to use time based or percentage based seeking. -->
  <usetimeseeking>true</usetimeseeking>
  <!-- Time to seek forward in seconds when doing a long seek.  Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. -->
  <timeseekforwardbig>600</timeseekfowardbig>
  <!-- Time to seek backward in seconds when doing a long seek back.  Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. -->
  <timeseekbackwardbig>-600</timeseekbackward>
   <!-- Minimum percentage that has to be played before it is considered for incrementing in the Top 100 database view, or for last.fm submittal -->
   <!-- Minimum percentage that has to be played before it is considered for incrementing in the Top 100 database view, or for last.fm submittal -->
   <playcountminimumpercent>99</playcountminimumpercent>  
   <playcountminimumpercent>99</playcountminimumpercent>  
   <!-- Whether to use DRC on AC3 and DTS streams -->
   <!-- Whether to use Dynamic Range Compression (DRC) on AC3 streams. 1.0 is "full" compression, as defined by the audio track's metadata, which is recommended for "basic" sound systems such as the internal speakers on a TV. 0.0 is no compression at all, which is recommended for people with nice multi-speaker sound systems. -1.0 (default) defaults to whatever ffmpeg uses, which is currently the same as 1.0. This has no effect if passthrough is enabled for AC3. -->
  <applydrc>true</applydrc>
   <applydrc>-1.0</applydrc>  
  <!-- set to true to skip decoding of DTS in wav files when using dvdplayer (10.10 only) -->
   <dvdplayerignoredtsinwav>false</dvdplayerignoredtsinwav>  
   <!-- default values for limiter/compressor -->
   <!-- default values for limiter/compressor -->
   <limiterhold>0.025</limiterhold>  
   <limiterhold>0.025</limiterhold>  
Line 291: Line 479:
</syntaxhighlight>
</syntaxhighlight>


For more information on the configuration of audio under Frodo see [[AudioEngine/HOW-TO: Configure audio]]


=== measurerefreshrate ===
=== forcedswaptime ===
{{anchor|.3Cmeasurerefreshrate.3E}}
{{anchor|.3Cforcedswaptime.3E}}
When using "Sync playback to display" on Windows, the detected refreshrate might be wrong.
Use to force a backbuffer->frontbuffer swap while vsync is enabled. Set to the time (in ms) to allow for the swap (e.g. <forcedswaptime>1</forcedswaptime> is typical).
When enabling measurerefreshrate, the refreshrate is measured instead, which makes it more accurate.
 
Default: Off


<syntaxhighlight lang="xml" enclose="div">
<measurerefreshrate>true</measurerefreshrate>
</syntaxhighlight>


=== edl ===
=== edl ===
{{anchor|.3Cedl.3E}}
{{anchor|.3Cedl.3E}}
{{main|EDL}}
{{main|Edit_decision_list}}
Commercial break detection not as good you think it could be? Are some commercial breaks in a series of adverts not being skipped? Are some parts being skipped that are clearly not commercials? Does the end of the previous recording still show? The following advanced settings can be used to better identify full commercial break sequences, remove incorrectly flagged commercial breaks, and have playback start at the actual beginning of the recording.
Commercial break detection not as good you think it could be? Are some commercial breaks in a series of adverts not being skipped? Are some parts being skipped that are clearly not commercials? Does the end of the previous recording still show? The following advanced settings can be used to better identify full commercial break sequences, remove incorrectly flagged commercial breaks, and have playback start at the actual beginning of the recording.


<syntaxhighlight lang="xml" enclose="div">
 
<syntaxhighlight lang=xml enclose="div">
<edl>
<edl>
   <!-- if true, commercial breaks will be merged according to the remaining options. -->
   <!-- if true, commercial breaks will be merged according to the remaining options. -->
Line 317: Line 503:
   <!-- Commercial breaks that are further apart than this won't be merged (seconds) -->
   <!-- Commercial breaks that are further apart than this won't be merged (seconds) -->
   <maxcommbreakgap>120</maxcommbreakgap>
   <maxcommbreakgap>120</maxcommbreakgap>
   <!-- How long to wait before automatically skipping when the start of a commercial break reached (seconds) -->
   <!-- How long to wait before automatically skipping when the start of a commercial break reached (seconds). Possible values: from -60 to 60-->
   <commbreakautowait>0</commbreakautowait>
   <commbreakautowait>0</commbreakautowait>
   <!-- How long to rewind after automatically skipping to the end of the commercial break (seconds) -->
   <!-- How long to rewind after automatically skipping to the end of the commercial break (seconds). Possible values: from -60 to 60 -->
   <commbreakautowind>0</commbreakautowind>
   <commbreakautowind>0</commbreakautowind>
</edl>
</edl>
</syntaxhighlight>
</syntaxhighlight>
== PVR & Live TV ==
{{anchor|.3Cpvr.3E}}
Settings available for PVR, EPG and Live TV. Edit Decision List settings are located in the previous section.


=== pvr ===
=== pvr ===
{{anchor|.3Cpvr.3E}}
<syntaxhighlight lang="xml" line='line'>
<syntaxhighlight lang="xml" enclose="div">
<pvr>
<pvr>
   <timecorrection>0</timecorrection>  <!-- Correct all times (epg tags, timer tags, recording tags) by this amount of minutes. -->
   <timecorrection>0</timecorrection>  <!-- Correct all times (epg tags, timer tags, recording tags) by this amount of minutes. -->
   <infotoggleinterval>3000</infotoggleinterval>  <!-- If there is more than one pvr gui info item available (e.g. multiple recordings active at the same time), use this toggle delay in milliseconds. -->
   <infotoggleinterval>3000</infotoggleinterval>  <!-- If there is more than one pvr gui info item available (e.g. multiple recordings active at the same time), use this toggle delay in milliseconds. -->
  <minvideocachelevel>5</minvideocachelevel> <!-- Cache up to this level in the video buffer buffer before resuming playback if the buffers run dry. -->
  <minaudiocachelevel>10</minaudiocachelevel> <!-- Cache up to this level in the audio buffer before resuming playback if the buffers run dry. -->
  <cacheindvdplayer>true</cacheindvdplayer> <!-- Cache PVR stream in DVDPlayer. -->
   <channeliconsautoscan>true</channeliconsautoscan> <!-- Automatically scan user defined folder for channel icons when loading internal channel groups. -->
   <channeliconsautoscan>true</channeliconsautoscan> <!-- Automatically scan user defined folder for channel icons when loading internal channel groups. -->
   <autoscaniconsuserset>false</autoscaniconsuserset> <!-- Mark channel icons populated by auto scan as "user set". -->
   <autoscaniconsuserset>false</autoscaniconsuserset> <!-- Mark channel icons populated by auto scan as "user set". -->
   <numericchannelswitchtimeout>1000</numericchannelswitchtimeout> <!-- Time in ms before the numeric dialog auto closes when confirmchannelswitch is disabled. -->
   <numericchannelswitchtimeout>1000</numericchannelswitchtimeout> <!-- Time in ms before the numeric dialog auto closes when confirmchannelswitch is disabled. -->
</pvr>
</syntaxhighlight>
==== pvrrecordings ====
In v19 and later, allows users to modify sort type and order of pvr recordings. <ref>https://github.com/xbmc/xbmc/pull/18605</ref>
;Note- These settings are child tags to the ''<pvr>'' tag in the previous section.
<syntaxhighlight lang="xml" line='line'>
<pvr>
  <pvrrecordings>
      <sortmethod>2</sortmethod>  <!-- 1=Name 2=Date 3=Size 4=File -->
      <sortorder>2</sortorder>    <!-- 1=Ascending 2=Descending -->
  </pvrrecordings>
</pvr>
</pvr>
</syntaxhighlight>
</syntaxhighlight>
Line 341: Line 545:
=== epg ===
=== epg ===
{{anchor|.3Cpvr.3E}}
{{anchor|.3Cpvr.3E}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang="xml" line='line'>
<epg>
<epg>
   <lingertime>1440</lingertime>  <!-- keep X minutes of past epg data (default: 24h) -->
   <updatecheckinterval>300</updatecheckinterval>  <!-- Check every X seconds, if EPG data need to be updated. This does not mean that every X seconds an EPG update is actually triggered, it's just the interval how often to check whether an update should be triggered. If this value is greater than GUI setting 'epg.epgupdate' value, then EPG updates will done with the value specified for 'updatecheckinterval', effectively overriding the GUI setting's value. -->
   <updatecheckinterval>300</updatecheckinterval>  <!-- check if tables need to be updated every X minutes -->
   <updateemptytagsinterval>60</updateemptytagsinterval>  <!-- If a TV channel has no EPG data, try to obtain data for that channel every X seconds. This overrides the GUI setting 'epg.epgupdate' value, but only for channels without EPG data. If this value is less than 'updatecheckinterval' value, then data update will be done with the interval specified by 'updatecheckinterval'. Example 1: epg.epgupdate = 120 (minutes!), updatecheckinterval = 300, updateemptytagsinterval = 60 => trigger an EPG update for every channel without EPG data every 5 minutes and trigger an EPG update for every channel with EPG data every 2 hours. Example 2: epg.epgupdate = 120 (minutes!), updatecheckinterval = 300, updateemptytagsinterval = 3600 => trigger an EPG update for every channel without EPG data every 2 hours and trigger an EPG update for every channel with EPG data every 1 hour. -->
   <lingercleanupintervaltime>900</cleanupinterval>  <!-- remove old entries from the EPG every X minutes -->
   <cleanupinterval>900</cleanupinterval>  <!-- remove old entries from the EPG every X seconds -->
   <activetagcheckinterval>60</activetagcheckinterval>  <!-- check for updated active tags every X minute -->
   <activetagcheckinterval>60</activetagcheckinterval>  <!-- check for updated active tags every X seconds -->
   <retryinterruptedupdateinterval>30</retryinterruptedupdateinterval>  <!-- retry an interrupted epg update after X seconds -->
   <retryinterruptedupdateinterval>60</retryinterruptedupdateinterval>  <!-- retry an interrupted EPG update after X seconds -->
  <updateemptytagsinterval>60</updateemptytagsinterval>  <!-- override user selectable EPG update interval (minutes) for empty EPG tags -->
   <displayupdatepopup>true</displayupdatepopup>  <!-- display a progress popup while updating EPG data from clients -->
   <displayupdatepopup>true</displayupdatepopup>  <!-- display a progress popup while updating EPG data from clients -->
   <displayincrementalupdatepopup>false</displayincrementalupdatepopup>  <!-- also display a progress popup while doing incremental EPG updates -->
   <displayincrementalupdatepopup>false</displayincrementalupdatepopup>  <!-- also display a progress popup while doing incremental EPG updates -->
Line 354: Line 557:
</syntaxhighlight>
</syntaxhighlight>


=== forcedswaptime ===
{{anchor|.3Cforcedswaptime.3E}}
Use to force a backbuffer->frontbuffer swap while vsync is enabled. Set to the time (in ms) to allow for the swap (e.g. <forcedswaptime>1</forcedswaptime> is typical). 


Default: Off


== Video library settings ==
== Video library settings ==
Line 368: Line 567:
Default extensions for VIDEOS:
Default extensions for VIDEOS:
<pre>
<pre>
.m4v .3gp .nsv .ts .ty .strm .rm .rmvb .m3u .ifo .mov .qt .divx .xvid .bivx .vob .nrg .img
.m4v .3g2 .3gp .nsv .tp .ts .ty .strm .pls .rm .rmvb .mpd .m3u .m3u8 .ifo .mov .qt .divx .xvid
.iso .pva .wmv .asf .asx .ogm .m2v .avi .bin .dat .dvr-ms .mpg .mpeg .mp4 .mkv .avc .vp3  
.bivx .vob .nrg .img .iso .udf .pva .wmv .asf .asx .ogm .m2v .avi .bin .dat .mpg .mpeg .mp4
.svq3 .nuv .viv .dv .fli .flv .rar .001 .wpl .zip
.mkv .mk3d .avc .vp3 .svq3 .nuv .viv .dv .fli .flv .001 .wpl .xspf .zip .vdr .dvr-ms .xsp .mts
.m2t .m2ts .evo .ogv .sdp .avs .rec .url .pxml .vc1 .h264 .rcv .rss .mpls .mpl .webm .bdmv
.bdm .wtv .trp .f4v
</pre>
</pre>
Examples:
Examples:
<syntaxhighlight lang="xml" enclose="div">
<pre>
<videoextensions>
<videoextensions>
   <add>.ex1|.ex2</add>
   <add>.ex1|.ex2</add>
   <remove>.ex3|.ex4</remove>
   <remove>.ex3|.ex4</remove>
</videoextensions>
</videoextensions>
</syntaxhighlight>
</pre>
<section end="videoextensions" />
<section end="videoextensions" />


=== discstubextensions ===
=== discstubextensions ===
{{anchor|.3Cdiscstubextensions.3E}}
{{main|Media stubs}}
A list of additional file-extensions that will (<tt><add></tt>) or will not (<tt><remove></tt>) be treated as disc stubs.


Default extensions for DISC STUBS:
<section begin="discstubextensions" />
<pre>
The default filename extension for Disc Stubs is:
<syntaxhighlight lang=xml enclose="div">
.disc
.disc
</pre>
</syntaxhighlight>
 
Using the following tags, it is possible to <tt><add></tt> additional or <tt><remove></tt> existing disc stub extensions to better suit your requirements.
Examples:
<syntaxhighlight lang=xml enclose="div">
<syntaxhighlight lang="xml" enclose="div">
<discstubextensions>
<discstubextensions>
   <add>.dvd|.blu</add>
   <add>.disk|.stub</add>
   <remove>.cd|.vhs</remove>
   <remove>.disc</remove>
</discstubextensions>
</discstubextensions>
</syntaxhighlight>
</syntaxhighlight>
<section end="discstubextensions" />


=== languagecodes ===
=== languagecodes ===
Line 402: Line 603:
Translation table for subtitle and audio names.  Contains entries of the form
Translation table for subtitle and audio names.  Contains entries of the form


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<languagecodes>
<languagecodes>
   <code>
   <code>
Line 411: Line 612:
</syntaxhighlight>
</syntaxhighlight>


=== sorttokens ===
{{anchor|.3Csorttokens.3E}}
Allows you to specify additional tokens that will be ignored at the start of lines during sorting.
<syntaxhighlight lang="xml" enclose="div">
<sorttokens>
  <token>the</token>
</sorttokens>
</syntaxhighlight>


=== moviestacking ===
=== moviestacking ===
{{anchor|.3Cmoviestacking.3E}}<section begin="moviestacking" />
{{anchor|.3Cmoviestacking.3E}}<section begin="moviestacking" />
This is used by the [[File Stacking]] algorithm to combine multi-part files and contains a list of "''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''"  
{{main|Naming_video_files/Movies}}
This is used by the [[Naming_video_files/Movies#Split_Video_Files|file stacking]] algorithm to combine multi-part files and contains a list of "''[[RegEx_tutorial|regular expressions]]''". For stacking videos that are contained in folders, such as VIDEO_TS folders, see '''[[advancedsettings.xml#folderstacking|<folderstacking>]]'''


As of {{kodi}} v9.11, video stacking regular expressions '''must''' contain exactly four (4) capture expressions. Old ones and three capture expressions are dropped (see [[Log file|log]]). More information on how the algorithm works is available [[File Stacking#How does it work.3F|here]].
As of v9.11, video stacking regular expressions '''must''' contain exactly four (4) capture expressions.  


Default:
Default:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<moviestacking>
<moviestacking>
   <!-- <cd/dvd/part/pt/disk/disc/d> <0-N> -->
   <!-- <cd/dvd/part/pt/disk/disc> <0-N> -->
   <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
   <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
   <!-- <cd/dvd/part/pt/disk/disc/d> <a-d> -->
   <!-- <cd/dvd/part/pt/disk/disc> <a-d> -->
   <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[a-d])(.*?)(\.[^.]+)$</regexp>
   <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[a-d])(.*?)(\.[^.]+)$</regexp>
   <!-- movienamea-xvid.avi, movienameb-xvid.avi -->
   <!-- movienamea-xvid.avi, movienameb-xvid.avi -->
   <regexp>(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$</regexp>
   <regexp>(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$</regexp>
Line 441: Line 635:


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<moviestacking action="append">
<moviestacking action="append">
     <!-- This expression will match movename1-xvid.avi, moviename2-xvid.avi.
     <!-- This expression will match movename1-xvid.avi, moviename2-xvid.avi.
Line 454: Line 648:


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<moviestacking action="prepend">
<moviestacking action="prepend">
   <regexp>(Title)(Volume)(Ignore)(Extension)</regexp>
   <regexp>(Title)(Volume)(Ignore)(Extension)</regexp>
Line 462: Line 656:
If no argument is supplied, or the argument <tt>append="no"</tt> is supplied, the default moviestacking regular expressions are overwritten by the user specified ones.
If no argument is supplied, or the argument <tt>append="no"</tt> is supplied, the default moviestacking regular expressions are overwritten by the user specified ones.
<section end="moviestacking" />
<section end="moviestacking" />
=== folderstacking ===
{{main|Naming_video_files/Movies}}
This is similar to '''[[advancedsettings.xml#moviestacking|<moviestacking>]]''', but is used for videos that are contained in folders that use the folder names to stack, such as VIDEO_TS folders (DVD rips that are not in ISO format).
Default:
<syntaxhighlight lang=xml enclose="div">
<folderstacking>
  <!-- <cd/dvd/disk/disc> <0-N> -->
  <regexp>((cd|dvd|dis[ck])[0-9]+)$</regexp>
</folderstacking>
</syntaxhighlight>


=== cleandatetime ===
=== cleandatetime ===
{{anchor|.3Ccleandatetime.3E}}
{{anchor|.3Ccleandatetime.3E}}
Matches a year number in a string using a ''[[Regular Expression (RegEx) Tutorial|Regular Expression]]''  
Matches a year number in a string using a ''[[RegEx_tutorial|Regular Expression]]''  


Default expression:
Default expression:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<video>
<video>
   <cleandatetime>(.+[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-1][0-9])([ _\,\.\(\)\[\]\-][^0-9]|$)</cleandatetime>
   <cleandatetime>(.*[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-9][0-9])([ _\,\.\(\)\[\]\-]|[^0-9]$)?</cleandatetime>
</video>
</video>
</syntaxhighlight>
</syntaxhighlight>
Line 478: Line 684:
=== cleanstrings ===
=== cleanstrings ===
{{anchor|.3Ccleanstrings.3E}}
{{anchor|.3Ccleanstrings.3E}}
Clean unwanted characters from filenames or folders by using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''. Please note that everything right of the match (at the end of the file name) is removed, so if you would have a file named ''Super movie.mp4'' and would add <tt><regexp> </regexp></tt> (only a space), the only thing that would be left is ''Super'', which is probably not what you want.
Clean unwanted characters from filenames or folders by using a list of ''[[RegEx_tutorial|Regular Expressions]]''. Please note that everything right of the match (at the end of the file name) is removed, so if you would have a file named ''Super movie.mp4'' and would add <tt><regexp> </regexp></tt> (only a space), the only thing that would be left is ''Super'', which is probably not what you want.


Default expressions:
Default expressions:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<video>
<video>
   <cleanstrings>
   <cleanstrings>
   <regexp>[ _\,\.\(\)\[\]\-](ac3|dts|custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|cd[1-9]|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|www.www|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
   <regexp>[ _\,\.\(\)\[\]\-](aka|ac3|dts|custom|dc|remastered|divx|divx5|dsr|dsrip|dutch|dvd|dvd5|dvd9|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|extended|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|3d|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
   <regexp>(\[.*\])</regexp>
   <regexp>(\[.*\])</regexp>
   </cleanstrings>
   </cleanstrings>
Line 494: Line 700:
=== tvshowmatching ===
=== tvshowmatching ===
{{anchor|.3Ctvshowmatching.3E}}
{{anchor|.3Ctvshowmatching.3E}}
Matches the season and episode numbers in file paths by using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''
Matches the season and episode numbers in file paths by using a list of ''[[RegEx_tutorial|Regular Expressions]]''


Defaults:
Defaults:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<tvshowmatching>
<tvshowmatching>
   <regexp>[Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+)([^\\/]*)$</regexp>  <!-- foo.s01.e01, foo.s01_e01, S01E02 foo, S01 - E02 -->
   <regexp>s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$</regexp>  <!-- foo.s01.e01, foo.s01_e01, S01E02 foo, S01 - E02, S01xE02 -->
   <regexp>[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$</regexp>  <!-- foo.ep01, foo.EP_01 -->
   <regexp>[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$</regexp>  <!-- foo.ep01, foo.EP_01 -->
   <regexp>([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})</regexp>  <!-- foo.yyyy.mm.dd.* (byDate=true) -->
   <regexp>([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})</regexp>  <!-- foo.yyyy.mm.dd.* (byDate=true) -->
Line 510: Line 716:


:* Arguments <tt>action="append"</tt> or <tt>action="prepend"</tt> will insert user specified expressions after, or before, the defaults above. (Further details in [[Advancedsettings.xml#.3Cmoviestacking.3E|moviestacking]] section)
:* Arguments <tt>action="append"</tt> or <tt>action="prepend"</tt> will insert user specified expressions after, or before, the defaults above. (Further details in [[Advancedsettings.xml#.3Cmoviestacking.3E|moviestacking]] section)
:* Expressions are converted to lower case before being evaluated. ''(XBMC v13.0 alpha4 and earlier only)''
:* Paths are converted to lower case before matching.
:* Paths are converted to lower case before matching.
:* Examples of matching regexps for certain filenames can be found on the [[TV Shows (Video Library)|TV shows]] page.
:* Examples of matching regexps for certain filenames can be found on the [[Naming_video_files/TV_shows|TV shows]] page.


:* For multi-episode matching to work, there needs to be a third set of parentheses '()' at the end, this part is fed back into the regexp engine.
:* For multi-episode matching to work, there needs to be a third set of parentheses '()' at the end, this part is fed back into the regexp engine.


:* A [http://forum.kodi.tv/showthread.php?t=51614 forum thread] has a discussion of pre-made regex lists to match common names. These might improve Kodi's ability to match TV show names in some situations, at the risk of additional false positives.
:* A [https://forum.kodi.tv/showthread.php?tid=51614 forum thread] has a discussion of pre-made regex lists to match common names. These might improve Kodi's ability to match TV show names in some situations, at the risk of additional false positives.


==== Filenames without Season ====
==== Filenames without Season ====
Line 524: Line 729:
; Simple Method ''(XBMC v9.11 onwards and Kodi)''
; Simple Method ''(XBMC v9.11 onwards and Kodi)''
: Use only one pair of parentheses
: Use only one pair of parentheses
<syntaxhighlight lang="xml" enclose="div"><regexp>[/\._ \-]([0-9]+)</regexp></syntaxhighlight>
<syntaxhighlight lang=xml enclose="div"><regexp>[/\._ \-]([0-9]+)</regexp></syntaxhighlight>
; Advanced Method ''(XBMC v10.05 onwards and Kodi)''
; Advanced Method ''(XBMC v10.05 onwards and Kodi)''
: Supports multi-episode files without season
: Supports multi-episode files without season
: Use an empty pair of parentheses for the season
: Use an empty pair of parentheses for the season
<syntaxhighlight lang="xml" enclose="div"><regexp>[/\._ \-]()([0-9]+)(-[0-9]+)?</regexp></syntaxhighlight>
<syntaxhighlight lang=xml enclose="div"><regexp>[/\._ \-]()([0-9]+)(-[0-9]+)?</regexp></syntaxhighlight>


; Specifying Default Season ''(XBMC v12.0 onwards and Kodi)''
; Specifying Default Season ''(XBMC v12.0 onwards and Kodi)''
Line 535: Line 740:
: If not used, the season will be set to '1'
: If not used, the season will be set to '1'
: Useful for setting specials to season '0'
: Useful for setting specials to season '0'
<syntaxhighlight lang="xml" enclose="div"><regexp defaultseason="0">[/\._ \-]X()([0-9]+)(-[0-9]+)?</regexp>
<syntaxhighlight lang=xml enclose="div"><regexp defaultseason="0">[/\._ \-]X()([0-9]+)(-[0-9]+)?</regexp>
<regexp defaultseason="1">[/\._ \-]E()([0-9]+)(-[0-9]+)?</regexp></syntaxhighlight>
<regexp defaultseason="1">[/\._ \-]E()([0-9]+)(-[0-9]+)?</regexp></syntaxhighlight>


=== tvmultipartmatching ===
=== tvmultipartmatching ===
{{anchor|.3Ctvmultipartmatching.3E}}
{{anchor|.3Ctvmultipartmatching.3E}}
Matches a multipart episode number based on a previously identified episode file, using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''.
Matches a multipart episode number based on a previously identified episode file, using a list of ''[[RegEx_tutorial|Regular Expressions]]''.


Default:
Default:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<tvmultipartmatching>^[-_ex]+([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)</tvmultipartmatching>
<tvmultipartmatching>^[-_ex]+([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)</tvmultipartmatching>
</syntaxhighlight>
</syntaxhighlight>
Line 551: Line 756:
=== excludefromscan ===
=== excludefromscan ===
{{anchor|.3Cexcludefromscan.3E}}
{{anchor|.3Cexcludefromscan.3E}}
Matches filenames or folders which should be excluded from a library scan (except tvshows) using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''. This can be for both Video or Audio sections of <tt>advancedsettings.xml</tt>.
Matches filenames or folders which should be excluded from a library scan (except tvshows) using a list of ''[[RegEx_tutorial|Regular Expressions]]''. This can be for both Video or Audio sections of <tt>advancedsettings.xml</tt>.


Defaults:
Defaults:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<video>
<video>
   <excludefromscan>
   <excludefromscan>
Line 567: Line 772:
=== excludefromlisting ===
=== excludefromlisting ===
{{anchor|.3Cexcludefromlisting.3E}}
{{anchor|.3Cexcludefromlisting.3E}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<video>   
<video>   
   <excludefromlisting> <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
   <excludefromlisting> <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
Line 577: Line 782:
=== excludetvshowsfromscan ===
=== excludetvshowsfromscan ===
{{anchor|.3Cexcludetvshowsfromscan.3E}}
{{anchor|.3Cexcludetvshowsfromscan.3E}}
Matches filenames or folders which should be excluded from a tvshow library scan using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''
Matches filenames or folders which should be excluded from a tvshow library scan using a list of ''[[RegEx_tutorial|Regular Expressions]]''


Defaults:
Defaults:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<video>
<video>
   <excludetvshowsfromscan>
   <excludetvshowsfromscan>
Line 592: Line 797:
=== trailermatching ===
=== trailermatching ===
{{anchor|.3Ctrailermatching.3E}}
{{anchor|.3Ctrailermatching.3E}}
Contains "''[[Regular Expression (RegEx) Tutorial|Regular Expression]]''" syntax (commonly referred to as "''[[Regular Expression (RegEx) Tutorial|RegEx]]''" or "''[[Regular Expression (RegEx) Tutorial|RegExp]]''") to match the locally stored trailers to movies in the library.
Contains "''[[RegEx_tutorial|Regular Expression]]''" syntax (commonly referred to as "''[[RegEx_tutorial|RegEx]]''" or "''[[RegEx_tutorial|RegExp]]''") to match the locally stored trailers to movies in the library.


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
   <trailermatching>
   <trailermatching>
     <!-- This regexp will match moviename_Trailer.avi -->
     <!-- This regexp will match moviename_Trailer.avi -->
Line 605: Line 810:
Options specific to the Video Library
Options specific to the Video Library


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang="xml" line='line'>
   <videolibrary>
   <videolibrary>
     <allitemsonbottom>false</allitemsonbottom>  <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
     <allitemsonbottom>false</allitemsonbottom>  <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
    <backgroundupdate>false</backgroundupdate> <!-- set to "true" to hide the video scanner dialog from the GUI -->
    <!-- NOTE: To get this working properly, you have to do a 'Clean Library' in settings the first time after you enable the setting. -->
     <cleanonupdate>false</cleanonupdate>  <!-- default set to false to prevent Kodi from removing items from the database while updating.  -->
     <cleanonupdate>false</cleanonupdate>  <!-- default set to false to prevent Kodi from removing items from the database while updating.  -->
     <usefasthash>true</usefasthash> <!-- defaults to true. Set to false in order to skip hashing based on the folders modification time. -->
     <usefasthash>true</usefasthash> <!-- defaults to true. Set to false in order to skip hashing based on the folders modification time. -->
    <hideallitems>false</hideallitems>  <!-- removes the "*All" items from the video library --> <!-- This will be replaced in v15 with a GUI option. -->
    <hideemptyseries>false</hideemptyseries>  <!-- set to "true" to hide empty series in the video library and prevent empty series from being removed during a library cleanup. -->
     <recentlyaddeditems>35</recentlyaddeditems> <!-- number of recently added items. Defaults to 25 -->
     <recentlyaddeditems>35</recentlyaddeditems> <!-- number of recently added items. Defaults to 25 -->
     <itemseparator> / </itemseparator>  <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* -->
     <itemseparator> / </itemseparator>  <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* -->
Line 619: Line 820:
     <importwatchedstate>false</importwatchedstate>  <!-- import previously exported playdate and playcount from .nfo files. Defaults to false -->
     <importwatchedstate>false</importwatchedstate>  <!-- import previously exported playdate and playcount from .nfo files. Defaults to false -->
     <importresumepoint>false</importresumepoint>  <!-- import previously exported resume point from .nfo files. Defaults to false -->
     <importresumepoint>false</importresumepoint>  <!-- import previously exported resume point from .nfo files. Defaults to false -->
    <mymovies>  <!-- Options specific to MyMovies XML file parsing -->
      <categoriestogenres>false</categoriestogenres>  <!-- Add MyMovies Custom Categories to Genres (boolean, default is false) -->
    </mymovies>
     <dateadded>1</dateadded> <!-- 0 results in using the current datetime when adding a video;
     <dateadded>1</dateadded> <!-- 0 results in using the current datetime when adding a video;
                                   1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid;
                                   1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid;
                                   2 results in using the newer datetime of the file's mtime and ctime -->
                                   2 results in using the newer datetime of the file's mtime and ctime -->
  </videolibrary>
</syntaxhighlight>
==== Extra artwork ====
Applies to Kodi v18 only.
Configuration to expand the artwork automatically added by Kodi to media items in the library, either from local files or online scrapers.
The original basic artwork types are still hardcoded so they don't need to be configured here (and can't be removed). "poster" and "fanart" for movies, movie sets, TV shows, seasons, and music videos; "banner" for TV shows and seasons; and "thumb" for episodes.
<syntaxhighlight lang=xml enclose="div">
  <videolibrary>
    <!-- ... combine with "videolibrary" settings above -->
    <!-- Additional artwork to add for TV shows -->
    <tvshowextraart>
      <arttype>characterart</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </tvshowextraart>
    <!-- Additional artwork to add for TV show seasons -->
    <tvseasonextraart>
      <arttype>landscape</arttype>
    </tvseasonextraart>
    <!-- Additional artwork to add for TV show episodes -->
    <episodeextraart>
      <arttype>fanart</arttype>
    </episodeextraart>
    <!-- Additional artwork to add for movies -->
    <movieextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </movieextraart>
    <!-- Additional artwork to add for movie sets / collections -->
    <moviesetextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </moviesetextraart>
    <!-- Additional artwork to add for musicvideos -->
    <musicvideoextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
    </musicvideoextraart>
   </videolibrary>
   </videolibrary>
</syntaxhighlight>
</syntaxhighlight>
Line 631: Line 885:
{{anchor|.3Cvideoscanner.3E}}
{{anchor|.3Cvideoscanner.3E}}
Options specific to the Video scanner
Options specific to the Video scanner
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
   <videoscanner>
   <videoscanner>
     <ignoreerrors>true</ignoreerrors> <!-- Set to true to silently ignore errors while scanning videos. This prevents the error dialogue box, so you don't have to keep hitting "yes" to keep scanning.-->
     <ignoreerrors>true</ignoreerrors> <!-- Set to true to silently ignore errors while scanning videos. This prevents the error dialogue box, so you don't have to keep hitting "yes" to keep scanning.-->
Line 637: Line 891:
</syntaxhighlight>
</syntaxhighlight>


=== myth ===
== Library artwork ==
{{anchor|.3Cmyth.3E}}
Not seeing all the recordings you expected in the Movies folder? If so, it's very likely that the electronic program guide (EPG) used by MythTV doesn't accurately distinguish between TV Shows and Movies all the time. The following setting allows the length of the recording to also be used to determine if a recording is a Movie.


<syntaxhighlight lang="xml" enclose="div">
{{note|Using <imageres>9999</imageres> and <fanartres>9999</fanartres> will allow caching artwork at original size.}}
<myth>
  <!-- Recordings longer than this will be added to the Movies folder (minutes). 0 = off -->
  <movielength>0</movielength>
</myth>
</syntaxhighlight>
 
== Library artwork ==


=== imageres ===
=== imageres ===
{{anchor|.3Cimageres.3E}}
{{anchor|.3Cimageres.3E}}
This tag is new for v12 (Frodo), replacing <thumbsize>.


<section begin="imageres description" />Specify the maximal resolution that art should be resized to in pixels. The width is automatically calculated as being 16/9*height.  The image will be resized to fit within this size. e.g. an image that is 2000x500 will be cached at size 1280x320. An image that is 500x800 will be cached at size 450x720 using the default value of 720.<section end="imageres description" />
<section begin="imageres description" />Specify the maximum resolution that [[Artwork/Cache#Texture optimization| cached artwork]] (other than fanart / 16:9 images) should be resized to in pixels. The width is automatically calculated as being 16/9*height.  The image will be resized to fit within this size. e.g. an image that is 2000x500 will be cached at size 1280x320. An image that is 500x800 will be cached at size 450x720 using the default value of 720.<section end="imageres description" />


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<imageres>720</imageres>
<imageres>720</imageres>
</syntaxhighlight>
</syntaxhighlight>
Line 662: Line 906:
=== fanartres ===
=== fanartres ===
{{anchor|.3Cfanartres.3E}}
{{anchor|.3Cfanartres.3E}}
This tag is new for v12 (Frodo), replacing <fanartheight>.


<section begin="fanartres description" />Specify the resolution that cached fanart should be resized to in pixels. The width is automatically calculated as being 16/9*height. Only images that are exactly 16x9 and equal to or greater than this resolution will be cached at this size - all other images will be cached using <imageres>. The default value is 1080.<section end="fanartres description" />
<section begin="fanartres description" />Specify the maximum resolution that [[Artwork/Cache#Texture optimization| cached fanart]] should be resized to in pixels. The width is automatically calculated as being 16/9*height. Only images that are exactly 16x9 and equal to or greater than this resolution will be cached at this size - all other images will be cached using <imageres>. The default value is 1080.<section end="fanartres description" />


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<fanartres>1080</fanartres>
<fanartres>1080</fanartres>
</syntaxhighlight>
</syntaxhighlight>


=== fanart ===
=== imagescalingalgorithm ===
{{anchor|.3Cfanart.3E}}
Specify the image scaling algorithm for image resizing when [[Artwork/Cache#Texture optimization| caching artwork]] to the local texture cache.
As of v12 (Frodo), this tag is only used for music and not video.
<br />
 
<syntaxhighlight lang=xml enclose="div">
A list of additional files to try when searching for fanart images.  (The defaults are fanart.jpg and fanart.png which can be removed.)
<imagescalingalgorithm>bicubic</imagescalingalgorithm>
 
Example:
<syntaxhighlight lang="xml" enclose="div">
<fanart>
  <remove>fanart.jpg</remove>
  <add>backdrop.jpg</add>
</fanart>
</syntaxhighlight>
 
=== musicthumbs ===
{{anchor|.3Cmusicthumbs.3E}}
A list of additional files to try when searching for music thumbnail images.  (The default is folder.jpg which can be removed.)
 
Example:
<syntaxhighlight lang="xml" enclose="div">
<musicthumbs>
  <remove>folder.jpg</remove>
  <add>thumb.jpg|cover.jpg</add>
</musicthumbs>
</syntaxhighlight>
</syntaxhighlight>


=== useddsfanart ===
[https://github.com/xbmc/xbmc/blob/1a8753d5cd93890dc6a9f9d4b2ce8848066ea5d0/xbmc/pictures/PictureScalingAlgorithm.cpp#L32-L43 Available image scaling algorithms]
{{anchor|.3Cuseddsfanart.3E}}
This settings allows {{kodi}} to use your GPU rendering fanart and some other images. This will make loading images considerably faster, especially on systems with slower processors (e.g. atom based systems). Do not use this option on ARM based systems (Apple TV2/iOS/RPi/many Android systems) as it is likely to degrade performance because DDS images are not supported.


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=text enclose="div">
<useddsfanart>true</useddsfanart>
fast_bilinear
bilinear
bicubic
experimental
nearest_neighbor
averaging_area
bicublin
gaussian
sinc
lanczos
bicubic_spline
</syntaxhighlight>
</syntaxhighlight>


Line 715: Line 947:


;Example
;Example
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<playlistasfolders>true</playlistasfolders>
<playlistasfolders>true</playlistasfolders>
</syntaxhighlight>
</syntaxhighlight>
Line 724: Line 956:


Default:
Default:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
   <playlistretries>100</playlistretries>
   <playlistretries>100</playlistretries>
</syntaxhighlight>
</syntaxhighlight>
Line 733: Line 965:


Default:
Default:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<playlisttimeout>20</playlisttimeout>  
<playlisttimeout>20</playlisttimeout>  
</syntaxhighlight>
</syntaxhighlight>
=== sorttokens ===
Allows you to specify additional tokens that will be ignored at the start of lines during sorting.
{{note|Sort tokens are case sensitive.}}
<syntaxhighlight lang=xml enclose="div">
<sorttokens>
  <token>the</token>
</sorttokens>
</syntaxhighlight>
In the above example "the ", "the." and "the_" will be ignored at the start of titles or names when sorting items, in both video and music libraries. A separator can also be specified, for example
<syntaxhighlight lang=xml enclose="div">
<sorttokens>
    <token separators="'">L</token>
</sorttokens>
</syntaxhighlight>
In that case the value L', as in French movie name ''L'argent'', will be ignored and the item listed under "A".


=== musicdatabase/videodatabase ===
=== musicdatabase/videodatabase ===
{{anchor|.3Cmusicdatabase.3E/.3Cvideodatabase.3E}}
{{anchor|.3Cmusicdatabase.3E/.3Cvideodatabase.3E|musicdatabase/videodatabase|database tags music/video/tv/epg/adsp}}
{{main|MySQL}}
{{main|MySQL}}
<section begin="videodatabase" />
<section begin="videodatabase" />
Allows advanced customization of the default database settings for both music and video.
Allows advanced customization of the default database settings for music, video, TV, EPG, and ADSP databases.
 
:{{note| '''It is HIGHLY recommended that you not attempt to place an sqlite3 database outside of kodi's path.  sqlite3 contains no filesystem abstraction, so this will plain break on any non-local (as far as Kodi is concerned) paths.  Use this for mysql only.'''}}
 
 
'''Parent tags:'''
 
 
* '''<videodatabase>'''
* '''<musicdatabase>'''
* '''<tvdatabase>''' - Highly experimental/unstable and no practical benefit for most users. '''Avoid using.'''
* '''<epgdatabase>''' - Highly experimental/unstable and no practical benefit for most users. '''Avoid using.'''
* '''<adspdatabase>''' - Highly experimental/unstable and no practical benefit for most users. '''Avoid using.'''
{{MySQL warning}}
 
 
'''Child tags: '''
 
 
;<type>
: ''Required'' - Can be either "sqlite3" or "mysql" (default: sqlite3)


:{{note| '''It is HIGHLY recommended that you not attempt to place an sqlite3 database outside of {{kodi}}'s path.  sqlite3 contains no filesystem abstraction, so this will plain break on any non-local (as far as {{kodi}} is concerned) paths.  Use this for mysql only.'''}}
'''type'''


Can be either "sqlite3" or "mysql" (default: sqlite3)
;<host>
:''Required'' -
* sqlite3: defines the relative path to the database file (eg. /usr/local/kodi/databases).
* mysql: defines the host of the mysql socket (eg. localhost, 192.168.0.1, etc)


'''host'''


sqlite3: defines the relative path to the database file (eg. /usr/local/kodi/databases).
;<port>
: ''Optional'' -
* sqlite3: silently ignored
* mysql: defines the port of the mysql socket (default: 3306)


mysql: defines the host of the mysql socket (eg. localhost, 192.168.0.1, etc)


'''port'''
;<name>
: ''Optional'' -
:by default "MyVideos"+DB number will be used.
* sqlite3: defines the name of the database file to read from, excluding the ".db" extension.
* mysql: defines the name of the database to use


sqlite3: silently ignored


mysql: defines the port of the mysql socket (default: 3306)
;<user>
: ''Required for MySQL'' -
* sqlite3: silently ignored
* mysql: defines the user with privileged access to the database


'''name'''
:''Not needed by default, and some users report issues when defining the this tag. When not used "MyVideos"+DB number will be used.
sqlite3: defines the name of the database file to read from, excluding the ".db" extension.


mysql: defines the name of the database to use
;<pass>
: ''Required for MySQL'' -
* sqlite3: silently ignored
* mysql: defines the password for the user with privileged access to the database


'''user'''


sqlite3: silently ignored
;<compression>
: ''Optional'' - Defaults to false. Set to "true" to enable MySQL compression protocol. Performance benefit is going to be largely dependent on the network bandwidth, latency between database and clients and on the size of the result sets. [https://github.com/xbmc/xbmc/pull/6484]
: {{Note|Slower clients (such as the RPi and others) won't benefit from it as the zlib de-compression overhead is higher than the actual compression savings}}


mysql: defines the user with privileged access to the database


'''pass'''


sqlite3: silently ignored
;<key>
: ''Optional'' - SSL setting for MySQL [https://github.com/xbmc/xbmc/pull/2566]


mysql: defines the password for the user with privileged access to the database
;<cert>
: ''Optional'' - SSL setting for MySQL [https://github.com/xbmc/xbmc/pull/2566]
 
;<ca>
: ''Optional'' - SSL setting for MySQL [https://github.com/xbmc/xbmc/pull/2566]
 
;<capath>
: ''Optional'' - SSL setting for MySQL [https://github.com/xbmc/xbmc/pull/2566]
 
;<ciphers>
: ''Optional'' - SSL setting for MySQL [https://github.com/xbmc/xbmc/pull/2566]




Line 782: Line 1,071:


1) Configure a database for MySQL.
1) Configure a database for MySQL.
:{{note| ''The videodatabase and musicdatabase tags are interchangeable here.''}}
:{{note| ''The '''<videodatabase>''', '''<musicdatabase>''', '''<tvdatabase>''', '''<epgdatabase>''', and '''<adspdatabase>''' tags are interchangeable here.''}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<videodatabase>
<videodatabase>
   <type>mysql</type>
   <type>mysql</type>
Line 794: Line 1,083:


2) Configure a database for an sqlite database.
2) Configure a database for an sqlite database.
:{{note|''The videodatabase and musicdatabase tags are interchangeable here.''}}
:{{note| ''The '''<videodatabase>''', '''<musicdatabase>''', '''<tvdatabase>''', '''<epgdatabase>''', and '''<adspdatabase>''' tags are interchangeable here.''}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<musicdatabase>
<musicdatabase>
   <type>sqlite3</type>
   <type>sqlite3</type>
   <host>/usr/local/share/kodi/databases</host>
   <host>/usr/local/share/kodi/databases</host>
  <name>kodi_music</name>
</musicdatabase>
</musicdatabase>
</syntaxhighlight>
</syntaxhighlight>


{{note| ''If you use MySQL for the music database, but are finding that it slows down your music library significantly, execute the following query to create an index on the song table.  This will significantly speed up queries using the songview views looking up by artist:'' }}
<syntaxhighlight lang="sql" enclose="div">
CREATE INDEX ixSongArtist
    ON song(idArtist, idAlbum)
</syntaxhighlight>
<section end="videodatabase" />
<section end="videodatabase" />


Line 821: Line 1,101:
=== musicextensions ===
=== musicextensions ===
{{anchor|.3Cmusicextensions.3E}}
{{anchor|.3Cmusicextensions.3E}}
A list of additional file-extensions to allow ('''add''') or exclude ('''remove''') in the My Music windows.
<section begin="musicextensions" />
 
Default extensions for MUSIC:
Default extensions for MUSIC:
<pre>
<pre>
.nsv .m4a .flac .aac .strm .pls .rm .mpa .wav .wma .ogg .mp3 .mp2 .m3u .mod .amf .669 .dmf .dsm .far .gdm  
.nsv .m4a .flac .aac .strm .pls .rm .rma .mpa .wav .wma .ogg .mp3 .mp2 .m3u .gdm .imf .m15 .sfx
.imf .it .m15 .med .okt .s3m .stm .sfx .ult .uni .xm .sid .ac3 .dts .cue .aif .aiff .wpl .ape .mac .mpc  
.uni .ac3 .dts .cue .aif .aiff .wpl .xspf .ape .mac .mpc .mp+ .mpp .shn .zip .wv .dsp .xsp .xwav
.mp+ .mpp .shn .zip .rar .wv .nsf .spc .gym .adplug .adx .dsp .adp .ymf .ast .afc .hps .xsp
.waa .wvs .wam .gcm .idsp .mpdsp .mss .spt .rsd .sap .cmc .cmr .dmc .mpt .mpd .rmt .tmc .tm8
.tm2 .oga .url .pxml .tta .rss .wtv .mka .tak .opus .dff .dsf .m4b .dtshd
</pre>
</pre>


Examples:
It is possible to add or remove extensions for Music, using the following XML tags. Useful if you keep, say, FLAC and mp3 versions of music in the same folder. The <remove> tag can be used to remove mp3 from being listed in the library, leaving only the higher quality FLAC being displayed.
<syntaxhighlight lang="xml" enclose="div">
 
<musicextensions>
<musicextensions>
  <add>.ex1|.ex2</add>
  <add>.ex1|.ex2</add>
  <remove>.ex3|.ex4</remove>
  <remove>.ex3|.ex4</remove>
</musicextensions>
</musicextensions>
</syntaxhighlight>
 
<section end="musicextensions" />


=== cddbaddress ===
=== cddbaddress ===
Line 843: Line 1,124:


Default:  
Default:  
<syntaxhighlight lang="XML" enclose="div>
<syntaxhighlight lang=xml enclose="div>
<cddbaddress>freedb.freedb.org</cddbaddress>
<cddbaddress>freedb.freedb.org</cddbaddress>
</syntaxhighlight>
</syntaxhighlight>
Line 852: Line 1,133:


Default:
Default:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<songinfoduration>10</songinfoduration>
<songinfoduration>10</songinfoduration>
</syntaxhighlight>
</syntaxhighlight>
Line 873: Line 1,154:


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<musicfilenamefilters>
<musicfilenamefilters>
   <filter>%A - %T</filter>
   <filter>%A - %T</filter>
Line 880: Line 1,161:


=== musiclibrary ===
=== musiclibrary ===
{{anchor|.3Cmusiclibrary.3E}}
Options specific to the Music Library
Options specific to the Music Library
 
<section begin="MusicLibrary" />
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang="xml" line='line'>
  <musiclibrary>
<musiclibrary>
    <hideallitems>true</hideallitems> <!-- removes the "*All" items from the music library --> <!-- This will be replaced in v15 with a GUI option. -->
     <allitemsonbottom>true</allitemsonbottom>       <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
     <allitemsonbottom>true</allitemsonbottom> <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
     <cleanonupdate>false</cleanonupdate>           <!-- default set to false to prevent Kodi from removing items from the database while updating.  -->
     <backgroundupdate>true</backgroundupdate> <!-- set to hide the music scanner dialog from the gui -->
     <recentlyaddeditems>35</recentlyaddeditems>     <!-- number of recently added items. Defaults to 25 -->
     <recentlyaddeditems>35</recentlyaddeditems> <!-- number of recently added items. Defaults to 25 -->
     <albumformat>%B - %Y</albumformat>             <!-- album label template, default is "%B" -->
    <albumssortbyartistthenyear>true</albumssortbyartistthenyear>    <!-- at an albums listing, when you sort by artist, secondary sort will be year. -->
     <prioritiseapetags>true</prioritiseapetags>     <!-- prioritise APEv2 tags over ID3v1/2 tags, default is false. -->
     <albumformat>%B - %Y</albumformat> <!-- album label template, default is "%B" -->
     <itemseparator> / </itemseparator>             <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* See Note below-->
    <albumformatright>%A</albumformatright>  <!-- album label template for right column, default is "%A" -->
    <artistseparators>                             <!-- separator used for multiple artists. Note that spaces are used for some separators. See Note below-->
     <prioritiseapetags>true</prioritiseapetags> <!-- prioritise APEv2 tags over ID3v1/2 tags, default is false. -->
        <separator>;</separator>
     <itemseparator> / </itemseparator>   <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* -->
        <separator>:</separator>
  </musiclibrary>
        <separator>|</separator>
</syntaxhighlight>
        <separator> feat. </separator>
 
        <separator> ft. </separator>
=== karaoke ===
    </artistseparators>
{{anchor|.3Ckaraoke.3E}}
     <dateadded>1</dateadded>                       <!--0 results in using the current datetime when adding a song;
{{Main|Karaoke}}<section begin="karaoke" />
                                                        1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid;
<syntaxhighlight lang="xml" enclose="div">
                                                        2 results in using the newer datetime of the file's mtime and ctime  -->
<karaoke>
   
  <!-- Music-lyrics delay for CDG format lyrics in SECONDS. Floating number, may be negative. -->
    <!-- New for v19 and later releases -->
  <syncdelaycdg>0.0</syncdelaycdg>
    <useisodates>false</useisodates>               <!-- When "true" all dates displayed in the music library will be in ISO 8601 format (YYYY-MM-DD or part thereof).
  <!-- Music-lyrics delay for LRC format lyrics in 1/10 seconds. Floating number, may be negative. -->
                                                        Defaults to "false" (use localized dates) -->
  <syncdelaylrc>0.0</syncdelaylrc>
</musiclibrary>
  <!-- If set to true, when the songs are added to the library, {{subst:Name}} will automatically replace the song genre by "Karaoke"
    if the song has associated lyrics. Default is false. -->
  <alwaysreplacegenre>false</alwaysreplacegenre>
  <!-- If set to true, when the music-lyrics delay was modified while playing using subtitle delay buttons, the delay value
     for this song will be stored, and restored when the song is played next time. Default is true. -->
  <storedelay>true</storedelay>
  <!-- When karaoke songs are added to the library during scans, an autoincrement number is automatically assigned
to each song, starting from the value specified below. Default starts from 1. -->
  <autoassignstartfrom>1</autoassignstartfrom>
  <!-- If set to true (default), the background for CDG songs is always empty (plain color) no matter what setting is set in  
    defaultbackground below. When setting this to false, then one can see through the background and see the video or
    visualization.-->
  <nocdgbackground>true</nocdgbackground>
  <!-- Sets default background mode. Type could be "none", "vis" for visualisation, "image" or "video".
    For image/video types the "path" parameter should specify the image or video file to play. -->
  <defaultbackground type="video" path="special://masterprofile/karaokevideobg.avi"/>
  <!-- If non-zero, specifies the time in seconds left before the end of the current song when a window will pop up informing you
    about the next played song. The window does not pop up if there is no next song, or it is not a karaoke song -->
  <nextsongpopuptime>0.0</nextsongpopuptime>
</karaoke>
</syntaxhighlight>
</syntaxhighlight>
<section end="karaoke" />
{{Note|Changing the <itemseparator> or <artistseparators> will only affect newly added items. A rescan won't change the existing ones. Remove the Source(s) or delete the Music DB and rebuild. This process should be made easier from v18 and up using <promptfulltagscan>}}<section end="MusicLibrary" />


== Photos settings ==
== Photos settings ==
Line 937: Line 1,197:
Default extensions for PICTURES:
Default extensions for PICTURES:
<pre>
<pre>
.png .jpg .jpeg .bmp .gif .ico .tif .tiff .tga .pcx .cbz .zip .cbr .rar .m3u
.png .jpg .jpeg .bmp .gif .ico .tif .tiff .tga .pcx .cbz .zip .rss .webp .jp2 .apng
</pre>
</pre>


Examples:
Examples:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<pictureextensions>
<pictureextensions>
   <add>.ex1|.ex2</add>
   <add>.ex1|.ex2</add>
Line 950: Line 1,210:
=== pictureexcludes ===
=== pictureexcludes ===
{{anchor|.3Cpictureexcludes.3E}}
{{anchor|.3Cpictureexcludes.3E}}
Matches filenames or folders which should be excluded from being displayed in My Pictures using a list of ''[[Regular Expression (RegEx) Tutorial|Regular Expressions]]''
Matches filenames or folders which should be excluded from being displayed in My Pictures using a list of ''[[RegEx_tutorial|Regular Expressions]]''


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<pictureexcludes>  <!-- Regular expressions that if evaluated to true won't be displayed in My Pictures -->
<pictureexcludes>  <!-- Regular expressions that if evaluated to true won't be displayed in My Pictures -->
   <regexp>small</regexp>
   <regexp>small</regexp>
Line 961: Line 1,221:
=== slideshow ===
=== slideshow ===
{{anchor|.3Cslideshow.3E}}
{{anchor|.3Cslideshow.3E}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<slideshow>
<slideshow>
   <!-- Amount to pan images as a percentage of the screen -->
   <!-- Amount to pan images as a percentage of the screen -->
Line 975: Line 1,235:


== Network settings ==
== Network settings ==
=== ftp ===
{{anchor|.3Cftp.3DE}}
Specific settings if a ftp server is in use as a source
<syntaxhighlight lang=xml enclose="div">
<ftp>
  <remotethumbs>true</remotethumbs> <!-- enable extraction of flag and thumb for ftp -->
</ftp>
</syntaxhighlight>


=== samba ===
=== samba ===
{{anchor|.3Csamba.3E}}
{{anchor|.3Csamba.3E}}
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<samba>
<samba>
   <doscodepage></doscodepage>  <!-- code page to use for filenames -->
   <doscodepage></doscodepage>  <!-- code page to use for filenames -->
Line 989: Line 1,259:
{{anchor|.3Cfhosts.3E}}
{{anchor|.3Cfhosts.3E}}
Static dns entries which take precedence over your dns server.
Static dns entries which take precedence over your dns server.
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<hosts>
<hosts>
   <entry name="HOSTNAME">IPADDRESS</entry>
   <entry name="HOSTNAME">IPADDRESS</entry>
Line 997: Line 1,267:
=== network ===
=== network ===
{{anchor|.3Cnetwork.3E}}
{{anchor|.3Cnetwork.3E}}
{{see also|HOW-TO:Modify the cache}}
 
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml line='line'>
<network>
<network>
   <curlclienttimeout>10</curlclienttimeout>  <!-- Timeout in seconds for libcurl (http/ftp) connections -->
   <curlclienttimeout>10</curlclienttimeout>  <!-- Timeout in seconds for libcurl (http/ftp) connections -->
   <curllowspeedtime>5</curllowspeedtime> <!-- Time in seconds for libcurl to consider a connection lowspeed -->
   <curllowspeedtime>20</curllowspeedtime>   <!-- Time in seconds for libcurl to consider a connection lowspeed -->
   <httpproxyusername></httpproxyusername> <!-- username for Basic Proxy Authentication -->
  <curlretries>2</curlretries>              <!-- Amount of retries for certain failed libcurl operations (e.g. timeout) -->
   <httpproxypassword></httpproxypassword> <!-- password for Basic Proxy Authentication -->
   <httpproxyusername></httpproxyusername>   <!-- username for Basic Proxy Authentication -->
   <cachemembuffersize>20971520</cachemembuffersize> <!-- number of bytes used for buffering streams ahead in memory
   <httpproxypassword></httpproxypassword>   <!-- password for Basic Proxy Authentication -->
    {{subst:Name}} will not buffer ahead more than this. WARNING: for the bytes set here, {{subst:Name}} will consume 3x the amount of RAM
   <disableipv6>false</disableipv6>           <!-- Certain hardware/OS combinations have trouble with ipv6. Set "true" to disable -->
    When set to 0 the cache will be written to disk instead of RAM, as of v12 Frodo -->
   <disablehttp2>false</disablehttp2>         <!-- Added in v19- Allows disabling HTTP2 for broken Curl / HTTP2 servers -->
   <buffermode>0</buffermode> <!-- Choose what to buffer:
  <nfstimeout>30</nfstimeout>                <!-- Added in v19- Timeout in seconds for NFS access, 0 = wait forever (previous behaviour) default is 5s  -->
    0) Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
   <catrustfile>filepath</catrustfile>       <!-- Added in v19- Allows specifying a custom SSL CA trust store bundle. e.g. special://masterprofile/cacerts.pem -->
    1) Buffer all filesystems (including local)
  <curlkeepaliveinterval>30</curlkeepaliveinterval>    <!-- Added in v19- Enable TCP keepalive probes in curl -->  
    2) Only buffer true internet filesystems (streams) (http, etc.)
    3) No buffer -->
   <readbufferfactor>1.0</readbufferfactor> <!-- this factor determines the max readrate in terms of readbufferfactor * avg bitrate of a video file.  
This can help on bad connections to keep the cache filled. It will also greatly speed up buffering. Default value 1.0. -->
</network>
</network>
</syntaxhighlight>
</syntaxhighlight>


=== tuxbox ===
{{Note|In Kodi v17, the three buffer settings are removed from the <code><network></code> tag and now placed under the new <code><cache></code> tag. See '''[[#cache]]''' for full details.}}
{{anchor|.3Ctuxbox.3E}}
<syntaxhighlight lang="xml" enclose="div">
<tuxbox>
    <!-- "audiochannelselection"; default is 'false', 'true' will popup the audio channel selection if
          there is more then one audio stream !-->
    <audiochannelselection>false</audiochannelselection>
    <!-- "submenuselection"; default is 'false', 'true' will popup the Submenu selection !-->
    <submenuselection>false</submenuselection>
    <!-- "defaultrootmenu"; MODE: 0 = TV (Default), 1 = Radio, 2 = Data, 3 = Movies, 4 = Root !-->
    <defaultrootmenu>0</defaultrootmenu>
    <!-- "defaultsubmenu"; 1=Services  2=Satellites 3=Providers 4=Bouquets (default) !-->
    <defaultsubmenu>4</defaultsubmenu>
    <!-- "pictureicon"; default is 'true', will use the Picture Icons from folder /UserData/PictureIcon/ !-->
    <pictureicon>true</pictureicon>
    <!-- "epgrequesttime"; default is '10', 0-3600, defines the time in seconds between epg queries, some tuxbox
          devices need longer to response (Minimum: 1, Maximum: 3600) !-->
    <epgrequesttime>10</epgrequesttime>
    <!-- "zapwaittime"; default is '0' (0 = OFF), defines the time in seconds to wait for a valid PMT after the
          zaping was send (Minimum: 0, Maximum: 120) !-->
    <zapwaittime>0</zapwaittime> 
</tuxbox>
</syntaxhighlight>


=== enableairtunesdebuglog ===
<curlkeepaliveinterval><ref>https://github.com/xbmc/xbmc/pull/19319</ref>
{{helix box|This option will be replaced by a GUI option in v14:
{{anchor|.3Cenableairtunesdebuglog.3E}}<section begin="enableairtunesdebuglog" />
This enables the debug output of libshairport which is used for the AirTunes feature. Defaults to off - because its spamming badly.


Example:
=== cache ===
<syntaxhighlight lang="xml" enclose="div">
{{see also|HOW-TO:Modify_the_video_cache}}
<enableairtunesdebuglog>1</enableairtunesdebuglog>)
<syntaxhighlight lang=xml enclose="div">
<cache>
  <memorysize>0</memorysize>  <!-- Number of bytes used for buffering streams in memory when set to 0 the cache will be written to disk instead of RAM -->
  <buffermode>0</buffermode>   <!-- Choose what to buffer:
                                    0) Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.)
                                    1) Buffer all filesystems (including local) (default since Kodi 19)
                                    2) Only buffer true internet filesystems (streams) (http, https, etc.)
                                    3) No buffer
                                    4) Buffer all network filesystems (incl. smb, nfs, etc.) -->
  <readfactor>4.0</readfactor> <!-- This factor determines the max readrate in terms of readfactor * avg bitrate of a video file.
                                    This can help on bad connections to keep the cache filled. It will also greatly speed up buffering. Default value 4.0. -->
</cache>
</syntaxhighlight>
</syntaxhighlight>
<section end="enableairtunesdebuglog" />
}}


=== airtunesport ===
=== airtunesport ===
Line 1,075: Line 1,325:
  | platform = all
  | platform = all
  | XBMC version = 12
  | XBMC version = 12
  | description = The amount (in megabytes) of add-on zip packages saved from previous add-on installs. These packages are mainly used for the [[add-on]] rollback feature. Increasing the size should increase the amount of past versions saved.
  | description = The amount (in megabytes) of add-on zip packages saved from previous add-on installs. These packages are mainly used for the [[Add-ons|add-on]] rollback feature. Increasing the size should increase the amount of past versions saved. Defaults to 200 MB.
  | example = Example: <syntaxhighlight lang="xml" enclose="div"><packagefoldersize>200</packagefoldersize> <!-- this example would keep up to 200MB of add-on packages. --></syntaxhighlight>
  | example = Example: <syntaxhighlight lang=xml enclose="div"><packagefoldersize>200</packagefoldersize> <!-- this example would keep up to 200MB of add-on packages. --></syntaxhighlight>
}}
}}
<section end="packagefoldersize" />
<section end="packagefoldersize" />
=== detectasudf ===
=== detectasudf ===
{{anchor|.3Cdetectasudf.3E}}
{{anchor|.3Cdetectasudf.3E}}
Line 1,087: Line 1,338:
=== pathsubstitution ===
=== pathsubstitution ===
{{anchor|.3Cpathsubstitution.3E}}
{{anchor|.3Cpathsubstitution.3E}}
'''[[Path substitution]]s''' are for use for redirecting file paths.  These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for {{kodi}} to handle.   
{{main|Path substitution}}
 
{{divbox|red||'''Note:''' Path substition for "sources" and profiles is broken, and will '''NOT''' be fixed.}}
 
Path substitutions are for use for redirecting file paths.  These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for Kodi to handle.   


Default: No path substitutions defined.   
Default: No path substitutions defined.   


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<pathsubstitution>
<pathsubstitution>
   <substitute>
   <substitute>
Line 1,108: Line 1,363:


Default: 3
Default: 3
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<remotedelay>10</remotedelay>
<remotedelay>10</remotedelay>
</syntaxhighlight>
</syntaxhighlight>


=== remoterepeat ===
{{anchor|.3Cremoterepeat.3E}}
This used to adjust the amount of time in milliseconds between repeated keystrokes. Used to prevent key-bounce, in other words prevents {{kodi}} (lirc?) seeing one key press as multiple key presses with certain remotes.
<syntaxhighlight lang="xml" enclose="div">
<remoterepeat>800</remoterepeat>
</syntaxhighlight>


=== controllerdeadzone ===
=== controllerdeadzone ===
{{anchor|.3Ccontrollerdeadzone.3E}}
{{anchor|.3Ccontrollerdeadzone.3E}}
The controller deadzone is the region of movement around the center which is not recognized by the device. Because joysticks can have noise (report motion when still) and bias (report an offset when centered), spurious events can be reported even though the controller isn't being touched. If you notice these kinds of events, you most likely need to increase your controller's deadzone (both axes recommended). The values range from 0.0 (no deadzone, {{kodi}} will see all input your controller is capable of registering) to 1.0 (it will ignore all input inside of the device's physical limits).
This advanced settings has been removed.
Since v17, the [[Advancedsettings.xml#controllerdeadzone|&lt;controllerdeadzone&gt;]] advanced setting has been removed. Deadzones can now be configured by plugging in the controller and selecting it in Settings -> System settings -> Input -> Peripherals.


<syntaxhighlight lang="xml" enclose="div">
<controllerdeadzone>0.2</controllerdeadzone>
</syntaxhighlight>


=== enablemultimediakeys ===
=== enablemultimediakeys ===
{{anchor|.3Cenablemultimediakeys.3E}}
{{anchor|.3Cenablemultimediakeys.3E}}
This setting only has any effect on Windows versions of {{kodi}}, and only applies to builds from 28th May 2011 onwards.
This setting only has any effect on Windows versions of Kodi, and only applies to builds from 28th May 2011 onwards.
In Windows the multimedia keys generate a WM_APPCOMMAND message in addition the keypress. {{kodi}} processes both keypresses and the WM_APPCOMMAND messages, and the end result would be that the command is executed twice. To avoid this, by default multimedia keypresses are disabled. Although it should rarely be necessary, the enablemultimediakeys setting allows you to enable the multimedia keys.
In Windows the multimedia keys generate a WM_APPCOMMAND message in addition the keypress. Kodi processes both keypresses and the WM_APPCOMMAND messages, and the end result would be that the command is executed twice. To avoid this, by default multimedia keypresses are disabled. Although it should rarely be necessary, the enablemultimediakeys setting allows you to enable the multimedia keys.


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<enablemultimediakeys>true</enablemultimediakeys>
<enablemultimediakeys>true</enablemultimediakeys>
</syntaxhighlight>
</syntaxhighlight>
Line 1,140: Line 1,386:


=== seeksteps ===
=== seeksteps ===
{{future box|1=
{{Main|Skip steps}}
 
This setting changes which increments are available in the settings GUI for additive seeking. Note that <code><seeksteps></code> is not used to actually choose which seek steps are enabled.
This setting changes which increments are available in the settings GUI for additive seeking. Note that <code><seeksteps></code> is not used to actually choose which seek steps are enabled.


'''Default:'''
'''Default:'''
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<seeksteps>7, 15, 30, 60, 180, 300, 600, 900, 1800</seeksteps>
<seeksteps>7, 15, 30, 60, 180, 300, 600, 900, 1800</seeksteps>
</syntaxhighlight>
</syntaxhighlight>
}}
 
{{editor note|the defaults need to be updated for seeksteps.}}
 
 
=== touchscreen ===
{{anchor|.3Ctouchscreen.3E}}
This setting allows you to move/align the origin of the touch screen with the origin of the display used. If touch input does not result in a correct movement of the mouse pointer, the behaviour can be corrected with an offset and a stretch/compress factor.
 
Example:
<syntaxhighlight lang=xml enclose="div">
    <touchscreen>
<x_offset>0</x_offset> <!-- set pixel x offset to align it to the used display-->
<y_offset>0</y_offset> <!-- set pixel y offset to align it to the used display-->
<x_stretch_factor>1.0</x_stretch_factor> <!-- stretch/compress the touch x axis-->
<y_stretch_factor>1.0</y_stretch_factor> <!-- stretch/compress the touch y axis-->
    </touchscreen>
</syntaxhighlight>
 
 
=== scanirserver ===
Introduced in v18 and used in MS Windows setups only.<ref>https://github.com/xbmc/xbmc/pull/13896</ref>
Used to disable the regular connection attempts to the IR Server Suite when there is no remote to connect to.
 
The default setting is to allow connection attempts. To disable connection attempts change value to '''false'''.
<syntaxhighlight lang=xml enclose="div">
    <scanirserver>true</scanirserver>
</syntaxhighlight>
 
 


== Other interface settings ==
== Other interface settings ==
Line 1,153: Line 1,428:
=== window ===
=== window ===
{{anchor|.3Cwindow.3E}}
{{anchor|.3Cwindow.3E}}
This allows you to manually set the default size of {{kodi}}'s windowed mode.  If you resize the window, it will return to the set size when restarting.
{{note|This is a "hidden" guisettings.xml setting (defined by the mouse moving the window size), but it is mentioned here because it is a particularly useful override when used in advancedsettings.xml}}
This allows you to manually set the default size of Kodi's windowed mode.  If you resize the window, it will return to the set size when restarting.


WIDTH and HEIGHT are the values for each dimension, in pixels.
WIDTH and HEIGHT are the values for each dimension, in pixels.


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<window><width>WIDTH</width><height>HEIGHT</height></window>
<window>
    <width>WIDTH</width>
    <height>HEIGHT</height>
</window>
</syntaxhighlight>
</syntaxhighlight>


=== allowd3d9ex ===
{{anchor|.3Callowd3d9ex.3E}}
Applies only to Windows Vista and up. Values: true/false. Allows {{kodi}} to use Direct3D 9Ex, which is a bit more stable and robust than Direct3D 9.
Default:
<syntaxhighlight lang="xml" enclose="div">
<allowd3d9ex>true</allowd3d9ex>
</syntaxhighlight>


=== restrictcapsmask ===
=== restrictcapsmask ===
{{anchor|.3Crestrictcapsmask.3E}}
{{anchor|.3Crestrictcapsmask.3E}}
Windows only. A bitmask to prevent {{kodi}} from using detected texture capabilities of the GPU. This helps work around buggy hardware/drivers.
Windows only. A bitmask to prevent Kodi from using detected texture capabilities of the GPU. This helps work around buggy hardware/drivers.


1: prevent the use of compressed textures (DXT1, DXT3, DXT5)
1: prevent the use of compressed textures (DXT1, DXT3, DXT5)
Line 1,178: Line 1,449:
4: prevent the use of compressed textures with non-power-of-two dimensions.
4: prevent the use of compressed textures with non-power-of-two dimensions.


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<restrictcapsmask>0</restrictcapsmask>
<restrictcapsmask>0</restrictcapsmask>
</syntaxhighlight>
</syntaxhighlight>


=== forced3d9ex ===
{{anchor|.3Cforced3d9ex.3E}}
Windows only: {{kodi}} attempts to detect drivers released for a version earlier than Vista, to avoid using advanced features which are often not emulated correctly. The detection may be incorrect and this setting allows forcing the using of D3D9Ex.
<syntaxhighlight lang="xml" enclose="div">
<forced3d9ex>false</forced3d9ex>
</syntaxhighlight>


=== algorithmdirtyregions ===
=== algorithmdirtyregions ===
{{anchor|.3Calgorithmdirtyregions.3E}}
{{anchor|.3Calgorithmdirtyregions.3E}}
{{see also|HOW-TO:Modify dirty regions}}
{{see also|HOW-TO:Modify dirty regions}}
<section begin="algorithmdirtyregions" /> {{note|Some GPU/hardware configurations will have some minor issues (such as a visual "flicker"). For those situations try mode 2 or use the default (mode 3, which requires no advancedsetting). Almost all ARM-based devices (such as [[Android]]) willl likely have flickering issues.}}
<section begin="algorithmdirtyregions" />{{note|Some GPU/hardware configurations will have some minor issues (such as a visual "flicker"). For those situations try mode 2 or use the default (mode 3, which requires no advancedsetting). Almost all ARM-based devices (such as [[Android]]) willl likely have flickering issues.}}
   
   
Enable dirty-region processing. Dirty regions are any parts of the screen that have changed since the last frame. By not re-rendering what hasn't changed the GUI can be sped up. Because all GPUs work differently, only Mode 3, combined with nofliptimeout=0, is guaranteed to work for everyone without flickering issues. This mode will reduce CPU/GPU usage, but will not increase GUI speed.
Enable dirty-region processing. Dirty regions are any parts of the screen that have changed since the last frame. By not re-rendering what hasn't changed the GUI can be sped up. Because all GPUs work differently, only Mode 3 is guaranteed to work for everyone without flickering issues. This mode will reduce CPU/GPU usage, but will not increase GUI speed.


{| class="prettytable"
{| class="prettytable"
Line 1,214: Line 1,478:
! 3
! 3
| {{nowrap|Whole Screen}}
| {{nowrap|Whole Screen}}
| The entire screen is rendered if there are any dirty regions. This, combined with nofliptimeout is a safe default for drivers that clear buffer contents (manifests as blinking or vibrating images). '''Default'''
| The entire screen is rendered if there are any dirty regions. This is a safe default for drivers that clear buffer contents (manifests as blinking or vibrating images). '''Default'''
|}<section end="algorithmdirtyregions" />
|}<section end="algorithmdirtyregions" />


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gui>     
<gui>     
   <algorithmdirtyregions>1</algorithmdirtyregions>
   <algorithmdirtyregions>1</algorithmdirtyregions>
Line 1,224: Line 1,488:
</syntaxhighlight>
</syntaxhighlight>


=== nofliptimeout ===
{{anchor|.3Cnofliptimeout.3E}}
{{see also|HOW-TO:Modify dirty regions}}
<section begin="nofliptimeout" />Specifies the timeout in milliseconds after which {{kodi}} will not flip the graphics buffers anymore when nothing has been rendered, this lowers both CPU and GPU usage. Sometimes adjusting this value can help prevent flickering.
* -1: disabled
* 0 or higher: timeout in milliseconds '''(0 is default)'''
<section end="nofliptimeout" />
Example:
<syntaxhighlight lang="xml" enclose="div">
<gui>   
  <nofliptimeout>1000</nofliptimeout>
</gui>
</syntaxhighlight>


=== visualizedirtyregions ===
=== visualizedirtyregions ===
Line 1,250: Line 1,500:
<section end="visualizedirtyregions" />
<section end="visualizedirtyregions" />
Example:  
Example:  
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gui>     
<gui>     
   <visualizedirtyregions>true</visualizedirtyregions>
   <visualizedirtyregions>true</visualizedirtyregions>
</gui>
</gui>
</syntaxhighlight>
</syntaxhighlight>
=== smartredraw ===
{{note|This is an experimental feature and you might face issues using it. So please be aware of that.}}
This new feature was introduced in Kodi 18 and if enabled, the GUI process call (and therefore the render call) is only done if anything has changed. The result will be a faster GUI and less load if Kodi plays a video
* true: on
* false: off '''(Default)'''
Example:
<syntaxhighlight lang=xml enclose="div">
<gui>   
  <smartredraw>true</smartredraw>
</gui>
</syntaxhighlight>


=== showexitbutton ===
=== showexitbutton ===
{{anchor|.3Cshowexitbutton.3E}}
{{anchor|.3Cshowexitbutton.3E}}
Setting to hide the exit button, useful for people running appliance based setup's where exit would only confuse/complicate the user. Modifiable via the advancedsettings.xml by setting showexitbutton to false, default is true (show)
Setting to hide the exit button, useful for people running appliance based setups where exit would only confuse/complicate the user. Modifiable via the advancedsettings.xml by setting showexitbutton to false, default is true (show)


Example:
Example:
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<showexitbutton>true</showexitbutton>
<showexitbutton>true</showexitbutton>
</syntaxhighlight>
</syntaxhighlight>


=== fullscreen ===
=== fullscreen ===
{{anchor|.3Cfullscreen.3E}}
{{anchor|.3Cfullscreen.3E}}
Starts {{kodi}} in full screen (check resolutions!).
Starts Kodi in full screen (check resolutions!).


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<fullscreen>false</fullscreen>
<fullscreen>false</fullscreen>
</syntaxhighlight>
</syntaxhighlight>


=== splash ===
=== splash ===
Line 1,277: Line 1,547:
Set to false if you wish to disable the startup splash image. Defaults to true.
Set to false if you wish to disable the startup splash image. Defaults to true.


<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<splash>true</splash>
<splash>true</splash>
</syntaxhighlight>
</syntaxhighlight>


=== cputempcommand ===
=== cputempcommand ===
{{anchor|.3Ccputempcommand.3E}}
{{anchor|.3Ccputempcommand.3E}}
Provide a shell command {{kodi}} will use to get CPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".<br />
Provide a shell command Kodi will use to get CPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".<br />
;<u>For Nvidia and Raspberry Pi</u>
;<u>For Nvidia and Raspberry Pi</u>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<cputempcommand>sed -e 's/\([0-9]*\)[0-9]\{3\}.*/\1 C/' /sys/class/thermal/thermal_zone0/temp</cputempcommand>
<cputempcommand>sed -e 's/\([0-9]*\)[0-9]\{3\}.*/\1 C/' /sys/class/thermal/thermal_zone0/temp</cputempcommand>
</syntaxhighlight>
</syntaxhighlight>
or
or
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<cputempcommand>echo "$(sensors -u | tail -n64 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
<cputempcommand>echo "$(sensors -u | tail -n64 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
</syntaxhighlight>
</syntaxhighlight>
;<u>For ATI/AMD</u>
;<u>For ATI/AMD</u>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
</syntaxhighlight>
</syntaxhighlight>


=== gputempcommand ===
=== gputempcommand ===
{{anchor|.3Cgputempcommand.3E}}
{{anchor|.3Cgputempcommand.3E}}
Provide a shell command {{kodi}} will use to get GPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".<br />
Provide a shell command Kodi will use to get GPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".<br />
;<u>For Nvidia</u>
;<u>For Nvidia</u>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand>
<gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand>
</syntaxhighlight>
</syntaxhighlight>
or
or
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gputempcommand>echo "$(nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36) C"</gputempcommand>
<gputempcommand>echo "$(nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36) C"</gputempcommand>
</syntaxhighlight>
</syntaxhighlight>
;<u>For ATI/AMD</u>
;<u>For ATI/AMD</u>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>
<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>
</syntaxhighlight>
</syntaxhighlight>


;<u>For Raspberry Pi</u>
;<u>For Raspberry Pi</u>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<gputempcommand>/opt/vc/bin/vcgencmd measure_temp | sed -e "s/temp=//" -e "s/\..*'/ /"</gputempcommand>
<gputempcommand>/opt/vc/bin/vcgencmd measure_temp | sed -e "s/temp=//" -e "s/\..*'/ /"</gputempcommand>
</syntaxhighlight>
</syntaxhighlight>


=== glrectanglehack ===
=== glrectanglehack ===
{{anchor|.3Cglrectanglehack.3E}}
{{anchor|.3Cglrectanglehack.3E}}
Problems with ghosting or videos which are only played back in the left upper quarter? The following ATI hack may solve it.
Problems with ghosting or videos which are only played back in the left upper quarter? The following ATI hack may solve it.
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<glrectanglehack>yes</glrectanglehack>
<glrectanglehack>yes</glrectanglehack>
</syntaxhighlight>
</syntaxhighlight>


=== alwaysontop ===
=== alwaysontop ===
{{anchor|.3Calwaysontop.3E}}
{{anchor|.3Calwaysontop.3E}}
Added in XBMC v9.11 (Windows OS only). Keeps {{kodi}} always on top when windowed.
Added in XBMC v9.11 (Windows OS only). Keeps Kodi always on top when windowed.
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang=xml enclose="div">
<alwaysontop>yes</alwaysontop>
<alwaysontop>yes</alwaysontop>
</syntaxhighlight>
</syntaxhighlight>


Alternate code.
There is also a fake fullscreen GUI option in Kodi's settings.
<syntaxhighlight lang="xml" enclose="div">
 
    <videoscreen>
 
        <fakefullscreen>false</fakefullscreen>
=== minimizetotray ===
    </videoscreen>
{{anchor|.3Cminimizetotray.3E}}
{{note|Available in Kodi v20 and above.}}
 
Windows only. Minimizes Kodi to the system tray. Defaults to false.
<syntaxhighlight lang=xml enclose="div">
<minimizetotray>true</minimizetotray>
</syntaxhighlight>
</syntaxhighlight>


== Recently removed tags ==
= Removed tags =
{{anchor|Recently removed tags}}
* {{anchor|.3Cthumbsize.3E}}'''<thumbsize>''' - replaced by <[[#imageres|imageres]]> in v12 Frodo
* {{anchor|.3Cthumbsize.3E}}'''<thumbsize>''' - replaced by <[[#imageres|imageres]]> in v12 Frodo
* {{anchor|.3Cfanartheight.3E}}'''<fanartheight>''' - replaced by <[[#fanartres|fanartres]]> in v12 Frodo
* {{anchor|.3Cfanartheight.3E}}'''<fanartheight>''' - replaced by <[[#fanartres|fanartres]]> in v12 Frodo
* {{anchor|.3Cdvdthumbs.3E}}'''<dvdthumbs>''' - removed in v12 Frodo
* {{anchor|.3Cdvdthumbs.3E}}'''<dvdthumbs>''' - removed in v12 Frodo
* {{anchor|.3Cbusydialogdelayms.3E}}'''<busydialogdelayms>''' - removed in v12 Frodo
* {{anchor|.3Cbginfoloadermaxthreads.3E}}'''<bginfoloadermaxthreads>''' - removed in v13 Gotham
* {{anchor|.3Cbginfoloadermaxthreads.3E}}'''<bginfoloadermaxthreads>''' - removed in v13 Gotham
* '''<showepginfoonselect>''' - replaced by a GUI setting in v13 Gotham
* '''<showepginfoonselect>''' - replaced by a GUI setting in v13 Gotham
* {{anchor|.3Cbusydialogdelayms.3E}}'''<busydialogdelayms>''' - removed in v13 Gotham
* '''<resample>''', '''<forceDirectSound>''', '''<audiophile>''', '''<audiosinkbufferdurationmsec>''', '''<allowtranscode44100>''', and '''<streamsilence>''' - These were various sub-tags for <audio> that were removed in v13 Gotham and either replaced by GUI settings or were no longer needed.
* '''<resample>''', '''<forceDirectSound>''', '''<audiophile>''', '''<audiosinkbufferdurationmsec>''', '''<allowtranscode44100>''', and '''<streamsilence>''' - These were various sub-tags for <audio> that were removed in v13 Gotham and either replaced by GUI settings or were no longer needed.
* {{anchor|.3Cenableairtunesdebuglog.3E}}'''<enableairtunesdebuglog>''' - replaced by a GUI option in v14 Helix
* {{anchor|.3Cenableairtunesdebuglog.3E}}'''<enableairtunesdebuglog>''' - replaced by a GUI option in v14 Helix
* '''<videoDisableHi10pMultithreading>''' - renamed to <disableswmultithreading> in v14 Helix
* '''<videoDisableHi10pMultithreading>''' - renamed to <disableswmultithreading> in v14 Helix
* '''<hideallitems>''' - replaced by a GUI option in v15 Isengard
* '''<hideallitems>''' - For both the <code><videolibrary></code> and <code><musiclibrary></code> sections, this is replaced by a GUI option in v15 Isengard
* '''<SmallStepBackSeconds>''' - In v15 the <code>SmallStepBack</code> [[Action_IDs]] has been replaced by <code>seek(-7)</code> in default keymaps. See '''[[skip steps]]''' for details. When the original <code>SmallStepBack</code> action ID is used it defaults to the first backwards [[skip steps|additive seeking value]].
* '''<timeseekforward>/<timeseekbackward>''' - In v15 these tags are replaced by GUI options via [[skip steps|additive seeking]], which is configured in the GUI. See '''[[skip steps]]''' for details.
* {{anchor|.3Ckaraoke.3E}}'''<karaoke>''' - In v16 all of the karaoke features in Kodi were removed.
* '''<useddsfanart>''' - removed in v17 Krypton.
* '''<cachemembuffersize>''' and '''<readbufferfactor>''' - In v17 '''<cachemembuffersize>''' is renamed to '''<memorysize>''' and <code><readbufferfactor></code> is renamed to <code><readfactor></code>. In addition, all three buffer related settings in <network> are moved out of <network> and into a new <cache> parent tag.
* '''<minvideocachelevel>''', '''<minaudiocachelevel>''', and '''<cacheindvdplayer>''' have been removed in v17.
* '''<useffmpegvda>''' - Tag was only used for development testing. Removed in v17.
* '''<nofliptimeout>''' - Removed in v17
* '''<blackbarcolour>''' - Removed in v17 (maybe?)
* '''<disableswmultithreading>''' - Removed in v17 (maybe?)
* {{anchor|.3Cmeasurerefreshrate.3E}}'''<measurerefreshrate>''' - Removed in v17 or v18?
* {{anchor|.3Cmyth.3E}}'''<myth>''' - Removed sometime between v16 to v18
* {{anchor|.3Ctuxbox.3E}}'''<tuxbox>''' - Removed
* '''<backgroundupdate>''' - Removed
* '''<hideemptyseries>''' - Replaced by a GUI option.
* '''<mymovies>''' and child tag '''<categoriestogenres>''' - Removed
* '''<albumssortbyartistthenyear'''> - Removed
* '''<albumformatright>''' - Removed
* {{anchor|.3Cremoterepeat.3E}}'''<remoterepeat>''' - Removed
* {{anchor|.3Callowd3d9ex.3E}}'''<allowd3d9ex>''' and {{anchor|.3Cforced3d9ex.3E}}'''<forced3d9ex>''' - Removed sometime between v16 to v18
* '''<lingertime>''' - Replaced by a GUI setting in v18
* '''<forcevaapienabled>''' - Removed in v18
* '''<promptfulltagscan>false</promptfulltagscan>''' Removed in v18. Now automatically asked each time a scan is conducted.
* '''<controllerdeadzone>''' - Removed in v17
* '''<omxdecodestartwithvalidframe>''' - This tag is only in some Raspberry Pi specific distributions, such as OpenELEC. As of March 2015, this tag has not been merged into "vanilla" Kodi builds
* '''<musicthumbs>''' Replaced in v19 by the GUI setting '''Thumbnail image files''' found in Media -> Music
* '''<artistextraart>''' Replaced in v19 by the GUI setting '''Artist art types whitelist''' found in Media -> Music
* '''<albumextraart>''' Replaced in v19 by the GUI setting '''Album art types whitelist''' found in Media -> Music
* '''<fanart>''' Removed in v19
* '''<assfixedworks>''' Removed in v20


== guisettings.xml settings ==
= guisettings.xml Setting Conversion =
You can also define the settings normally defined in the GUI (and stored in guisettings.xml) in advancedsettings.xml.  Any guisettings.xml settings defined in advancedsettings.xml will override the guisettings.xml values, and the settings will be removed completely from the interface.
It is possible to convert settings found in the '''[[Settings]]''' ''(guisettings.xml)'' pages of {{kodi}} into entries for the advancedsettings.xml file.


The easiest way to include a guisettings.xml setting is to first change the setting in the interface to the value that you want, and then open the '''[[userdata]]/guisettings.xml''' file and find the XML entry that corresponds to that setting.
When a setting from the guisettings.xml is added to the advancedsettings.xml file, it will override the existing guisettings.xml values and the setting will be removed from the settings pages.


Then just add that entry to the advancedsettings.xml file.
Why would I need to do this?
* You set up multiple devices and then need to individually change settings and preferences on each device. Using this conversion method, you save those settings in the advancedsettings.xml file and simply add the file to each device
* You need to hide settings to prevent those settings from being modified


For instance, to set the Font Character Set (found in the appearance setting, in the Look and Feel section), you'd open up guisettings.xml and find:


<syntaxhighlight lang="xml" enclose="div">
To convert a guisetting to advancedsettings.xml follow these steps:
  <lookandfeel>
# In the {{kodi}} settings pages, adjust the setting(s) to your preference.
    <charset>Hebrew (Windows)</charset>
# Back out of the settings pages to the main menu, which forces {{kodi}} to save the adjusted settings to the guisettings.xml file
  </lookandfeel>
# Locate the guisettings.xml file in the [[Userdata]] folder and open it
# Locate the setting(s) to be converted. The list can be overwhelming so make use of the Search feature of whichever editor you are using
# Using the following setting as an example:
<syntaxhighlight lang="xml">
<setting id="videolibrary.showemptytvshows">true</setting>
</syntaxhighlight>
: Breaking down the string:
::'''videolibrary'''- parent tag
::'''showemptytvshows'''- child tag
::'''true'''- value
: The conversion is as follows and place this in the advancedsettings.xml file
<syntaxhighlight lang="xml">
<advancedsettings version="1.0">
    <videolibrary>
          <showemptytvshows>true</showemptytvshows>
    </videolibrary>
</advancedsettings>
</syntaxhighlight>
</syntaxhighlight>


Simply take that entry and place it in advancedsettings.xml. The option in {{kodi}}'s interface for the character set will then no longer be visible, and {{kodi}} will always use the Hebrew (Windows) character set.
'''Note:''' Some parent tags may already be in use in your advancedsettings.xml file. Do not duplicate them, but add the child tag beneath the existing parent tag.


{{Gotham updated}}
 
 
= References =
<references />
 
 
{{Updated|18}}
{{DISPLAYTITLE:advancedsettings.xml}}
{{DISPLAYTITLE:advancedsettings.xml}}


[[Category:Advanced topics]]
[[Category:Manual]]
[[Category:Settings]]
[[Category:Settings]]
[[Category:Manual]]
[[Category:Advanced topics]]

Revision as of 18:14, 15 October 2021

Home icon grey.png   ▶ Settings ▶ advancedsettings.xml

Note: The advancedsettings.xml file does not exist by default. You have to create it first!

The advancedsettings.xml file, which does not exist by default, can be created by a user in their userdata folder.

This file is used for advanced settings and options that do not have GUI controls inside of Kodi. Some settings are experimental or very rarely set, so they can only be used via the advancedsettings.xml file. The file is simply a plain text file and can be edited by various text editors, so long as the name is "advancedsettings.xml". These advanced settings can be used to tweak various things such as episode naming patterns, special network ports, special behaviors, and more.

The following page will describe the structure of the advancedsettings.xml file and the various individual settings.

Note:

  1. All XML tags must be lowercase. The start and end of the advancedsettings.xml file must have the <advancedsettings> and </advancedsettings> tags.
  2. Kodi will only read the advancedsettings.xml file when it starts up. If you make changes while it is running then you must restart Kodi.
  3. For some Windows versions, Kodi has two \userdata\ folders. The correct one to put the advancedsettings.xml file in is not the one in Program Files, but in %appdata%\Kodi\userdata\.

Layout

The layout of advancedsettings.xml is as follows:

<advancedsettings version="1.0">
    <setting>value</setting>
    ...
    <setting>value</setting>
</advancedsettings>

where "setting" gives the name of the setting, and "value" gives its value.

A list of the available "setting" strings and their values is given below.

List of available settings

List of available settings that are recognised in the advancedsettings.xml file [1]

Recommended: Use the table of contents or the search function in your browser to locate items.


Troubleshooting settings

loglevel


Sets the logging level used to log errors and information. The "hide" attribute is optional.

  <loglevel hide="attribute">options</loglevel>
Attribute Action
true Hides the "enable debugging" setting in the Settings page. (default)
false Allows "enable debugging" setting to switch between 0 and 2.
Option Action
-1 No logging, suppresses all log output
0 Normal logging, only logging errors (default)
1 Debug logging with freemem, fps and cpu usage (no on screen)
2 Same as 1 (with on screen display)
3 Same as 2 + full smb logging (no on screen display)
Example
Example 1:
<advancedsettings>
    <loglevel>2</loglevel>  
</advancedsettings>
Example 2:
<advancedsettings>
    <loglevel hide="true">2</loglevel>
</advancedsettings>

Note: The setting is persistent through shutdown and restarts.
Note: If debugging is enabled in the GUI, loglevel will be set to 2. This will over-ride the advancedsettings.xml setting. You must disable the GUI Setting before adding the entry to advancedsettings.xml.

jsonrpc

To make it easier for developers using the JSON-RPC_API API in their (third party) applications to debug during development the json output of Kodi can be prettified by setting compactoutput to false. Default json output mode is a compact print which does not contain any unnecessary whitespaces and therefore is difficult to read for humans. Furthermore using the tcpport setting it is possible to change the default TCP port used by Kodi for JSON RPC (which is 9090) to any other valid port.

Example:

<jsonrpc>
    <compactoutput>false</compactoutput>
    <tcpport>9999</tcpport>
</jsonrpc>

Audio/video playback settings

skiploopfilter

The amount of the loop filter to skip on h.264 decoding. This can help the performance of slower machines when decoding h264 content. Values, in decreasing CPU usage (and decreasing quality)

  • -16 None
  • 0 Skip only empty frames (default)
  • 8 Skip non-reference frames
  • 16 Skip bi-dir frames
  • 32 Skip all non-key frames
  • 48 Skip all frames

Example:

  <skiploopfilter>8</skiploopfilter>

video

The <video> section also includes the following child-tags, which have their own sections:


Note: Some tags that have a "third-level" and are grouped together are highlighted in color.

Tag Description
<video>
Parent tag that all other child tags need to be placed inside of. Do not use more than one <video> tag, but instead place all other child-tags within a single <video></video> set.
  <subsdelayrange>10</subsdelayrange>
Delay range for subtitles, in seconds.
  <maxtempo>2.1</maxtempo>
Allow further increase of playback speed over the default of 1.5

maxtempo must be in the range of 1.5 to 2.1
Be aware of the limitations of your platform / hardware as not all are capable of the increased maxtempo [2]

  <audiodelayrange>10</audiodelayrange>
Delay range for audio/video sync, in seconds.
  <usetimeseeking>true</usetimeseeking>
Whether to use time based or percentage based seeking. See also: Skip steps
  <timeseekforwardbig>600</timeseekforwardbig>
  <timeseekbackwardbig>-600</timeseekbackwardbig>
Time to seek forward in seconds when doing a long seek. Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. See also: Skip steps
  <percentseekforward>2</percentseekforward>
  <percentseekbackward>-2</percentseekbackward>
Amount to seek forward as a percentage, when doing a short seek. Defaults to 2 (2%) and -2 (2%) respectively. See also: Skip steps
  <percentseekforwardbig>10</percentseekforwardbig>
  <percentseekbackwardbig>-10</percentseekbackwardbig>
Amount to seek forward as a percentage, when doing a long seek. Defaults to 10 (10%) and -10 (10%) respectively. See also: Skip steps
  <fullscreenonmoviestart>true</fullscreenonmoviestart>
Whether to go to fullscreen or not when starting a movie. Defaults to true.
  <defaultplayer>VideoPlayer</defaultplayer>
Set the default video player: VideoPlayer or an external player. See External players for more info.
  <excludefromscan>
    <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
  </excludefromscan>
Regular expressions that if evaluated to true won't be added to library. It is possible to add multiple <regexp> tags to match multiple patterns
  <excludefromlisting>
    <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
  </excludefromlisting>
Regular expressions that if evaluated to true won't be displayed in files view.
  <playcountminimumpercent>90</playcountminimumpercent>
Minimum percentage that has to be played before it is marked as watched. Set to 101 to never auto-mark items as watched. See also: HOW-TO:Modify automatic watch and resume points
  <ignoresecondsatstart>180</ignoresecondsatstart>
Number of seconds to ignore at video start after which a resume point is created. See also: HOW-TO:Modify automatic watch and resume points
  <ignorepercentatend>8</ignorepercentatend>
Percentage of video to ignore at the end. If you stop watching the video here no resume point is created. Set to 101 to never save a resume point. The video is already marked as watched at 90%, see above. See also: HOW-TO:Modify automatic watch and resume points
  <vdpauscaling>true</vdpauscaling>
Scales with vdpau instead of opengl and turns on its HQ scaler when available, enabling this might slow down rendering and cause framedrops especially on ION systems, this setting requires a vdpau feature set C GPU.
  <enablehighqualityhwscalers>true</enablehighqualityhwscalers>
Allow turning on the spline36 and lanczos3 shader (for GL builds).
  <dxvaallowhqscaling>false</dxvaallowhqscaling>
Enables high quality video upscaling for Windows.
  <ppffmpegdeinterlacing>linblenddeint</ppffmpegdeinterlacing>
Override the deinterlacing options passed to libpostproc.
  <ppffmpegpostprocessing>ha:128:7,va,dr</ppffmpegpostprocessing>
Override the post processing options passed to libpostproc when 'Video post-processing' is activated in GUI Videos-Settings-Playback.
  <autoscalemaxfps>30</autoscalemaxfps>
When scaling method is set to auto, bilinear is chosen when the fps is higher than this limit, the default is 30.
  <adjustrefreshrate>
Settings for when "Adjust refreshrate to match video fps" is enabled in the video playback GUI settings.
    <override>
      <fps>23.976</fps>
      <refresh>60.0</refresh>
    </override>
Example - "Adjust refreshrate to match video fps" will try to select the best refreshrate for the video fps but it doesn't always get it right, for example it might switch to an unsupported refreshrate. You can add overrides here to switch to a certain refreshrate based on video fps. It's possible to add as many overrides as you need. Overrides are processed in order, if the first one doesn't match the fps or no refreshrates match that override, it will try the next one until no overrides are left.
  • fps - if the fps is between 23.966 and 23.986
  • refresh - switch to the first found refreshrate that is between 59.99 and 60.01
    <override>
      <fpsmin>29.96</fpsmin>
      <fpsmax>30.01</fpsmax>
      <refreshmin>59.0</refreshmin>
      <refreshmax>61.0</refreshmax>
    </override>
Example -
  • fpsmin / fpsmin - You can also specify the fps range yourself.
  • refreshmin / refreshmax - Same for the refreshrate
    <fallback>
      <refresh>50.0</refresh>
    </fallback>
Example - If none of the overrides match, or none of the refreshrates match any of the fps matching overrides, it will choose a fallback refreshrate. Fallbacks are process in order, if the first fallback doesn't match any refreshrate, it will try the next one until no fallbacks are left.
  • refresh - Switch to the first found refreshrate that is between 49.99 and 50.01.
    <fallback>
      <refreshmin>49.0</refreshmin>
      <refreshmax>51.0</refreshmax>
    </fallback>
Example - You can also specify the range for the fallback yourself.

If none of the overrides match the video fps, or no refreshrates match any of the fps matching overrides, and no fallbacks are specified or no refreshrates match any fallbacks, it will automatically choose the best refreshrate (same as having no overrides and fallbacks).

  </adjustrefreshrate>
  <checkdxvacompatibility>value</checkdxvacompatibility>
Advanced setting not present: let Kodi autodetect cards that support H.264 profile > L4.1. Set value to false to enable DXVA no matter what. Set value to true if Kodi doesn't autodetect that the graphics card doesn't support > L4.1.
  <useocclusionquery>-1</useocclusionquery>
Use an occlusion query when capturing videoframes, -1 means auto detect, 0 means disabled, 1 means enabled, the default is -1.
  <fpsdetect>1</fpsdetect>
FPS detection for video playback
  • 0 = trust codec fps
  • 1 = recalculate from video timestamps with uniform spacing
  • 2 = recalculate from video timestamps always
  <latency>
Start of latency tags. Display latency (video lag). Latency is given in msecs.
    <delay>0</delay>
Global default display latency.
    <refresh></refresh>
Override latency for given display (not video) refresh rates. When Kodi is in windowed mode, override is ignored. Multiple overrides are allowed.

Syntax of an override entry:

<refresh>
  <min>, <max> refresh rate range, OR
  <rate> exact refresh rate
  <delay> display latency for the given refresh rate
</refresh>
    <refresh>
      <min>23</min>
      <max>24</max>
      <delay>125</delay>
    </refresh>
Example: display has 125 msec latency at 23-24 Hz
    <refresh>
      <rate>50</rate>
      <delay>50</delay>
    </refresh>
Example: display has 50 msec latency at 50 (+/-0.01) Hz
  </latency>
  <stereoscopicregex3d>[-. _]3d[-. _]</stereoscopicregex3d>
  <stereoscopicregexsbs>[-. _]h?sbs[-. _]</stereoscopicregexsbs>
  <stereoscopicregextab>[-. _]h?tab[-. _]</stereoscopicregextab>
Filename triggers for 3D (stereoscopic) mode.
  <assfixedworks>false</assfixedworks>
Position behavior of ass subtitiles when setting "subtitle position on screen" set to "fixed". True to show at the fixed position set in video calibration. False to show at the bottom of video (default). Note: Removed in Kodi v20.
  <subtitleverticalmargin>120</subtitleverticalmargin>
Allows to customise the vertical margin of subtitles, which will be applied to each type of subtitle position in subtitle settings. Note: Available in Kodi v20 and above.
</video>

audio

<audio>
  <!-- Amount of headroom Kodi should use above the maximum volume level, in decibels.  Defaults to 0, valid values 0, 6, 12. -->
  <headroom>0</headroom>
  <!-- Default audio player: paplayer or videoplayer -->
  <defaultplayer>paplayer</defaultplayer>
  <!-- Regular expressions that if evaluated to true won't be added to library. -->
  <excludefromscan> 
    <regexp>[-\._ ](podcast)[-\._ ]</regexp>
  </excludefromscan>
  <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
  <excludefromlisting> 
    <regexp>[-\._ ](podcast)[-\._ ]</regexp>
  </excludefromlisting>
  <!-- Amount of gain (dB) to be applied to AC3 streams that have been mixed-down to 2 channels. Default is 12.0. Valid values are: -96.0 to 96.0. -->
  <ac3downmixgain>12.0</ac3downmixgain>
  <!-- Whether to use time based or percentage based seeking. -->
  <usetimeseeking>true</usetimeseeking>
  <!-- Time to seek forward in seconds when doing a long seek.  Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. -->
  <timeseekforwardbig>600</timeseekfowardbig>
  <!-- Time to seek backward in seconds when doing a long seek back.  Defaults to 600 (10 minutes) and -600 (-10 minutes) respectively. -->
  <timeseekbackwardbig>-600</timeseekbackward>
  <!-- Minimum percentage that has to be played before it is considered for incrementing in the Top 100 database view, or for last.fm submittal -->
  <playcountminimumpercent>99</playcountminimumpercent> 
  <!-- Whether to use Dynamic Range Compression (DRC) on AC3 streams. 1.0 is "full" compression, as defined by the audio track's metadata, which is recommended for "basic" sound systems such as the internal speakers on a TV. 0.0 is no compression at all, which is recommended for people with nice multi-speaker sound systems. -1.0 (default) defaults to whatever ffmpeg uses, which is currently the same as 1.0. This has no effect if passthrough is enabled for AC3. -->
  <applydrc>-1.0</applydrc> 
  <!-- default values for limiter/compressor -->
  <limiterhold>0.025</limiterhold> 
  <!-- default values for limiter/compressor -->
  <limiterrelease>0.1</limiterrelease> 
</audio>


forcedswaptime

Use to force a backbuffer->frontbuffer swap while vsync is enabled. Set to the time (in ms) to allow for the swap (e.g. <forcedswaptime>1</forcedswaptime> is typical).

Default: Off


edl

Commercial break detection not as good you think it could be? Are some commercial breaks in a series of adverts not being skipped? Are some parts being skipped that are clearly not commercials? Does the end of the previous recording still show? The following advanced settings can be used to better identify full commercial break sequences, remove incorrectly flagged commercial breaks, and have playback start at the actual beginning of the recording.


<edl>
  <!-- if true, commercial breaks will be merged according to the remaining options. -->
  <mergeshortcommbreaks>false</mergeshortcommbreaks>
  <!-- Commercial breaks won't be merged if the total length of the commercial break would be greater than this (seconds) -->
  <maxcommbreaklength>250</maxcommbreaklength>
  <!-- After merging, commercial breaks shorter than this will be removed (seconds) -->
  <mincommbreaklength>90</mincommbreaklength>
  <!-- Commercial breaks that are further apart than this won't be merged (seconds) -->
  <maxcommbreakgap>120</maxcommbreakgap>
  <!-- How long to wait before automatically skipping when the start of a commercial break reached (seconds). Possible values: from -60 to 60-->
  <commbreakautowait>0</commbreakautowait>
  <!-- How long to rewind after automatically skipping to the end of the commercial break (seconds). Possible values: from -60 to 60 -->
  <commbreakautowind>0</commbreakautowind>
</edl>


PVR & Live TV

Settings available for PVR, EPG and Live TV. Edit Decision List settings are located in the previous section.


pvr

<pvr>
  <timecorrection>0</timecorrection>  <!-- Correct all times (epg tags, timer tags, recording tags) by this amount of minutes. -->
  <infotoggleinterval>3000</infotoggleinterval>  <!-- If there is more than one pvr gui info item available (e.g. multiple recordings active at the same time), use this toggle delay in milliseconds. -->
  <channeliconsautoscan>true</channeliconsautoscan> <!-- Automatically scan user defined folder for channel icons when loading internal channel groups. -->
  <autoscaniconsuserset>false</autoscaniconsuserset> <!-- Mark channel icons populated by auto scan as "user set". -->
  <numericchannelswitchtimeout>1000</numericchannelswitchtimeout> <!-- Time in ms before the numeric dialog auto closes when confirmchannelswitch is disabled. -->
</pvr>


pvrrecordings

In v19 and later, allows users to modify sort type and order of pvr recordings. [3]

Note- These settings are child tags to the <pvr> tag in the previous section.
<pvr>
   <pvrrecordings>
      <sortmethod>2</sortmethod>  <!-- 1=Name 2=Date 3=Size 4=File -->
      <sortorder>2</sortorder>    <!-- 1=Ascending 2=Descending -->
   </pvrrecordings>
</pvr>

epg

<epg>
  <updatecheckinterval>300</updatecheckinterval>  <!-- Check every X seconds, if EPG data need to be updated. This does not mean that every X seconds an EPG update is actually triggered, it's just the interval how often to check whether an update should be triggered. If this value is greater than GUI setting 'epg.epgupdate' value, then EPG updates will done with the value specified for 'updatecheckinterval', effectively overriding the GUI setting's value. -->
  <updateemptytagsinterval>60</updateemptytagsinterval>  <!-- If a TV channel has no EPG data, try to obtain data for that channel every X seconds. This overrides the GUI setting 'epg.epgupdate' value, but only for channels without EPG data. If this value is less than 'updatecheckinterval' value, then data update will be done with the interval specified by 'updatecheckinterval'. Example 1: epg.epgupdate = 120 (minutes!), updatecheckinterval = 300, updateemptytagsinterval = 60 => trigger an EPG update for every channel without EPG data every 5 minutes and trigger an EPG update for every channel with EPG data every 2 hours. Example 2: epg.epgupdate = 120 (minutes!), updatecheckinterval = 300, updateemptytagsinterval = 3600 => trigger an EPG update for every channel without EPG data every 2 hours and trigger an EPG update for every channel with EPG data every 1 hour. -->
  <cleanupinterval>900</cleanupinterval>  <!-- remove old entries from the EPG every X seconds -->
  <activetagcheckinterval>60</activetagcheckinterval>  <!-- check for updated active tags every X seconds -->
  <retryinterruptedupdateinterval>60</retryinterruptedupdateinterval>  <!-- retry an interrupted EPG update after X seconds -->
  <displayupdatepopup>true</displayupdatepopup>  <!-- display a progress popup while updating EPG data from clients -->
  <displayincrementalupdatepopup>false</displayincrementalupdatepopup>  <!-- also display a progress popup while doing incremental EPG updates -->
</epg>


Video library settings

videoextensions

A list of additional file-extensions to allow (add) or exclude (remove) in the My Video windows.

Default extensions for VIDEOS:

.m4v .3g2 .3gp .nsv .tp .ts .ty .strm .pls .rm .rmvb .mpd .m3u .m3u8 .ifo .mov .qt .divx .xvid
.bivx .vob .nrg .img .iso .udf .pva .wmv .asf .asx .ogm .m2v .avi .bin .dat .mpg .mpeg .mp4
.mkv .mk3d .avc .vp3 .svq3 .nuv .viv .dv .fli .flv .001 .wpl .xspf .zip .vdr .dvr-ms .xsp .mts
.m2t .m2ts .evo .ogv .sdp .avs .rec .url .pxml .vc1 .h264 .rcv .rss .mpls .mpl .webm .bdmv
.bdm .wtv .trp .f4v

Examples:

<videoextensions>
  <add>.ex1|.ex2</add>
  <remove>.ex3|.ex4</remove>
</videoextensions>


discstubextensions


The default filename extension for Disc Stubs is:

.disc

Using the following tags, it is possible to <add> additional or <remove> existing disc stub extensions to better suit your requirements.

<discstubextensions>
  <add>.disk|.stub</add>
  <remove>.disc</remove>
</discstubextensions>


languagecodes

Translation table for subtitle and audio names. Contains entries of the form

<languagecodes>
  <code>
    <short>alt</short>
    <long>Alternate</long>
  </code>
</languagecodes>


moviestacking

This is used by the file stacking algorithm to combine multi-part files and contains a list of "regular expressions". For stacking videos that are contained in folders, such as VIDEO_TS folders, see <folderstacking>

As of v9.11, video stacking regular expressions must contain exactly four (4) capture expressions.

Default:

<moviestacking>
  <!-- <cd/dvd/part/pt/disk/disc> <0-N> -->
  <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
  <!-- <cd/dvd/part/pt/disk/disc> <a-d> -->
  <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[a-d])(.*?)(\.[^.]+)$</regexp>
  <!-- movienamea-xvid.avi, movienameb-xvid.avi -->
  <regexp>(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$</regexp>
</moviestacking>

If the argument action="append" or append="yes" is supplied, the default moviestacking regular expressions will remain intact and the user specified ones will be added to the end.

Example:

<moviestacking action="append">
    <!-- This expression will match movename1-xvid.avi, moviename2-xvid.avi.
         Be warned that it will likely stack sequels in a flat directory layout,
         so it is only recommend in a dir-per-video layout. -->
  <regexp>(.*?)([ ._-]*[0-9])(.*?)(\.[^.]+)$</regexp>
</moviestacking>


If the argument action="prepend" is supplied, the default moviestacking regular expressions will remain intact and the user specified ones will be added to the beginning.

Example:

<moviestacking action="prepend">
  <regexp>(Title)(Volume)(Ignore)(Extension)</regexp>
</moviestacking>

If no argument is supplied, or the argument append="no" is supplied, the default moviestacking regular expressions are overwritten by the user specified ones.


folderstacking

This is similar to <moviestacking>, but is used for videos that are contained in folders that use the folder names to stack, such as VIDEO_TS folders (DVD rips that are not in ISO format).

Default:

<folderstacking>
  <!-- <cd/dvd/disk/disc> <0-N> -->
  <regexp>((cd|dvd|dis[ck])[0-9]+)$</regexp>
</folderstacking>

cleandatetime

Matches a year number in a string using a Regular Expression

Default expression:

<video>
  <cleandatetime>(.*[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-9][0-9])([ _\,\.\(\)\[\]\-]|[^0-9]$)?</cleandatetime>
</video>
  • The string found before will be used as basis string getting cleaned by the cleanstrings expressions.
  • By default date formats like MM:YY are ignored.

cleanstrings

Clean unwanted characters from filenames or folders by using a list of Regular Expressions. Please note that everything right of the match (at the end of the file name) is removed, so if you would have a file named Super movie.mp4 and would add <regexp> </regexp> (only a space), the only thing that would be left is Super, which is probably not what you want.

Default expressions:

<video>
  <cleanstrings>
   <regexp>[ _\,\.\(\)\[\]\-](aka|ac3|dts|custom|dc|remastered|divx|divx5|dsr|dsrip|dutch|dvd|dvd5|dvd9|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|extended|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|3d|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
   <regexp>(\[.*\])</regexp>
  </cleanstrings>
</video>
  • Arguments action="append" or action="prepend" will insert user specified expressions after, or before, the defaults above. (Further details in moviestacking section)

tvshowmatching

Matches the season and episode numbers in file paths by using a list of Regular Expressions

Defaults:

<tvshowmatching>
  <regexp>s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$</regexp>  <!-- foo.s01.e01, foo.s01_e01, S01E02 foo, S01 - E02, S01xE02 -->
  <regexp>[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$</regexp>  <!-- foo.ep01, foo.EP_01 -->
  <regexp>([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})</regexp>  <!-- foo.yyyy.mm.dd.* (byDate=true) -->
  <regexp>([0-9]{2})[\.-]([0-9]{2})[\.-]([0-9]{4})</regexp>  <!-- foo.mm.dd.yyyy.* (byDate=true) -->
  <regexp>[\\/\._ \[\(-]([0-9]+)x([0-9]+)([^\\/]*)$</regexp>  <!-- foo.1x09* or just /1x09* -->
  <regexp>[\\/\._ -]([0-9]+)([0-9][0-9])([\._ -][^\\/]*)$</regexp>  <!-- foo.103*, 103 foo -->
  <regexp>[\/._ -]p(?:ar)?t[_. -]()([ivx]+)([._ -][^\/]*)$</regexp>  <!-- Part I, Pt.VI -->
</tvshowmatching>
  • Arguments action="append" or action="prepend" will insert user specified expressions after, or before, the defaults above. (Further details in moviestacking section)
  • Paths are converted to lower case before matching.
  • Examples of matching regexps for certain filenames can be found on the TV shows page.
  • For multi-episode matching to work, there needs to be a third set of parentheses '()' at the end, this part is fed back into the regexp engine.
  • A forum thread has a discussion of pre-made regex lists to match common names. These might improve Kodi's ability to match TV show names in some situations, at the risk of additional false positives.

Filenames without Season

There are two methods to add episodes without a season in their file path. Both ways will force the season to '1' by default, so that you can use the 'Use Absolute Ordering (Single Season)' setting from the TheTvDb.com scraper.

Simple Method (XBMC v9.11 onwards and Kodi)
Use only one pair of parentheses
<regexp>[/\._ \-]([0-9]+)</regexp>
Advanced Method (XBMC v10.05 onwards and Kodi)
Supports multi-episode files without season
Use an empty pair of parentheses for the season
<regexp>[/\._ \-]()([0-9]+)(-[0-9]+)?</regexp>
Specifying Default Season (XBMC v12.0 onwards and Kodi)

It is possible to set the default season for specific regular expressions by setting the 'defaultseason' attribute.

Works with both the simple method and advanced method
If not used, the season will be set to '1'
Useful for setting specials to season '0'
<regexp defaultseason="0">[/\._ \-]X()([0-9]+)(-[0-9]+)?</regexp>
<regexp defaultseason="1">[/\._ \-]E()([0-9]+)(-[0-9]+)?</regexp>

tvmultipartmatching

Matches a multipart episode number based on a previously identified episode file, using a list of Regular Expressions.

Default:

<tvmultipartmatching>^[-_ex]+([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)</tvmultipartmatching>
  • Text matching is compared case-insensitive.
  • Specifying this option replaces the default value

excludefromscan

Matches filenames or folders which should be excluded from a library scan (except tvshows) using a list of Regular Expressions. This can be for both Video or Audio sections of advancedsettings.xml.

Defaults:

<video>
  <excludefromscan>
    <regexp>-trailer</regexp>
    <regexp>[!-._ \\/]sample[-._ \\/]</regexp>
  </excludefromscan>
</video>
  • Arguments action="append" or action="prepend" will insert user specified expressions after, or before, the defaults above. (Further details in moviestacking section)

excludefromlisting

<video>  
  <excludefromlisting> <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
    <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
  </excludefromlisting>
</video>

excludetvshowsfromscan

Matches filenames or folders which should be excluded from a tvshow library scan using a list of Regular Expressions

Defaults:

<video>
  <excludetvshowsfromscan>
    <regexp>[!-._ \\/]sample[-._ \\/]</regexp>
  </excludetvshowsfromscan>
</video>
  • Arguments action="append" or action="prepend" will insert user specified expressions after, or before, the defaults above. (Further details in moviestacking section)

trailermatching

Contains "Regular Expression" syntax (commonly referred to as "RegEx" or "RegExp") to match the locally stored trailers to movies in the library.

  <trailermatching>
    <!-- This regexp will match moviename_Trailer.avi -->
    <regexp>(.*?)(_Trailer)(\.[^.]+)$</regexp>
  </trailermatching>

videolibrary

Options specific to the Video Library

  <videolibrary>
    <allitemsonbottom>false</allitemsonbottom>  <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
    <cleanonupdate>false</cleanonupdate>  <!-- default set to false to prevent Kodi from removing items from the database while updating.  -->
    <usefasthash>true</usefasthash> <!-- defaults to true. Set to false in order to skip hashing based on the folders modification time. -->
    <recentlyaddeditems>35</recentlyaddeditems> <!-- number of recently added items. Defaults to 25 -->
    <itemseparator> / </itemseparator>  <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* -->
    <exportautothumbs>false</exportautothumbs>  <!-- export auto-generated thumbs. Defaults to false -->
    <importwatchedstate>false</importwatchedstate>  <!-- import previously exported playdate and playcount from .nfo files. Defaults to false -->
    <importresumepoint>false</importresumepoint>  <!-- import previously exported resume point from .nfo files. Defaults to false -->
    <dateadded>1</dateadded> <!-- 0 results in using the current datetime when adding a video;
                                  1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid;
                                  2 results in using the newer datetime of the file's mtime and ctime -->
  </videolibrary>

Extra artwork

Applies to Kodi v18 only.

Configuration to expand the artwork automatically added by Kodi to media items in the library, either from local files or online scrapers.

The original basic artwork types are still hardcoded so they don't need to be configured here (and can't be removed). "poster" and "fanart" for movies, movie sets, TV shows, seasons, and music videos; "banner" for TV shows and seasons; and "thumb" for episodes.

  <videolibrary>
    <!-- ... combine with "videolibrary" settings above -->
    <!-- Additional artwork to add for TV shows -->
    <tvshowextraart>
      <arttype>characterart</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </tvshowextraart>
    <!-- Additional artwork to add for TV show seasons -->
    <tvseasonextraart>
      <arttype>landscape</arttype>
    </tvseasonextraart>
    <!-- Additional artwork to add for TV show episodes -->
    <episodeextraart>
      <arttype>fanart</arttype>
    </episodeextraart>
    <!-- Additional artwork to add for movies -->
    <movieextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </movieextraart>
    <!-- Additional artwork to add for movie sets / collections -->
    <moviesetextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
      <arttype>keyart</arttype>
    </moviesetextraart>
    <!-- Additional artwork to add for musicvideos -->
    <musicvideoextraart>
      <arttype>banner</arttype>
      <arttype>clearart</arttype>
      <arttype>clearlogo</arttype>
      <arttype>discart</arttype>
      <arttype>landscape</arttype>
    </musicvideoextraart>
  </videolibrary>

videoscanner

Options specific to the Video scanner

  <videoscanner>
    <ignoreerrors>true</ignoreerrors> <!-- Set to true to silently ignore errors while scanning videos. This prevents the error dialogue box, so you don't have to keep hitting "yes" to keep scanning.-->
  </videoscanner>

Library artwork

Note: Using <imageres>9999</imageres> and <fanartres>9999</fanartres> will allow caching artwork at original size.

imageres

Specify the maximum resolution that cached artwork (other than fanart / 16:9 images) should be resized to in pixels. The width is automatically calculated as being 16/9*height. The image will be resized to fit within this size. e.g. an image that is 2000x500 will be cached at size 1280x320. An image that is 500x800 will be cached at size 450x720 using the default value of 720.

<imageres>720</imageres>

fanartres

Specify the maximum resolution that cached fanart should be resized to in pixels. The width is automatically calculated as being 16/9*height. Only images that are exactly 16x9 and equal to or greater than this resolution will be cached at this size - all other images will be cached using <imageres>. The default value is 1080.

<fanartres>1080</fanartres>

imagescalingalgorithm

Specify the image scaling algorithm for image resizing when caching artwork to the local texture cache.

<imagescalingalgorithm>bicubic</imagescalingalgorithm>

Available image scaling algorithms

fast_bilinear
bilinear
bicubic
experimental
nearest_neighbor
averaging_area
bicublin
gaussian
sinc
lanczos
bicubic_spline

Video and music library settings

playlistasfolders

In the recent releases, playlists are treated as folders. Selecting a playlist no longer plays it, but opens it, as if it were a folder.

Set to false to revert to the previous behaviour. When you select a playlist, its content is added to the list of elements to be played.

Note: This setting will not affect smart playlists, they will always show as folders.
Example
<playlistasfolders>true</playlistasfolders>

playlistretries

The number of retries attempted if a source is offline. With this control you can alter the number of consecutive failed items before a playlist fails.

Default:

  <playlistretries>100</playlistretries>

playlisttimeout

The timeout, in seconds, before item failure.

Default:

<playlisttimeout>20</playlisttimeout>


sorttokens

Allows you to specify additional tokens that will be ignored at the start of lines during sorting. Note: Sort tokens are case sensitive.

<sorttokens>
  <token>the</token>
</sorttokens>

In the above example "the ", "the." and "the_" will be ignored at the start of titles or names when sorting items, in both video and music libraries. A separator can also be specified, for example

<sorttokens>
    <token separators="'">L</token>
</sorttokens>

In that case the value L', as in French movie name L'argent, will be ignored and the item listed under "A".


musicdatabase/videodatabase

Allows advanced customization of the default database settings for music, video, TV, EPG, and ADSP databases.

Note: It is HIGHLY recommended that you not attempt to place an sqlite3 database outside of kodi's path. sqlite3 contains no filesystem abstraction, so this will plain break on any non-local (as far as Kodi is concerned) paths. Use this for mysql only.


Parent tags:


  • <videodatabase>
  • <musicdatabase>
  • <tvdatabase> - Highly experimental/unstable and no practical benefit for most users. Avoid using.
  • <epgdatabase> - Highly experimental/unstable and no practical benefit for most users. Avoid using.
  • <adspdatabase> - Highly experimental/unstable and no practical benefit for most users. Avoid using.
Stop hand.png Kodi also supports using MySQL for PVR (tvdatabase and epgdatabase) as well as the ADSP database. However, there is little to no practical benefit to using MySQL for those databases, and there has been very little testing with them (expect bugs!). Unless you simply want to experiment, or have a very specific need, you should avoid using MySQL for PVR and ADSP.


Child tags:


<type>
Required - Can be either "sqlite3" or "mysql" (default: sqlite3)


<host>
Required -
  • sqlite3: defines the relative path to the database file (eg. /usr/local/kodi/databases).
  • mysql: defines the host of the mysql socket (eg. localhost, 192.168.0.1, etc)


<port>
Optional -
  • sqlite3: silently ignored
  • mysql: defines the port of the mysql socket (default: 3306)


<name>
Optional -
by default "MyVideos"+DB number will be used.
  • sqlite3: defines the name of the database file to read from, excluding the ".db" extension.
  • mysql: defines the name of the database to use


<user>
Required for MySQL -
  • sqlite3: silently ignored
  • mysql: defines the user with privileged access to the database


<pass>
Required for MySQL -
  • sqlite3: silently ignored
  • mysql: defines the password for the user with privileged access to the database


<compression>
Optional - Defaults to false. Set to "true" to enable MySQL compression protocol. Performance benefit is going to be largely dependent on the network bandwidth, latency between database and clients and on the size of the result sets. [1]
Note: Slower clients (such as the RPi and others) won't benefit from it as the zlib de-compression overhead is higher than the actual compression savings


<key>
Optional - SSL setting for MySQL [2]
<cert>
Optional - SSL setting for MySQL [3]
<ca>
Optional - SSL setting for MySQL [4]
<capath>
Optional - SSL setting for MySQL [5]
<ciphers>
Optional - SSL setting for MySQL [6]


Examples:

1) Configure a database for MySQL.

Note: The <videodatabase>, <musicdatabase>, <tvdatabase>, <epgdatabase>, and <adspdatabase> tags are interchangeable here.
<videodatabase>
  <type>mysql</type>
  <host>192.168.0.10</host>
  <name>kodi_video</name>
  <user>kodi</user>
  <pass>kodi</pass>
</videodatabase>

2) Configure a database for an sqlite database.

Note: The <videodatabase>, <musicdatabase>, <tvdatabase>, <epgdatabase>, and <adspdatabase> tags are interchangeable here.
<musicdatabase>
  <type>sqlite3</type>
  <host>/usr/local/share/kodi/databases</host>
</musicdatabase>


externalplayer

See: External players

Music settings

musicextensions

Default extensions for MUSIC:

.nsv .m4a .flac .aac .strm .pls .rm .rma .mpa .wav .wma .ogg .mp3 .mp2 .m3u .gdm .imf .m15 .sfx
.uni .ac3 .dts .cue .aif .aiff .wpl .xspf .ape .mac .mpc .mp+ .mpp .shn .zip .wv .dsp .xsp .xwav
.waa .wvs .wam .gcm .idsp .mpdsp .mss .spt .rsd .sap .cmc .cmr .dmc .mpt .mpd .rmt .tmc .tm8
.tm2 .oga .url .pxml .tta .rss .wtv .mka .tak .opus .dff .dsf .m4b .dtshd

It is possible to add or remove extensions for Music, using the following XML tags. Useful if you keep, say, FLAC and mp3 versions of music in the same folder. The <remove> tag can be used to remove mp3 from being listed in the library, leaving only the higher quality FLAC being displayed.

<musicextensions>
  <add>.ex1|.ex2</add>
  <remove>.ex3|.ex4</remove>
</musicextensions>


cddbaddress

The address of the online CDDb database. You may set this to another freedb mirror if there is a more suitable one.

Default:

<cddbaddress>freedb.freedb.org</cddbaddress>

songinfoduration

This controls how long the song information will remain onscreen when the song changes during visualisations. The valid range is "1" to "Indefinite (0)", in seconds. This does not include the duration of any transition effects.

Default:

<songinfoduration>10</songinfoduration>

musicfilenamefilters

Contains filters to match music information (artist, title etc.) from a tag-less music filename. The first <filter> to match completely is used. Matched items include:

%A - Artist
%T - Title
%B - Album
%N - Track number
%S - Part of set (disk number)
%D - Duration
%G - Genre
%Y - Year
%R - Rating

Example:

<musicfilenamefilters>
  <filter>%A - %T</filter>
</musicfilenamefilters>

musiclibrary

Options specific to the Music Library

<musiclibrary>
    <allitemsonbottom>true</allitemsonbottom>       <!-- sorts the "*All" items at the bottom of the list when in Ascending order -->
    <cleanonupdate>false</cleanonupdate>            <!-- default set to false to prevent Kodi from removing items from the database while updating.  -->
    <recentlyaddeditems>35</recentlyaddeditems>     <!-- number of recently added items. Defaults to 25 -->
    <albumformat>%B - %Y</albumformat>              <!-- album label template, default is "%B" -->
    <prioritiseapetags>true</prioritiseapetags>     <!-- prioritise APEv2 tags over ID3v1/2 tags, default is false. -->
    <itemseparator> / </itemseparator>              <!-- separator used for multiple artists/genres in tags. Note, this is *space* *slash* *space* See Note below-->
    <artistseparators>                              <!-- separator used for multiple artists. Note that spaces are used for some separators. See Note below-->
        <separator>;</separator>
        <separator>:</separator>
        <separator>|</separator>
        <separator> feat. </separator>
        <separator> ft. </separator>
    </artistseparators>
    <dateadded>1</dateadded>                        <!--0 results in using the current datetime when adding a song;
                                                        1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid;
                                                        2 results in using the newer datetime of the file's mtime and ctime   -->
    
    <!-- New for v19 and later releases -->
    <useisodates>false</useisodates>                <!-- When "true" all dates displayed in the music library will be in ISO 8601 format (YYYY-MM-DD or part thereof).
                                                         Defaults to "false" (use localized dates) -->  
</musiclibrary>

Note: Changing the <itemseparator> or <artistseparators> will only affect newly added items. A rescan won't change the existing ones. Remove the Source(s) or delete the Music DB and rebuild. This process should be made easier from v18 and up using <promptfulltagscan>

Photos settings

pictureextensions

A list of additional file-extensions to allow (add) or exclude (remove) in the My Pictures window.

Default extensions for PICTURES:

.png .jpg .jpeg .bmp .gif .ico .tif .tiff .tga .pcx .cbz .zip .rss .webp .jp2 .apng

Examples:

<pictureextensions>
  <add>.ex1|.ex2</add>
  <remove>.ex3|.ex4</remove>
</pictureextensions>

pictureexcludes

Matches filenames or folders which should be excluded from being displayed in My Pictures using a list of Regular Expressions

<pictureexcludes>  <!-- Regular expressions that if evaluated to true won't be displayed in My Pictures -->
  <regexp>small</regexp>
  <regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</pictureexcludes>

slideshow

<slideshow>
  <!-- Amount to pan images as a percentage of the screen -->
  <panamount>2.5</panamount>
  <!-- Amount to zoom images as a percentage of the screen -->
  <zoomamount>5.0</zoomamount>
  <!-- Amount to compensate (zoom) images to attempt to reduce black bars. -->
  <!-- Results in cropping of the longer length of the image in order to reduce the black bars on the shorter length of the image.  -->
  <!-- Defaults to 20. -->
  <blackbarcompensation>20</blackbarcompensation>  
</slideshow>

Network settings

ftp

Specific settings if a ftp server is in use as a source

<ftp>
  <remotethumbs>true</remotethumbs> <!-- enable extraction of flag and thumb for ftp -->
</ftp>

samba

<samba>
  <doscodepage></doscodepage>  <!-- code page to use for filenames -->
  <clienttimeout>10</clienttimeout>  <!-- timeout (in seconds) -->
  <statfiles>true</statfiles>  <!-- Set to false to disable smb stat() on files to speed up listings of large directories (over slow links) -->
</samba>

hosts

Static dns entries which take precedence over your dns server.

<hosts>
  <entry name="HOSTNAME">IPADDRESS</entry>
</hosts>

network

<network>
  <curlclienttimeout>10</curlclienttimeout>  <!-- Timeout in seconds for libcurl (http/ftp) connections -->
  <curllowspeedtime>20</curllowspeedtime>    <!-- Time in seconds for libcurl to consider a connection lowspeed -->
  <curlretries>2</curlretries>               <!-- Amount of retries for certain failed libcurl operations (e.g. timeout) -->
  <httpproxyusername></httpproxyusername>    <!-- username for Basic Proxy Authentication -->
  <httpproxypassword></httpproxypassword>    <!-- password for Basic Proxy Authentication -->
  <disableipv6>false</disableipv6>           <!-- Certain hardware/OS combinations have trouble with ipv6. Set "true" to disable -->
  <disablehttp2>false</disablehttp2>         <!-- Added in v19- Allows disabling HTTP2 for broken Curl / HTTP2 servers -->
  <nfstimeout>30</nfstimeout>                <!-- Added in v19- Timeout in seconds for NFS access, 0 = wait forever (previous behaviour) default is 5s  -->
  <catrustfile>filepath</catrustfile>        <!-- Added in v19- Allows specifying a custom SSL CA trust store bundle. e.g. special://masterprofile/cacerts.pem -->
  <curlkeepaliveinterval>30</curlkeepaliveinterval>     <!-- Added in v19- Enable TCP keepalive probes in curl --> 
</network>

Note: In Kodi v17, the three buffer settings are removed from the <network> tag and now placed under the new <cache> tag. See #cache for full details.

<curlkeepaliveinterval>[4]

cache

<cache>
  <memorysize>0</memorysize>   <!-- Number of bytes used for buffering streams in memory when set to 0 the cache will be written to disk instead of RAM -->
  <buffermode>0</buffermode>   <!-- Choose what to buffer:
                                    0) Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) 
                                    1) Buffer all filesystems (including local) (default since Kodi 19)
                                    2) Only buffer true internet filesystems (streams) (http, https, etc.)
                                    3) No buffer
                                    4) Buffer all network filesystems (incl. smb, nfs, etc.) -->
  <readfactor>4.0</readfactor> <!-- This factor determines the max readrate in terms of readfactor * avg bitrate of a video file. 
                                    This can help on bad connections to keep the cache filled. It will also greatly speed up buffering. Default value 4.0. -->
</cache>

airtunesport

This overwrites the defalt listening port of the AirTunes server (announced via zeroconf).


airplayport

This overwrites the default listening port of the AirPlay server (announced via zeroconf).


File system settings

packagefoldersize

<packagefoldersize>options</packagefoldersize>

The amount (in megabytes) of add-on zip packages saved from previous add-on installs. These packages are mainly used for the add-on rollback feature. Increasing the size should increase the amount of past versions saved. Defaults to 200 MB.

Example:

<packagefoldersize>200</packagefoldersize> <!-- this example would keep up to 200MB of add-on packages. -->


detectasudf

Set to true if you wish to detect joint ISO9660/UDF disks as UDF.

Default: False

pathsubstitution

Path substitutions are for use for redirecting file paths. These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for Kodi to handle.

Default: No path substitutions defined.

Example:

<pathsubstitution>
  <substitute>
    <from>G:\dvds\</from>
    <to>smb://somecomputer/g-share/dvds/</to> <!-- Note the difference between the usage of forward and backslashes -->
  </substitute>
</pathsubstitution>

Input control settings

remotedelay

The repeat delay for a LIRC remote control. A delay value between 1 and 20 before a remote button starts repeating on a long keypress (i.e. continuously sending button pushes while it's held down).

Default: 3

<remotedelay>10</remotedelay>


controllerdeadzone

This advanced settings has been removed. Since v17, the <controllerdeadzone> advanced setting has been removed. Deadzones can now be configured by plugging in the controller and selecting it in Settings -> System settings -> Input -> Peripherals.


enablemultimediakeys

This setting only has any effect on Windows versions of Kodi, and only applies to builds from 28th May 2011 onwards. In Windows the multimedia keys generate a WM_APPCOMMAND message in addition the keypress. Kodi processes both keypresses and the WM_APPCOMMAND messages, and the end result would be that the command is executed twice. To avoid this, by default multimedia keypresses are disabled. Although it should rarely be necessary, the enablemultimediakeys setting allows you to enable the multimedia keys.

Example:

<enablemultimediakeys>true</enablemultimediakeys>


seeksteps

This setting changes which increments are available in the settings GUI for additive seeking. Note that <seeksteps> is not used to actually choose which seek steps are enabled.

Default:

<seeksteps>7, 15, 30, 60, 180, 300, 600, 900, 1800</seeksteps>

Editor note: the defaults need to be updated for seeksteps.


touchscreen

This setting allows you to move/align the origin of the touch screen with the origin of the display used. If touch input does not result in a correct movement of the mouse pointer, the behaviour can be corrected with an offset and a stretch/compress factor.

Example:

    <touchscreen>
		<x_offset>0</x_offset> <!-- set pixel x offset to align it to the used display-->
		<y_offset>0</y_offset> <!-- set pixel y offset to align it to the used display-->
		<x_stretch_factor>1.0</x_stretch_factor> <!-- stretch/compress the touch x axis-->
		<y_stretch_factor>1.0</y_stretch_factor> <!-- stretch/compress the touch y axis-->
    </touchscreen>


scanirserver

Introduced in v18 and used in MS Windows setups only.[5] Used to disable the regular connection attempts to the IR Server Suite when there is no remote to connect to.

The default setting is to allow connection attempts. To disable connection attempts change value to false.

     <scanirserver>true</scanirserver>


Other interface settings

window

Note: This is a "hidden" guisettings.xml setting (defined by the mouse moving the window size), but it is mentioned here because it is a particularly useful override when used in advancedsettings.xml This allows you to manually set the default size of Kodi's windowed mode. If you resize the window, it will return to the set size when restarting.

WIDTH and HEIGHT are the values for each dimension, in pixels.

<window>
    <width>WIDTH</width>
    <height>HEIGHT</height>
</window>


restrictcapsmask

Windows only. A bitmask to prevent Kodi from using detected texture capabilities of the GPU. This helps work around buggy hardware/drivers.

1: prevent the use of compressed textures (DXT1, DXT3, DXT5) 2: prevent the use of non-power-of-two dimensions for textures 4: prevent the use of compressed textures with non-power-of-two dimensions.

<restrictcapsmask>0</restrictcapsmask>


algorithmdirtyregions

Note: Some GPU/hardware configurations will have some minor issues (such as a visual "flicker"). For those situations try mode 2 or use the default (mode 3, which requires no advancedsetting). Almost all ARM-based devices (such as Android) willl likely have flickering issues.

Enable dirty-region processing. Dirty regions are any parts of the screen that have changed since the last frame. By not re-rendering what hasn't changed the GUI can be sped up. Because all GPUs work differently, only Mode 3 is guaranteed to work for everyone without flickering issues. This mode will reduce CPU/GPU usage, but will not increase GUI speed.

value result description
0 Off The entire viewport is always rendered.
1 Union All dirty regions are grouped into the smallest possible rectangle. This is typically the fastest mode for slower GPUs due to only making one pass.
2 Cost reduction Each dirty region is presented separately, in as many passes as there are regions.
3 Whole Screen The entire screen is rendered if there are any dirty regions. This is a safe default for drivers that clear buffer contents (manifests as blinking or vibrating images). Default

Example:

<gui>    
  <algorithmdirtyregions>1</algorithmdirtyregions>
</gui>


visualizedirtyregions

Enable dirty-region visualization. Paints a rectangle over marked controls.

  • true: on
  • false: off (Default)

Note: This is only a development mode and isn't of use to normal users.

Example:

<gui>    
  <visualizedirtyregions>true</visualizedirtyregions>
</gui>


smartredraw

Note: This is an experimental feature and you might face issues using it. So please be aware of that.

This new feature was introduced in Kodi 18 and if enabled, the GUI process call (and therefore the render call) is only done if anything has changed. The result will be a faster GUI and less load if Kodi plays a video

  • true: on
  • false: off (Default)

Example:

<gui>    
  <smartredraw>true</smartredraw>
</gui>


showexitbutton

Setting to hide the exit button, useful for people running appliance based setups where exit would only confuse/complicate the user. Modifiable via the advancedsettings.xml by setting showexitbutton to false, default is true (show)

Example:

<showexitbutton>true</showexitbutton>


fullscreen

Starts Kodi in full screen (check resolutions!).

<fullscreen>false</fullscreen>


splash

Set to false if you wish to disable the startup splash image. Defaults to true.

<splash>true</splash>


cputempcommand

Provide a shell command Kodi will use to get CPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".

For Nvidia and Raspberry Pi
<cputempcommand>sed -e 's/\([0-9]*\)[0-9]\{3\}.*/\1 C/' /sys/class/thermal/thermal_zone0/temp</cputempcommand>

or

<cputempcommand>echo "$(sensors -u | tail -n64 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
For ATI/AMD
<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>


gputempcommand

Provide a shell command Kodi will use to get GPU temperature. It should print out only "[temp as integer] [scale as one of "CcFf"]".

For Nvidia
<gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand>

or

<gputempcommand>echo "$(nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36) C"</gputempcommand>
For ATI/AMD
<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>
For Raspberry Pi
<gputempcommand>/opt/vc/bin/vcgencmd measure_temp | sed -e "s/temp=//" -e "s/\..*'/ /"</gputempcommand>


glrectanglehack

Problems with ghosting or videos which are only played back in the left upper quarter? The following ATI hack may solve it.

<glrectanglehack>yes</glrectanglehack>


alwaysontop

Added in XBMC v9.11 (Windows OS only). Keeps Kodi always on top when windowed.

<alwaysontop>yes</alwaysontop>

There is also a fake fullscreen GUI option in Kodi's settings.


minimizetotray

Note: Available in Kodi v20 and above.

Windows only. Minimizes Kodi to the system tray. Defaults to false.

<minimizetotray>true</minimizetotray>

Removed tags

  • <thumbsize> - replaced by <imageres> in v12 Frodo
  • <fanartheight> - replaced by <fanartres> in v12 Frodo
  • <dvdthumbs> - removed in v12 Frodo
  • <busydialogdelayms> - removed in v12 Frodo
  • <bginfoloadermaxthreads> - removed in v13 Gotham
  • <showepginfoonselect> - replaced by a GUI setting in v13 Gotham
  • <resample>, <forceDirectSound>, <audiophile>, <audiosinkbufferdurationmsec>, <allowtranscode44100>, and <streamsilence> - These were various sub-tags for <audio> that were removed in v13 Gotham and either replaced by GUI settings or were no longer needed.
  • <enableairtunesdebuglog> - replaced by a GUI option in v14 Helix
  • <videoDisableHi10pMultithreading> - renamed to <disableswmultithreading> in v14 Helix
  • <hideallitems> - For both the <videolibrary> and <musiclibrary> sections, this is replaced by a GUI option in v15 Isengard
  • <SmallStepBackSeconds> - In v15 the SmallStepBack Action_IDs has been replaced by seek(-7) in default keymaps. See skip steps for details. When the original SmallStepBack action ID is used it defaults to the first backwards additive seeking value.
  • <timeseekforward>/<timeseekbackward> - In v15 these tags are replaced by GUI options via additive seeking, which is configured in the GUI. See skip steps for details.
  • <karaoke> - In v16 all of the karaoke features in Kodi were removed.
  • <useddsfanart> - removed in v17 Krypton.
  • <cachemembuffersize> and <readbufferfactor> - In v17 <cachemembuffersize> is renamed to <memorysize> and <readbufferfactor> is renamed to <readfactor>. In addition, all three buffer related settings in <network> are moved out of <network> and into a new <cache> parent tag.
  • <minvideocachelevel>, <minaudiocachelevel>, and <cacheindvdplayer> have been removed in v17.
  • <useffmpegvda> - Tag was only used for development testing. Removed in v17.
  • <nofliptimeout> - Removed in v17
  • <blackbarcolour> - Removed in v17 (maybe?)
  • <disableswmultithreading> - Removed in v17 (maybe?)
  • <measurerefreshrate> - Removed in v17 or v18?
  • <myth> - Removed sometime between v16 to v18
  • <tuxbox> - Removed
  • <backgroundupdate> - Removed
  • <hideemptyseries> - Replaced by a GUI option.
  • <mymovies> and child tag <categoriestogenres> - Removed
  • <albumssortbyartistthenyear> - Removed
  • <albumformatright> - Removed
  • <remoterepeat> - Removed
  • <allowd3d9ex> and <forced3d9ex> - Removed sometime between v16 to v18
  • <lingertime> - Replaced by a GUI setting in v18
  • <forcevaapienabled> - Removed in v18
  • <promptfulltagscan>false</promptfulltagscan> Removed in v18. Now automatically asked each time a scan is conducted.
  • <controllerdeadzone> - Removed in v17
  • <omxdecodestartwithvalidframe> - This tag is only in some Raspberry Pi specific distributions, such as OpenELEC. As of March 2015, this tag has not been merged into "vanilla" Kodi builds
  • <musicthumbs> Replaced in v19 by the GUI setting Thumbnail image files found in Media -> Music
  • <artistextraart> Replaced in v19 by the GUI setting Artist art types whitelist found in Media -> Music
  • <albumextraart> Replaced in v19 by the GUI setting Album art types whitelist found in Media -> Music
  • <fanart> Removed in v19
  • <assfixedworks> Removed in v20

guisettings.xml Setting Conversion

It is possible to convert settings found in the Settings (guisettings.xml) pages of Kodi into entries for the advancedsettings.xml file.

When a setting from the guisettings.xml is added to the advancedsettings.xml file, it will override the existing guisettings.xml values and the setting will be removed from the settings pages.

Why would I need to do this?

  • You set up multiple devices and then need to individually change settings and preferences on each device. Using this conversion method, you save those settings in the advancedsettings.xml file and simply add the file to each device
  • You need to hide settings to prevent those settings from being modified


To convert a guisetting to advancedsettings.xml follow these steps:

  1. In the Kodi settings pages, adjust the setting(s) to your preference.
  2. Back out of the settings pages to the main menu, which forces Kodi to save the adjusted settings to the guisettings.xml file
  3. Locate the guisettings.xml file in the Userdata folder and open it
  4. Locate the setting(s) to be converted. The list can be overwhelming so make use of the Search feature of whichever editor you are using
  5. Using the following setting as an example:
<setting id="videolibrary.showemptytvshows">true</setting>
Breaking down the string:
videolibrary- parent tag
showemptytvshows- child tag
true- value
The conversion is as follows and place this in the advancedsettings.xml file
<advancedsettings version="1.0">
     <videolibrary>
          <showemptytvshows>true</showemptytvshows>
     </videolibrary>
</advancedsettings>

Note: Some parent tags may already be in use in your advancedsettings.xml file. Do not duplicate them, but add the child tag beneath the existing parent tag.


References