Advancedsettings.xml

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. 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.

Layout
The layout of  is as follows:

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

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

= List of available settings =

jsonrpc
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. 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:

skiploopfilter
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) Example:
 * -16 None
 * 0 Skip only empty frames (default)
 * 8 Skip non-reference frames (default on ATV)
 * 16 Skip bi-dir frames
 * 32 Skip all non-key frames
 * 48 Skip all frames

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

measurerefreshrate
When using "Sync playback to display" on Windows, the detected refreshrate might be wrong. When enabling measurerefreshrate, the refreshrate is measured instead, which makes it more accurate.

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.

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. 1 is typical).

Default: Off

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

Default extensions for VIDEOS: .m4v .3gp .nsv .ts .ty .strm .rm .rmvb .m3u .ifo .mov .qt .divx .xvid .bivx .vob .nrg .img .iso .pva .wmv .asf .asx .ogm .m2v .avi .bin .dat .dvr-ms .mpg .mpeg .mp4 .mkv .avc .vp3 .svq3 .nuv .viv .dv .fli .flv .rar .001 .wpl .zip Examples: 

discstubextensions
A list of additional file-extensions that will ( ) or will not ( ) be treated as disc stubs.

Default extensions for DISC STUBS: .disc

Examples:

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

sorttokens
Allows you to specify additional tokens that will be ignored at the start of lines during sorting.

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  

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

Default:

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:

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:

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  , 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:

cleandatetime
Matches a year number in a string using a Regular Expression

Default expression:
 * 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  </tt> (only a space), the only thing that would be left is Super, which is probably not what you want.

Default expressions:


 * Arguments action="append"</tt> or action="prepend"</tt> 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:


 * Arguments action="append"</tt> or action="prepend"</tt> 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


 * Advanced Method (XBMC v10.05 onwards and Kodi)
 * Supports multi-episode files without season
 * Use an empty pair of parentheses for the season

It is possible to set the default season for specific regular expressions by setting the 'defaultseason' attribute.
 * Specifying Default Season (XBMC v12.0 onwards and Kodi)
 * 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'

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

Default:
 * 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</tt>.

Defaults:


 * Arguments action="append"</tt> or action="prepend"</tt> will insert user specified expressions after, or before, the defaults above. (Further details in moviestacking section)

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

Defaults:


 * Arguments action="append"</tt> or action="prepend"</tt> 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.

videolibrary
Options specific to the Video Library

videoscanner
Options specific to the Video scanner

myth
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.

imageres
This tag is new for v12 (Frodo), replacing.

<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" />

fanartres
This tag is new for v12 (Frodo), replacing.

<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. The default value is 1080.<section end="fanartres description" />

fanart
As of v12 (Frodo), this tag is only used for music and not video.

A list of additional files to try when searching for fanart images. (The defaults are fanart.jpg and fanart.png which can be removed.)

Example:

musicthumbs
A list of additional files to try when searching for music thumbnail images. (The default is folder.jpg which can be removed.)

Example:

useddsfanart
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.

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.




 * Example

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:

playlisttimeout
The timeout, in seconds, before item failure.

Default:

musicdatabase/videodatabase
<section begin="videodatabase" /> Allows advanced customization of the default database settings for both music and video.



type
 * Can be either "sqlite3" or "mysql" (default: sqlite3)


 * host
 * 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
 * sqlite3: silently ignored
 * mysql: defines the port of the mysql socket (default: 3306)


 * name
 * 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
 * sqlite3: silently ignored
 * mysql: defines the user with privileged access to the database


 * pass
 * sqlite3: silently ignored
 * mysql: defines the password for the user with privileged access to the database


 * key
 * Optional SSL setting for MySQL


 * cert
 * Optional SSL setting for MySQL


 * ca
 * Optional SSL setting for MySQL


 * capath
 * Optional SSL setting for MySQL


 * ciphers
 * Optional SSL setting for MySQL

Examples:

1) Configure a database for MySQL.

2) Configure a database for an sqlite database.

<section end="videodatabase" />

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

Default extensions for MUSIC: .nsv .m4a .flac .aac .strm .pls .rm .mpa .wav .wma .ogg .mp3 .mp2 .m3u .mod .amf .669 .dmf .dsm .far .gdm .imf .it .m15 .med .okt .s3m .stm .sfx .ult .uni .xm .sid .ac3 .dts .cue .aif .aiff .wpl .ape .mac .mpc .mp+ .mpp .shn .zip .rar .wv .nsf .spc .gym .adplug .adx .dsp .adp .ymf .ast .afc .hps .xsp

Examples:

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

Default:

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:

musicfilenamefilters
Contains filters to match music information (artist, title etc.) from a tag-less music filename. The first 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:

musiclibrary
Options specific to the Music Library

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 .cbr .rar .m3u

Examples:

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

hosts
Static dns entries which take precedence over your dns server.

airtunesport
<section begin="airtunesport" /> This overwrites the defalt listening port of the AirTunes server (announced via zeroconf).

airplayport
<section begin="airplayport" /> This overwrites the default listening port of the AirPlay server (announced via zeroconf).

packagefoldersize
<section begin="packagefoldersize" />

<section end="packagefoldersize" />

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:

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

remoterepeat
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.

controllerdeadzone
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).

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:

window
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.

allowd3d9ex
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:

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.

forced3d9ex
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.

algorithmdirtyregions
<section begin="algorithmdirtyregions" /> 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.

Example:

nofliptimeout
<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.

<section end="nofliptimeout" /> Example:
 * -1: disabled
 * 0 or higher: timeout in milliseconds (0 is default)

visualizedirtyregions
<section begin="visualizedirtyregions" />Enable dirty-region visualization. Paints a rectangle over marked controls.


 * true: on
 * false: off (Default)

<section end="visualizedirtyregions" /> Example:

showexitbutton
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)

Example:

fullscreen
Starts Kodi in full screen (check resolutions!).

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

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"]".

or
 * For Nvidia and Raspberry Pi
 * For ATI/AMD

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"]".

or
 * For Nvidia
 * For ATI/AMD


 * For Raspberry Pi

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

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

Alternate code.

Recently removed tags

 *   - replaced by <imageres> in v12 Frodo
 *   - replaced by <fanartres> in v12 Frodo
 *   - removed in v12 Frodo
 *   - removed in v12 Frodo
 *   - removed in v13 Gotham
 *   - replaced by a GUI setting in v13 Gotham
 *  , <forceDirectSound>,  ,  ,  , and   - These were various sub-tags for that were removed in v13 Gotham and either replaced by GUI settings or were no longer needed.
 *   - replaced by a GUI option in v14 Helix
 * <videoDisableHi10pMultithreading> - renamed to in v14 Helix
 *   - For both the  and   sections, this is replaced by a GUI option in v15 Isengard
 * <SmallStepBackSeconds> - In v15 the  action ID has been replaced by   in default keymaps. See skip steps for details. When the original   action ID is used it defaults to the first backwards additive seeking value.
 *  /  - In v15 these tags are replaced by GUI options via additive seeking, which is configured in the GUI. See skip steps for details.

guisettings.xml settings
You can also define the settings normally defined in the GUI (and stored in guisettings.xml) in advancedsettings.xml. Most guisettings.xml settings defined in advancedsettings.xml will override the guisettings.xml values, and the settings will be removed completely from the interface.

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.

Then just add that entry to the advancedsettings.xml file.

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:

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.