Jun 26, 2017  I used the Lony playercorefactory.xml file to choose the external player I want, dvdplayer o wrapper internal. But the wrapper internal don't work. I choose this and nothing. You can share your file playercorefactory.xml??? Carlos Lorenzo Diaz, Nov 18, 2016 #48. GoldBar Member. Dec 24, 2018  Kodi Playercorefactory Xml; Playercorefactory Xml File. This tutorial will show you the best ways to stream Kodi (XBMC) from your Windows computer to your Google Chromecast The tutorial makes use of a manuscript to stream video clips from Kodi to the Google Chrome web browser then from Chrome to your Chromecast. This is an extra efficient.

  1. File Playercorefactory Xml Code
  2. Playercorefactory Xml For Pc
  3. File Playercorefactory Xml File
  4. Playercorefactory Xml For Vlc

XML documentation comments are a special kind of comment, added above the definition of any user-defined type or member.They are special because they can be processed by the compiler to generate an XML documentation file at compile time.The compiler-generated XML file can be distributed alongside your .NET assembly so that Visual Studio and other IDEs can use IntelliSense to show quick information about types or members. Additionally, the XML file can be run through tools like DocFX and Sandcastle to generate API reference websites.

XML documentation comments, like all other comments, are ignored by the compiler.

You can generate the XML file at compile time by doing one of the following:

  • If you are developing an application with .NET Core from the command line, you can add a GenerateDocumentationFile element to the <PropertyGroup> section of your .csproj project file. You can also specify the path to the documentation file directly using DocumentationFile element. The following example generates an XML file in the project directory with the same root filename as the assembly:

    This is equivalent to the following:

  • If you are developing an application using Visual Studio, right-click on the project and select Properties. In the properties dialog, select the Build tab, and check XML documentation file. You can also change the location to which the compiler writes the file.

  • If you are compiling a .NET application from the command line, add the -doc compiler option when compiling.

XML documentation comments use triple forward slashes (///) and an XML formatted comment body. For example:


Let's walk through documenting a very basic math library to make it easy for new developers to understand/contribute and for third-party developers to use.

Here's code for the simple math library:

The sample library supports four major arithmetic operations (add, subtract, multiply, and divide) on int and double data types.

Now you want to be able to create an API reference document from your code for third-party developers who use your library but don't have access to the source code.As mentioned earlier XML documentation tags can be used to achieve this. You will now be introduced to the standard XML tags the C# compiler supports.

File Playercorefactory Xml Code


The <summary> tag adds brief information about a type or member.I'll demonstrate its use by adding it to the Math class definition and the first Add method. Feel free to apply it to the rest of your code.

The <summary> tag is important, and we recommend that you include it because its content is the primary source of type or member information in IntelliSense or an API reference document.


The <remarks> tag supplements the information about types or members that the <summary> tag provides. In this example, you'll just add it to the class.


The <returns> tag describes the return value of a method declaration.As before, the following example illustrates the <returns> tag on the first Add method. You can do the same on other methods.


The <value> tag is similar to the <returns> tag, except that you use it for properties.Assuming your Math library had a static property called PI, here's how you'd use this tag:


You use the <example> tag to include an example in your XML documentation.This involves using the child <code> tag.

The code tag preserves line breaks and indentation for longer examples.


You use the <para> tag to format the content within its parent tag. <para> is usually used inside a tag, such as <remarks> or <returns>, to divide text into paragraphs.You can format the contents of the <remarks> tag for your class definition.


Still on the topic of formatting, you use the <c> tag for marking part of text as code.It's like the <code> tag but inline. It's useful when you want to show a quick code example as part of a tag's content.Let's update the documentation for the Math class.


By using the <exception> tag, you let your developers know that a method can throw specific exceptions.Looking at your Math library, you can see that both Add methods throw an exception if a certain condition is met. Not so obvious, though,is that integer Divide method throws as well if the b parameter is zero. Now add exception documentation to this method.

The cref attribute represents a reference to an exception that is available from the current compilation environment.This can be any type defined in the project or a referenced assembly. Fifa 14 android commentary. The compiler will issue a warning if its value cannot be resolved.


The <see> tag lets you create a clickable link to a documentation page for another code element. In our next example, we'll create a clickable link between the two Add methods.

The cref is a required attribute that represents a reference to a type or its member that is available from the current compilation environment.This can be any type defined in the project or a referenced assembly.


You use the <seealso> tag in the same way you do the <see> tag. The only difference is that its content is typically placed in a 'See Also' section. Here we'll add a seealso tag on the integer Add method to reference other methods in the class that accept integer parameters:

The cref attribute represents a reference to a type or its member that is available from the current compilation environment.This can be any type defined in the project or a referenced assembly.


Playercorefactory Xml For Pc

You use the <param> tag to describe a method's parameters. Here's an example on the double Add method:The parameter the tag describes is specified in the requiredname attribute.



You use <typeparam> tag just like the <param> tag but for generic type or method declarations to describe a generic parameter.Add a quick generic method to your Math class to check if one quantity is greater than another.


Sometimes you might be in the middle of describing what a method does in what could be a <summary> tag, and you might want to make a reference to a parameter. The <paramref> tag is great for just this. Let's update the summary of our double based Add method. Like the <param> tag, the parameter name is specified in the requiredname attribute.


You use <typeparamref> tag just like the <paramref> tag but for generic type or method declarations to describe a generic parameter.You can use the same generic method you previously created.


You use the <list> tag to format documentation information as an ordered list, unordered list, or table. Make an unordered list of every math operation your Math library supports.

You can make an ordered list or table by changing the type attribute to number or table, respectively.


You can use the <inheritdoc> tag to inherit XML comments from base classes, interfaces, and similar methods. This eliminates unwanted copying and pasting of duplicate XML comments and automatically keeps XML comments synchronized.

Put it all together

If you've followed this tutorial and applied the tags to your code where necessary, your code should now look similar to the following:

From your code, you can generate a detailed documentation website complete with clickable cross-references. But you're faced with another problem: your code has become hard to read.There's so much information to sift through that this is going to be a nightmare for any developer who wants to contribute to this code.Thankfully there's an XML tag that can help you deal with this:


The <include> tag lets you refer to comments in a separate XML file that describe the types and members in your source code, as opposed to placing documentation comments directly in your source code file.

Now you're going to move all your XML tags into a separate XML file named docs.xml. Feel free to name the file whatever you want.

In the above XML, each member's documentation comments appear directly inside a tag named after what they do. You can choose your own strategy.Now that you have your XML comments in a separate file, let's see how your code can be made more readable by using the <include> tag:

And there you have it: our code is back to being readable, and no documentation information has been lost.

The file attribute represents the name of the XML file containing the documentation.

The path attribute represents an XPath query to the tag name present in the specified file.

The name attribute represents the name specifier in the tag that precedes the comments.

The id attribute, which can be used in place of name, represents the ID for the tag that precedes the comments.

User-defined tags

All the tags outlined above represent those that are recognized by the C# compiler. However, a user is free to define their own tags.Tools like Sandcastle bring support for extra tags like <event> and <note>,and even support documenting namespaces.Custom or in-house documentation generation tools can also be used with the standard tags and multiple output formats from HTML to PDF can be supported.


Documenting code is recommended for many reasons. What follows are some best practices, general use case scenarios, and things that you should know when using XML documentation tags in your C# code.

  • For the sake of consistency, all publicly visible types and their members should be documented. If you must do it, do it all.
  • Private members can also be documented using XML comments. However, this exposes the inner (potentially confidential) workings of your library.
  • At a bare minimum, types and their members should have a <summary> tag because its content is needed for IntelliSense.
  • Documentation text should be written using complete sentences ending with full stops.
  • Partial classes are fully supported, and documentation information will be concatenated into a single entry for that type.
  • The compiler verifies the syntax of the <exception>, <include>, <param>, <see>, <seealso>, and <typeparam> tags.
  • The compiler validates the parameters that contain file paths and references to other parts of the code.

See also

21 Aug 2020 - The wiki is undergoing a major cleanup. If you arrived here from a search engine and cannot find the page, please use the wiki search instead (top right corner of page)
More info can be found on the forum

This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions.

While the built in video and audio players are capable, out of the box, to handle a huge variety of content, users might find themselves in need of using a different playback software but still using Kodi for scraping and organizing content. Reasons might include improved post-processing abilities, DRM restricted media that requires a specific player (such as encrypted Blu-ray discs), special player-specific features, etc. Kodi has a powerful tool to achieve this, the external player. The current method involves the configuration of a playercorefactory.xml file.

  • 2Examples
    • 2.2Ubuntu

1 Set up

Kodi comes with a default playercorefactory.xml file, located under the Kodi/System folder (where Kodi is the chosen installation folder).

To customize playback behaviour, users need to create an extra playercorefactory.xml file inside their userdata folder.

Let's start with an example playercorefactory.xml file: Para ordnance serial number years.

The <players/> node (i.e. <players>..<players/>) defines all the different players that you wish to add to Kodi. Inside you can have any number of <player/> nodes, defining as many external players as you wish (the builtin ones being dvdplayer and paplayer, you can also use the aliases audiodefaultplayer, videodefaultplayer, videodefaultdvdplayer).

The player name attribute can be anything you like and will appear in the 'Play using..' menu, accessible from the context menu.For an external player the type attribute must be ExternalPlayer. The other possible values being dvdplayer and paplayer, although there's no point defining one of those as they already exist and don't accept any configuration. The audio and video (boolean; true/false) attributes when true will cause the player to always appear in the 'Play using..' menu even if you don't define any rules for the player, or no rules match the currently selected media item (e.g. video file) for the player.You could, for instance, define a player with video='true' and then not tie it to any specific rule, thus creating some sort of 'safety net', always available in the context menu, should you ever need it.

The only required node for a player with typeExternalPlayer is the <filename/> node, this should contain the path of the external player executable. The other, optional, nodes are

Name Value Use
args Arguments to pass to the external player executable.

If this contains the token {0} then this is replaced with the full URI of the item to be played (note that this is, in many cases, Kodi-specific and your external player won't understand it).
A {1} token is also replaced with the URI of the item to be played, but with the following differences

  • For rar and zip files {1} is the path of the archive and {2} will be the relative path to the file in the archive
  • On win32 smb-URIs (smb://host/path) are converted into UNCs (hostpath)
  • For LiveTV streams/files the pvr:// type url is not translated and {1} still returns the Kodi-specific URI which will not be interpretable by the external player

NOTE you should surround these tokens with double-quotes (e.g. '{1}') unless you know what you're doing and have a good reason not to, as they may contain spaces.
If none of these tokens are present then it's equivalent to having '{1} at the end.

whether to hide the Kodi window whilst the external player is active
Win32 only - whether the external player process is started with the initial window hidden (useful for hiding the console when the external player is a batch file)
Win32 only - whether and where to move the cursor to before the external player is launched
playcountminimumtimenumber of seconds the time the extplayer process needs to run for before the item's playcount will be incremented (i.e. it will be marked as watched)
whether playback should stop after playing one item that's part of a stack

Once a user has defined one or more external player, they have the option of adding rules to customize which files are handled by which players. The above example, for instance, defines the MPC-HC external player as the default player for MKV files with '720p' in their filename. .* before and after '720p' is a regular expression (regex).

  • . 'Matches any single character.'
  • * 'Matches the preceding element zero or more times.'

Together they mean 'Matches any single character (.) zero or more times (*)'.

A <rules/> node contains a set of rules. An (optional) action attribute can have a value of prepend, append or overwrite which specifies whether the rules should be prepended, appended (the default if no action is specified) or replace all existing rules. Appended rules will take precedence over default players (i.e. DVDPlayer for video and PAPlayer for audio) but not over Kodis builtin rules. [needs better/more complete explanation]

A <rule/> node compares its attributes against the attributes of a media item and if everything matches then the player names in the player attribute is the default player for the media item (you can still select another using the 'Play using..' menu). The attributes are listed below. Order of <rule/>s is significant [needs clarification], the first match defines the player so order them from more-to-less specific.

<rule/>s can be nested with inner rules inheriting attributes from outer rules, with inner rules being checked before outer rules. For example:

says that all video should be played by wmplayer, except DVDs, that are played with (the builtin) dvdplayer, and .mkv files that are played with VLC, however .mkv files with '720' or '1080' in their names are played with MPC-HC (all assuming wmplayer, VLC and MPC-HC players are defined in the players section).

The following attributes can be used to build rules:

Attribute Type Value
internetstream boolean when true the rule applies to internet streams
remote boolean when true the rule applies to remote-only (non-local) media
audio boolean when true the rule applies to audio-only media
video boolean when true the rule applies to video media
dvd boolean when true the rule applies to DVDs
dvdimage boolean when true the rule applies to DVD images (iso)
dvdfile boolean when true the rule applies to DVD folder structures
protocols regexp when defined the rule applies to items whose (URI) protocol matches; as well as 'real' protocols like daap, rtv, rtsp Kodi also uses the URI protocol for things like zip, rar etc.
filetypes regexp when defined the rule applies to items whose file extension matches
mimetypes regexp when defined the rule applies to items whose mime-type matches
filename regexp when defined the rule applies to items whose filename matches
player string the name of the player defined in the <players> section this rule invokes

For the regexp attributes you can specify alike with a -separator, e.g. mkv avi divx ('The choice operator matches either the expression before or the expression after the operator').

The following attributes are also available for video items with metadata (a.k.a. flagging):

Attribute Type Value
videocodec regexp matched against the video codec so, a rule could used xvid divx div3 div4 div5
videoresolution regexp matched against the video resolution, which will be one of 480, 540, 720 or 1080
videoaspect boolean matched against the video aspect ratio, which will be one of 1.33, 1.66, 1.78, 1.85, 2.20 or 2.35
audiocodec regexp matched against the audio codec, e.g. ac3 dts
audiochannels regexp matched against the number of channels in the audio which will be an integer (i.e. 6 rather than 5.1)

2 Examples

On Kodi for Android running on TI OMAP pandaboard I was able to take advantage of hw acceleration by changing /data/data/org.xbmc.kodi/cache/apk/assets/system/playercorefactory.xml to launch Gallery on mp4 files as follows:

File Playercorefactory Xml File

2.1 Android

I tested this only very lightly but it improved playback smoothness and obviously reduced cpu load. ymmv.

2.2 Ubuntu

There are cross-platform standalone video players which are supported by Kodi. Hereunder are two of them. The Full-screen option has been added, otherwise you will have a windowed video player.

2.2.1 VLC

2.2.2 MPV

3 See also


Playercorefactory Xml For Vlc

Retrieved from 'https://kodi.wiki/index.php?title=External_players&oldid=217208'