External players: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ashlar
mNo edit summary
>Ashlar
mNo edit summary
Line 34: Line 34:


<filename/> - should contain the path of the external player executable
<filename/> - should contain the path of the external player executable
<args/> - should contain arguments to pass to the external player executable.
<args/> - should contain arguments to pass to the external player executable.
<hidexbmc/> - win32 only - should contain true or false (default), when true the XBMC window is hidden whist the external player is active
<hidexbmc/> - win32 only - should contain true or false (default), when true the XBMC window is hidden whist the external player is active
<hideconsole/> - win32 only - should contain true or false (default), when true the external player process is started with the initial window hidden (useful for hiding the console when the external player is a batch file)
<hideconsole/> - win32 only - should contain true or false (default), when true the external player process is started with the initial window hidden (useful for hiding the console when the external player is a batch file)
<hidecursor/> - win32 only - should contain true or false (default), when true the cursor is moved to the bottom-right of the screen before the external player is launched
<hidecursor/> - win32 only - should contain true or false (default), when true the cursor is moved to the bottom-right of the screen before the external player is launched
<forceontop/> could be soon removed, its purpose is to remove the XBMC window's ONTOP attribute when the external-player is playing and put it back afterwards; this, in theory isn't needed now as XBMC should do this for itself when it loses focus.
<forceontop/> could be soon removed, its purpose is to remove the XBMC window's ONTOP attribute when the external-player is playing and put it back afterwards; this, in theory isn't needed now as XBMC should do this for itself when it loses focus.


[[category:How To]]
[[category:How To]]

Revision as of 13:03, 7 July 2009

While the built in DVDplayer and PAPlayer 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. Reasons might include improved postprocessing abilities, GPU accelerated video decoding and other special features not (yet) offered by the internal players. Thanks to several brave developers we have a powerful tool at our disposal: the external player option. By simply configuring the playercorefactory.xml file, we can alter the default player for different sources (videos, music, DVDs, etc.).

playercorefactory.xml

XBMC comes with a default playercorefactory.xml, located under the XBMC\System folder (where XBMC is the chosen installation folder).

To customize playback behaviour, users need to create an extra playercorefactory.xml file inside their "\UserData\" folder.
Please consult the plaform specific FAQ for the appropriate location.

Let's start with an example playercorefactory.xml file: <xml> <playercorefactory>

 <players>
   <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files\MPC-HC\mplayerc.exe</filename>
     <args>/fullscreen /close</args>
     <hidexbmc>false</hidexbmc>
     <hideconsole>false</hideconsole>
     <hidecursor>false</hidecursor>
   </player>
 </players>
 <rules action="prepend">
   <rule filetypes="mkv" filename=".*720p.*" player="MPC-HC"/>
 </rules>

</playercorefactory> </xml>

The <players/> node defines all the different players that you wish to add to XBMC. Inside you can have a potentially infinite 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 aready exist and don't accept any configuration). The audio and video (boolean) 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 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.

<filename/> - should contain the path of the external player executable

<args/> - should contain arguments to pass to the external player executable.

<hidexbmc/> - win32 only - should contain true or false (default), when true the XBMC window is hidden whist the external player is active

<hideconsole/> - win32 only - should contain true or false (default), when true the external player process is started with the initial window hidden (useful for hiding the console when the external player is a batch file)

<hidecursor/> - win32 only - should contain true or false (default), when true the cursor is moved to the bottom-right of the screen before the external player is launched

<forceontop/> could be soon removed, its purpose is to remove the XBMC window's ONTOP attribute when the external-player is playing and put it back afterwards; this, in theory isn't needed now as XBMC should do this for itself when it loses focus.