Archive:DSPlayer: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>0wing
No edit summary
No edit summary
 
(43 intermediate revisions by 8 users not shown)
Line 1: Line 1:
DSPlayer is a DirectShow based player for XBMC.DSPlayer support DXVA hardware acceleration (works in Windows XP, Vista and 7), as well as any custom directshow filters (ffdshow, ac3filter, haali media splitter ...).
{{divbox|orange||{{big|'''NOTICE:''' This is considered an advanced (complicated) and experimental feature. DSPlayer builds are not official XBMC builds.}} }}
<section begin="intro" />DSPlayer is a [http://en.wikipedia.org/wiki/DirectShow DirectShow] based player for XBMC. DSPlayer support DXVA hardware acceleration (works in Windows Vista and higher), as well as any custom DirectShow filters (e.g. [http://forum.doom9.org/showthread.php?t=156191 LAV filters], [http://en.wikipedia.org/wiki/Ffdshow ffdshow], [http://en.wikipedia.org/wiki/AC3Filter ac3filter]).<section end="intro" />


New builds can be found [http://forum.xbmc.org/showthread.php?t=106629 here]. And the source [https://github.com/0wing/xbmc here].
== Unofficial builds with DSPlayer ==
'''Updated on 2012/11/04:'''


==Installing==
The original XBMC-DSPlayer was abandoned, and the development of DSPlayer branch was taken over by a Russian developer known as Eduard_K, who introduced a number of improvements over the original XBMC DSPlayer code. You can find his code [http://git.avmedia.su/git/?p=xbmc.git;a=summary here]. Compiled binary installers are posted from time to time in [http://forum.kodi.tv/showthread.php?tid=154534 this forum thread].
Installing dsplayer is the same thing that installing XBMC. Grab the installer from [http://forum.xbmc.org/showthread.php?t=106629 this thread](Usually, lastest revision is better), and run the setup.


Note: you don't need to uninstall previous versions of XBMC. However, some users reported that installing dsplayer over an existing installation of xbmc cause unexpected behavior.
'''Main features of XBMC-DSPlayer by Eduard_K:'''
 
- Based on Frodo 12.x code.
 
- Ability to enable DSPlayer as the default player via GUI (no more config tweaking).
 
- More reliable filter graph building for different filter/codecs combination.
 
- Ability to use default system filters ("Windows Media Player style") without creating XML configs (good option for beginners).
 
- Blu-ray title and MKV edition choice dialogs (only with [http://avsplitter.avmedia.su/en AVSplitter], also developed by Eduard_K).
 
- Support for iMon VFD/LCD displays.
 
'''Note:''' Older XBMC-DSPlayer builds by Eduard_K used to use slightly different Video Database format than regular XBMC builds, so the best practice to migrate to XBMC-DSPlayer or back was to export your Video library in one file (one folder, actually), then delete Video DB file in [[Userdata|userdata folder]] and then import your Video library back for XBMC to create correct Video DB file. Now this is no this is no longer necessary.
 
'''Updated on 2013/02/28:''' In the recent builds, starting from 2013/02/26, XBMC-DSplayer have Video DB format compatible with other Frodo builds. DSplayer-specific data are stored in a separate database. If you use a central MySQL database for multiple XBMC instances, for DSplayer your need to add the following options in your [[advancedsettings.xml]] config:
<dsplayerdatabase>
  <type>mysql</type>
  <host>x.x.x.x</host>
  <port>3306</port>
  <user>xbmc</user>
  <pass>xbmc</pass>
</dsplayerdatabase>
Where x.x.x.x - the IP of your MySQL server. You might also need to add appropriate permissions in MySQL Server for DSplayer to access its database.
 
== Installing ==
Installing DSPlayer is the same thing that installing XBMC. Grab the installer from [http://forum.kodi.tv/showthread.php?tid=154534 this thread](Usually, lastest revision is better), and run the setup.
 
Note: you don't need to uninstall previous versions of XBMC. However, some users reported that installing DSPlayer over an existing installation of xbmc cause unexpected behavior.


Now, dsplayer should be installed, still a few step to be able to use it.
Now, dsplayer should be installed, still a few step to be able to use it.
==Configuring==
 
n order to use dsplayer, you need to edit a configuration file to tell dsplayer which filters using when playing your files. To do that, you have to edit two XML files, named '''filtersconfig.xml''' and '''mediasconfig.xml'''. These files are located in '''system/players/dsplayer'''. However, if you want to add some filters or media rules, the best is to create your own XML file in the [http://wiki.xbmc.org/index.php?title=The_UserData_Folder userdata] folder. The XML files must be in a '''dsplayer''' folder. You should have something like that : ''C:\Users\XXX\AppData\Roaming\XBMC\userdata\dsplayer\filterconfig.xml''. The filters or rules declared on the '''userdata''' folder overrides those declared in the '''system''' folder. You can see at the bottom of the page the default XML files.
== Using DSPlayer with XBMC ==
Three ways for using DSPlayer :
* In the recent builds you can enable DSplayer via XBMC GUI by selecting "'''Use as the default video player'''" in DSplayer settings.
* You can right click on the media file, select '''Play with''' and choose '''DSPlayer'''. If you don't use the mouse, press '''c''' in order to pop up the context menu.
* You can also make DSPlayer your default player in editing the [http://wiki.xbmc.org/index.php?title=Advancedsettings.xml advancedsettings.xml] file like that :
<advancedsettings>
  <video>
  <defaultplayer>dsplayer</defaultplayer>
  </video>
</advancedsettings>
 
'''Note:''' this is no longer necessary, as DSplayer can be enabled via XBMC GUI.
* You can also use the [http://wiki.xbmc.org/index.php?title=HOW-TO_use_an_External_Player_for_media_playback playercorefactory.xml] file for fine tuning the extensions
 
== Configuring ==
'''Updated on 2013/02/26:''' The information below is still valid. However, the current DSplayer builds can work in simplified "Windows MediaPlayer style" mode, automatically picking appropriate system DirectShow filters with highest merits, thus eliminating the need for XML config tweaking, which may be difficult for inexperienced users. To enable this mode simply check the option "'''Use system filters (DirectShow merits)'''".
 
Note: you still need to install appropriate filters (splitters/decoders) in your system. AVsplitter + LAV Filters Audio/Video (uncheck LAV splitter during installation) would be a good choice. Don't forget to enable DXVA in LAV Video and set up an appropriate sound output mode in LAV Audio settings (e.g. enable DD/DTS bitstreaming if your system is connected to an AV-receiver).
 
In order to use DSPlayer, you need to edit a configuration file to tell DSPlayer which filters using when playing your files. To do that, you have to edit two XML files, named '''filtersconfig.xml''' and '''mediasconfig.xml'''. These files are located in '''system/players/dsplayer'''. However, if you want to add some filters or media rules, the best is to create your own XML file in the [http://wiki.xbmc.org/index.php?title=The_UserData_Folder userdata] folder. The XML files must be in a '''dsplayer''' folder. You should have something like that : ''C:\Users\XXX\AppData\Roaming\XBMC\userdata\dsplayer\filterconfig.xml''. The filters or rules declared on the '''userdata''' folder overrides those declared in the '''system''' folder. You can see at the bottom of the page the default XML files.


'''WARNING:''' You must have basic knowledge of XML. If that's not your case, the best is to go [http://www.w3schools.com/xml/xml_tree.asp here] before!
'''WARNING:''' You must have basic knowledge of XML. If that's not your case, the best is to go [http://www.w3schools.com/xml/xml_tree.asp here] before!


Let's now see how the '''filtersconfig.xml''' and '''mediasconfig.xml''' files look like. First of all, the '''filtersconfig.xml''' file.
Let's now see how the '''filtersconfig.xml''' and '''mediasconfig.xml''' files look like. First of all, the '''filtersconfig.xml''' file.
==='''Filters declaration'''===
=== Filters declaration ===
Note: the '''filtersconfig.xml''' file must starts with '''<filtersconfig>''' and ends with '''</filtersconfig>'''
Note: the '''filtersconfig.xml''' file must starts with '''<filtersconfig>''' and ends with '''</filtersconfig>'''


Let's see how to declare a filter in dsplayer.
Let's see how to declare a filter in DSPlayer.


   <filter name="mkvsource" type="source">
   <filter name="mkvsource" type="source">
Line 25: Line 74:
     <osdname>MKV Source</osdname>
     <osdname>MKV Source</osdname>
   </filter>
   </filter>
Contrary to other players, dsplayer doesn't need filters to be registered in order to use it.
Contrary to other players, DSPlayer doesn't need filters to be registered in order to use it.


A filter declaration always starts with the '''filter''' tag :
A filter declaration always starts with the '''filter''' tag :
Line 31: Line 80:
   </filter>
   </filter>
he '''type''' attribute must be one of the following, depending of what type of filter you want to add:
he '''type''' attribute must be one of the following, depending of what type of filter you want to add:
*'''source'''
* '''source'''
*'''splitter'''
* '''splitter'''
*'''videodec'''
* '''videodec'''
*'''audiodec'''
* '''audiodec'''
*'''extra'''
* '''extra'''
The '''name''' attribute is mandatory. We'll see in the next section its role. Be careful, don't use space in the filter name, only letters and number.
The '''name''' attribute is mandatory. We'll see in the next section its role. Be careful, don't use space in the filter name, only letters and number.


We now need to specify another mandatory tag, the '''guid''' tag. A GUID (Globally Unique Identifier) is an unique identifier which allow media players to load filters. You '''need''' the guid of you filter in order to use it with dsplayer. Some examples of popular filters guid :
We now need to specify another mandatory tag, the '''guid''' tag. A GUID (Globally Unique Identifier) is an unique identifier which allow media players to load filters. You '''need''' the guid of you filter in order to use it with DSPlayer. Some examples of popular filters guid :
*ffdshow video decoder : {04FE9017-F873-410E-871E-AB91661A4EF7}
* ffdshow video decoder : {04FE9017-F873-410E-871E-AB91661A4EF7}
*ffdshow audio decoder : {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
* ffdshow audio decoder : {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
*haali media splitter : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}
* haali media splitter : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}
You can find '''guid''' on the internet, or on the website of the filter.
You can find '''guid''' on the internet, or on the website of the filter.


Line 54: Line 103:
   </filter>
   </filter>
Ok, now, two choices :
Ok, now, two choices :
*The filter is registered on the system. You're done with the filter configuration, congratulations!
* The filter is registered on the system. You're done with the filter configuration, congratulations!
*The filter is '''not''' registered on the system. You need to add the '''path''' tag to your filter configuration :
* The filter is '''not''' registered on the system. You need to add the '''path''' tag to your filter configuration :
   <filter name="name_of_filter" type="type_of_filter">
   <filter name="name_of_filter" type="type_of_filter">
   <path>C:\MyFilter.ax</path>
   <path>C:\MyFilter.ax</path>
Line 67: Line 116:
  </filters>
  </filters>
You know how to add a filter, let's see how use that filter with a media file using the '''mediasconfig.xml'''
You know how to add a filter, let's see how use that filter with a media file using the '''mediasconfig.xml'''
==='''Associate media files with filters'''===
=== Associate media files with filters ===
Note: the '''mediasconfig.xml''' file must starts with '''<mediasconfig>''' and ends with '''</mediasconfig>'''
Note: the '''mediasconfig.xml''' file must starts with '''<mediasconfig>''' and ends with '''</mediasconfig>'''


To render a file, dsplayer need '''four''' filters :
To render a file, DSPlayer needs '''four''' filters :
*A source filter, which reads the media file
* A source filter, which reads the media file
*A splitter filter, which splits the video and audio(s) streams
* A splitter filter, which splits the video and audio(s) streams
*A video decoder filter, which decodes the video stream
* A video decoder filter, which decodes the video stream
*An audio decoder filter, which decodes the audio(s) stream(s)
* An audio decoder filter, which decodes the audio(s) stream(s)
In many cases, the '''source''' filter is also the '''splitter''' filter. But in some cases (like '''rar''' playing), the '''source''' and '''splitter''' filters are different.
In many cases, the '''source''' filter is also the '''splitter''' filter. But in some cases (like '''rar''' playing), the '''source''' and '''splitter''' filters are different.


You must specify at least '''four''' filters (a source, a splitter, a video decoder, an audio decoder) in order to add a new extension to dsplayer.
You must specify at least '''four''' filters (a source, a splitter, a video decoder, an audio decoder) in order to add a new extension to DSPlayer.


New extensions are added like that :
New extensions are added like that :
Line 92: Line 141:
   ....
   ....
  </rules>
  </rules>
==='''Extra filters'''===
=== Extra filters ===
You can also add '''extra''' filters to the graph. These are filters like AC3Filter, Equalizer, ... Just add an '''extra''' tag to your media declaration, like that :
You can also add '''extra''' filters to the graph. These are filters like AC3Filter, Equalizer, ... Just add an '''extra''' tag to your media declaration, like that :
   <rule filetypes="mkv">
   <rule filetypes="mkv">
Line 105: Line 154:
   </rule>
   </rule>
NOTE: Of course, the extra filter needs to be declared in '''filtersconfig.xml''' first!
NOTE: Of course, the extra filter needs to be declared in '''filtersconfig.xml''' first!
==='''Rule-based filter's selection'''===
=== Rule-based filter's selection ===
Starting with revision 27937-update, dsplayer supports rule-based filter's selection, using the same convention that the [http://wiki.xbmc.org/index.php?title=HOW-TO_use_an_External_Player_for_media_playback playercorefactory.xml]. You can now select filters using rule based on filename, video / audio codec, dxva, ...
Starting with revision 27937-update, DSPlayer supports rule-based filter's selection, using the same convention that the [http://wiki.xbmc.org/index.php?title=HOW-TO_use_an_External_Player_for_media_playback playercorefactory.xml]. You can now select filters using rule based on filename, video / audio codec, dxva, ...


Here an example :
Here an example :
Line 126: Line 175:




==='''Shaders support '''===
=== Shaders support ===
Starting with r33843, you can now use pixel shaders from mediasconfig.xml. The shaders are declarated in the '''shaders.xml''' file, located at system/players/dsplayer/Shaders/shaders.xml. Each shader has an '''id'''. That's this '''id''' which will be used to track the shader.
Starting with r33843, you can now use pixel shaders from mediasconfig.xml. The shaders are declarated in the '''shaders.xml''' file, located at system/players/dsplayer/Shaders/shaders.xml. Each shader has an '''id'''. That's this '''id''' which will be used to track the shader.


Line 147: Line 196:




==='''Renderer settings'''===
=== Renderer settings ===
Starting with revision 31004, you can now change some default settings of the renderer with an xml file named '''renderersettings.xml''', and located in '''userdata\dsplayer\renderersettings.xml'''.
Starting with revision 31004, you can now change some default settings of the renderer with an xml file named '''renderersettings.xml''', and located in '''userdata\dsplayer\renderersettings.xml'''.


Line 231: Line 280:
|This setting must have the following structure:<br /><width>integer</width> <height>integer</height>
|This setting must have the following structure:<br /><width>integer</width> <height>integer</height>
|}
|}
==External links==
*[http://sourceforge.net/apps/mediawiki/mpc-hc/index.php?title=New_Renderer_Settings MPCHC Wiki] – Media Player Classic Home Cinema Wiki


==Using DSPlayer with XBMC==
== External links ==
Three ways for using DSPlayer :
* [http://sourceforge.net/apps/mediawiki/mpc-hc/index.php?title=New_Renderer_Settings MPCHC Wiki] – Media Player Classic Home Cinema Wiki
*You can right click on the media file, select '''Play with''' and choose '''DSPlayer'''. If you don't use the mouse, press '''c''' in order to pop up the context menu.
 
*You can also make DSPlayer your default player in editing the [http://wiki.xbmc.org/index.php?title=Advancedsettings.xml advancedsettings.xml] file like that :
== Examples ==
<advancedsettings>
  <video>
  <defaultplayer>dsplayer</defaultplayer>
  </video>
</advancedsettings>
*You can also use the [http://wiki.xbmc.org/index.php?title=HOW-TO_use_an_External_Player_for_media_playback playercorefactory.xml] file for fine tuning the extensions
==Examples==


==='''Using ffdshow instead of mpcvideodec for mkv'''===
=== Using ffdshow instead of mpcvideodec for mkv ===
'''ffdshow''' is already declared in the '''mediasconfig.xml''' shipped with dsplayer. The only things you need to do is to find the '''rule''' tag for '''mkv''' file, and change
'''ffdshow''' is already declared in the '''mediasconfig.xml''' shipped with DSPlayer. The only things you need to do is to find the '''rule''' tag for '''mkv''' file, and change
  <video filter="mpcvideodec" />
  <video filter="mpcvideodec" />
to
to
Line 260: Line 300:
     </rule>
     </rule>


==='''Using Haali Media Splitter for mkv'''===
=== Using Haali Media Splitter for mkv ===
In this subsection, we assume that '''Haali Media Splitter''' is installed on the system.
In this subsection, we assume that '''Haali Media Splitter''' is installed on the system.


Line 283: Line 323:
     </rule>
     </rule>


==Troubleshooting==
== Troubleshooting ==


==='''"Failed to load external filter"'''===
=== "Failed to load external filter" ===
If your debug log shows "Failed to load external filter", please do the following :
If your debug log shows "Failed to load external filter", please do the following :
*Please check if the file exists (use the '''path''' in the log)
* Please check if the file exists (use the '''path''' in the log)
*If you are using ffdshow, you need to make sure XBMC is in the white list. See [http://ffdshow-tryout.sourceforge.net/wiki/video:directshow_control here] for more details. You'll need to make the change in the three ffdshow filters ('''dxva''', '''video''' and '''audio''')
* If you are using ffdshow, you need to make sure XBMC is in the white list. See [http://ffdshow-tryout.sourceforge.net/wiki/video:directshow_control here] for more details. You'll need to make the change in the three ffdshow filters ('''dxva''', '''video''' and '''audio''')
==How-to: Retrieve a filter's guid==
== How-to: Retrieve a filter's guid ==
This section works only if the filter is registered on your system. If not, look on the internet for the guid.
This section works only if the filter is registered on your system. If not, look on the internet for the guid.


Line 303: Line 343:




==Complete XML files (updated 2010/06/04)==
== Complete XML files (updated 2010/06/04) ==
==='''filtersconfig.xml '''===
=== filtersconfig.xml ===
  <filtersconfig>
  <filtersconfig>
   <filters>
   <filters>
     <!-- You dont need a path if your filter is registered -->
     <!-- You dont need a path if your filter is registered -->
 
     <!-- Video decoders -->
     <!-- Video decoders -->
     <filter name="mpcvideodec" type="videodec">
     <filter name="mpcvideodec" type="videodec">
Line 350: Line 389:
       <osdname>Broadcom VideoDecoder</osdname>
       <osdname>Broadcom VideoDecoder</osdname>
     </filter>
     </filter>
 
     <!-- Audio decoders -->
     <!-- Audio decoders -->
     <filter name="mpaaudiodec" type="audiodec">
     <filter name="mpaaudiodec" type="audiodec">
Line 371: Line 409:
       <osdname>RealAlternative Audio Decoder</osdname>
       <osdname>RealAlternative Audio Decoder</osdname>
     </filter>
     </filter>
 
     <!-- Audio Stream Switcher-->
     <!-- Audio Stream Switcher-->
     <filter name="audioswitcher" type="audioswitch">
     <filter name="audioswitcher" type="audioswitch">
Line 378: Line 415:
       <alwaysload>1</alwaysload>
       <alwaysload>1</alwaysload>
     </filter>
     </filter>
 
     <!-- Extra filters -->
     <!-- Extra filters -->
     <filter name="dcgraphiceq" type="extra">
     <filter name="dcgraphiceq" type="extra">
Line 389: Line 425:
       <osdname>AC3Filter</osdname>
       <osdname>AC3Filter</osdname>
     </filter>
     </filter>
 
     <!-- Source filters -->
     <!-- Source filters -->
     <filter name="dvdnavigator" type="source">
     <filter name="dvdnavigator" type="source">
Line 441: Line 476:
       <osdname>Haali Media Splitter</osdname>
       <osdname>Haali Media Splitter</osdname>
     </filter>
     </filter>
 
     <!-- Splitters -->
     <!-- Splitters -->
     <filter name="avisplitter" type="splitter">
     <filter name="avisplitter" type="splitter">
Line 484: Line 518:
  </filtersconfig>
  </filtersconfig>


==='''mediasconfig.xml'''===
=== mediasconfig.xml ===
  <mediasconfig>
  <mediasconfig>
   <rules>
   <rules>

Latest revision as of 10:22, 19 July 2020

DSPlayer is a DirectShow based player for XBMC. DSPlayer support DXVA hardware acceleration (works in Windows Vista and higher), as well as any custom DirectShow filters (e.g. LAV filters, ffdshow, ac3filter).

Unofficial builds with DSPlayer

Updated on 2012/11/04:

The original XBMC-DSPlayer was abandoned, and the development of DSPlayer branch was taken over by a Russian developer known as Eduard_K, who introduced a number of improvements over the original XBMC DSPlayer code. You can find his code here. Compiled binary installers are posted from time to time in this forum thread.

Main features of XBMC-DSPlayer by Eduard_K:

- Based on Frodo 12.x code.

- Ability to enable DSPlayer as the default player via GUI (no more config tweaking).

- More reliable filter graph building for different filter/codecs combination.

- Ability to use default system filters ("Windows Media Player style") without creating XML configs (good option for beginners).

- Blu-ray title and MKV edition choice dialogs (only with AVSplitter, also developed by Eduard_K).

- Support for iMon VFD/LCD displays.

Note: Older XBMC-DSPlayer builds by Eduard_K used to use slightly different Video Database format than regular XBMC builds, so the best practice to migrate to XBMC-DSPlayer or back was to export your Video library in one file (one folder, actually), then delete Video DB file in userdata folder and then import your Video library back for XBMC to create correct Video DB file. Now this is no this is no longer necessary.

Updated on 2013/02/28: In the recent builds, starting from 2013/02/26, XBMC-DSplayer have Video DB format compatible with other Frodo builds. DSplayer-specific data are stored in a separate database. If you use a central MySQL database for multiple XBMC instances, for DSplayer your need to add the following options in your advancedsettings.xml config:

<dsplayerdatabase>
 <type>mysql</type>
 <host>x.x.x.x</host>
 <port>3306</port>
 <user>xbmc</user>
 <pass>xbmc</pass>
</dsplayerdatabase> 

Where x.x.x.x - the IP of your MySQL server. You might also need to add appropriate permissions in MySQL Server for DSplayer to access its database.

Installing

Installing DSPlayer is the same thing that installing XBMC. Grab the installer from this thread(Usually, lastest revision is better), and run the setup.

Note: you don't need to uninstall previous versions of XBMC. However, some users reported that installing DSPlayer over an existing installation of xbmc cause unexpected behavior.

Now, dsplayer should be installed, still a few step to be able to use it.

Using DSPlayer with XBMC

Three ways for using DSPlayer :

  • In the recent builds you can enable DSplayer via XBMC GUI by selecting "Use as the default video player" in DSplayer settings.
  • You can right click on the media file, select Play with and choose DSPlayer. If you don't use the mouse, press c in order to pop up the context menu.
  • You can also make DSPlayer your default player in editing the advancedsettings.xml file like that :
<advancedsettings>
 <video>
  <defaultplayer>dsplayer</defaultplayer>
 </video>
</advancedsettings>

Note: this is no longer necessary, as DSplayer can be enabled via XBMC GUI.

Configuring

Updated on 2013/02/26: The information below is still valid. However, the current DSplayer builds can work in simplified "Windows MediaPlayer style" mode, automatically picking appropriate system DirectShow filters with highest merits, thus eliminating the need for XML config tweaking, which may be difficult for inexperienced users. To enable this mode simply check the option "Use system filters (DirectShow merits)".

Note: you still need to install appropriate filters (splitters/decoders) in your system. AVsplitter + LAV Filters Audio/Video (uncheck LAV splitter during installation) would be a good choice. Don't forget to enable DXVA in LAV Video and set up an appropriate sound output mode in LAV Audio settings (e.g. enable DD/DTS bitstreaming if your system is connected to an AV-receiver).

In order to use DSPlayer, you need to edit a configuration file to tell DSPlayer which filters using when playing your files. To do that, you have to edit two XML files, named filtersconfig.xml and mediasconfig.xml. These files are located in system/players/dsplayer. However, if you want to add some filters or media rules, the best is to create your own XML file in the userdata folder. The XML files must be in a dsplayer folder. You should have something like that : C:\Users\XXX\AppData\Roaming\XBMC\userdata\dsplayer\filterconfig.xml. The filters or rules declared on the userdata folder overrides those declared in the system folder. You can see at the bottom of the page the default XML files.

WARNING: You must have basic knowledge of XML. If that's not your case, the best is to go here before!

Let's now see how the filtersconfig.xml and mediasconfig.xml files look like. First of all, the filtersconfig.xml file.

Filters declaration

Note: the filtersconfig.xml file must starts with <filtersconfig> and ends with </filtersconfig>

Let's see how to declare a filter in DSPlayer.

 <filter name="mkvsource" type="source">
   <path>MatroskaSplitter.ax</path>
   <guid>{0A68C3B5-9164-4A54-AFAF-995B2FF0E0D4}</guid>
   <osdname>MKV Source</osdname>
 </filter>

Contrary to other players, DSPlayer doesn't need filters to be registered in order to use it.

A filter declaration always starts with the filter tag :

 <filter name="name_of_filter" type="type_of_filter">
 </filter>

he type attribute must be one of the following, depending of what type of filter you want to add:

  • source
  • splitter
  • videodec
  • audiodec
  • extra

The name attribute is mandatory. We'll see in the next section its role. Be careful, don't use space in the filter name, only letters and number.

We now need to specify another mandatory tag, the guid tag. A GUID (Globally Unique Identifier) is an unique identifier which allow media players to load filters. You need the guid of you filter in order to use it with DSPlayer. Some examples of popular filters guid :

  • ffdshow video decoder : {04FE9017-F873-410E-871E-AB91661A4EF7}
  • ffdshow audio decoder : {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
  • haali media splitter : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}

You can find guid on the internet, or on the website of the filter.

Now, we have our filter guid :

 <filter name="name_of_filter" type="type_of_filter">
  <guid>{00000000-0000-0000-0000-000000000000}</guid>
 </filter>

What's next? We need to give the filter a name (shown in xbmc when pressing the i key), using the osdname tag, like that :

 <filter name="name_of_filter" type="type_of_filter">
  <guid>{00000000-0000-0000-0000-000000000000}</guid>
  <osdname>My Filter Name</osdname>
 </filter>

Ok, now, two choices :

  • The filter is registered on the system. You're done with the filter configuration, congratulations!
  • The filter is not registered on the system. You need to add the path tag to your filter configuration :
 <filter name="name_of_filter" type="type_of_filter">
  <path>C:\MyFilter.ax</path>
  <guid>{00000000-0000-0000-0000-000000000000}</guid>
  <osdname>My Filter Name</osdname>
 </filter>

The path tag can be relative to the filtersconfig.xml directory or absolute.

Note: All filter tags must be surrounded by

<filters>
</filters>

You know how to add a filter, let's see how use that filter with a media file using the mediasconfig.xml

Associate media files with filters

Note: the mediasconfig.xml file must starts with <mediasconfig> and ends with </mediasconfig>

To render a file, DSPlayer needs four filters :

  • A source filter, which reads the media file
  • A splitter filter, which splits the video and audio(s) streams
  • A video decoder filter, which decodes the video stream
  • An audio decoder filter, which decodes the audio(s) stream(s)

In many cases, the source filter is also the splitter filter. But in some cases (like rar playing), the source and splitter filters are different.

You must specify at least four filters (a source, a splitter, a video decoder, an audio decoder) in order to add a new extension to DSPlayer.

New extensions are added like that :

 <rule filetypes="my_extension">
  <source filter="my_source_filter" />
  <splitter filter="my_splitter_filter" />
  <video filter="my_video_decoder_filter" />
  <audio filter="my_audio_decoder_filter" />
 </rule>

You need to replace my_extension by your media file extension (like mkv, avi, mov ...), and each my_xxx_filter by the name of the filter declared in filtersconfig.xml (there's a complete example at the bottom of the page, you can look at it if you don't understand)

Note: All rule tags must be surrounded by

<rules>
 ....
</rules>

Extra filters

You can also add extra filters to the graph. These are filters like AC3Filter, Equalizer, ... Just add an extra tag to your media declaration, like that :

 <rule filetypes="mkv">
   <source filter="mkvsource" />
   <splitter filter="mkvsplitter" />
   <video filter="ffdvideodec" />
   <audio filter="ffdaudiodec" />
   <extra>
     <extra filter="ac3filter" />
     <extra filter="dcgraphiceq" />
   </extra>
 </rule>

NOTE: Of course, the extra filter needs to be declared in filtersconfig.xml first!

Rule-based filter's selection

Starting with revision 27937-update, DSPlayer supports rule-based filter's selection, using the same convention that the playercorefactory.xml. You can now select filters using rule based on filename, video / audio codec, dxva, ...

Here an example :

 <rule filetypes="mkv">
   <source filter="mkvsource" />
   <splitter filter="mkvsplitter" />
   <video>
     <video dxva="true" filter="ffdvideodxvadec" />
     <video filter="ffdvideodec" />
   </video>
   <audio filter="ffdaudiodec" />
 </rule>

NOTE: If multiple rules are valid for a media file, first declared rule is prioritary.


Shaders support

Starting with r33843, you can now use pixel shaders from mediasconfig.xml. The shaders are declarated in the shaders.xml file, located at system/players/dsplayer/Shaders/shaders.xml. Each shader has an id. That's this id which will be used to track the shader.

You can add a shader to a rule with the following syntax :

<rule filetypes="mkv">
  <shaders>
   <shader id="2" />
   <shader id="3" />
   <shader id="6" videocodec="h264" />
   <shader id="11" videoresolution="720" />
  </shaders>
</rule>

Shaders are drawn on the screen in the specified order.

As you can see, the shader tag supports the same rules as the video or audio tag!



Renderer settings

Starting with revision 31004, you can now change some default settings of the renderer with an xml file named renderersettings.xml, and located in userdata\dsplayer\renderersettings.xml.

The XML file has the following structure :

<renderersettings>
  <sharedsettings>
  </sharedsettings>
  <evrsettings>
  </evrsettings>
  <vmr9settings>
  </vmr9settings>
  <subtitlessettings>
  </subtitlessettings>
</renderersettings>

Each setting has the following structure :

<settings_name>settings_value</settings_name>

And here is a list of all possible settings :


Name Value Description
Shared settings
VSync true (default)
false
Enable or disable DSPlayer vSync. If enable, XBMC vSync is automatically disabled when playing a file.
AccurateVSync true (false)
false
Use accurate vSync. DSPlayer vSync need to be enable
AlterativeVSync true
false (default)
Enabling alternative VSync will bypass the default VSync built into D3D. This can often get rid of tearing issues and is the preferred mode of VSync if your hardware/drivers are compatible with it. It's recommended for ATI GPU users to enable this.
FlushGPUBeforeVSync true (default)
false
FlushGPUWait true
false (default)
FlushGPUAfterPresent true
false (default)
DisableDesktopComposition true
false (default)
Disable desktop composition (Aero) when playing a file
EVR Specific settings
OutputRange 1 = Limited (16-235)
0 = Full (0-255) (default)
Controls the video renderers pixel format or output range. Limited range is often needed for proper black/white levels on televisions.
VMR9 Specific settings (empty for now)
Subtitles settings
ForcePowerOfTwoTextures true
false (default)
Force the use of power of two texture. May be forced on if your graphic card doesn't handle non power of two textures
BufferAhead Integer value (default is 3) Specify the number of buffer preloaded before the subtitles are shown
DisableAnimations true (default)
false
Disable animations for subtitles
TextureSize <width>1024</width> <height>768</height> This setting must have the following structure:
<width>integer</width> <height>integer</height>

External links

  • MPCHC Wiki – Media Player Classic Home Cinema Wiki

Examples

Using ffdshow instead of mpcvideodec for mkv

ffdshow is already declared in the mediasconfig.xml shipped with DSPlayer. The only things you need to do is to find the rule tag for mkv file, and change

<video filter="mpcvideodec" />

to

<video filter="ffdvideodec" />

Finaly, you should have that :

    <rule filetypes="mkv">
	  <source filter="mkvsource" />
	  <splitter filter="mkvsplitter" />
	  <video filter="ffdvideodec" />
	  <audio filter="mpaaudiodec" />
    </rule>

Using Haali Media Splitter for mkv

In this subsection, we assume that Haali Media Splitter is installed on the system.

In order to use Haali, you first need to declare the filter in the filters section :

<filter name="haali" type="source">
  <guid>{55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}</guid>
  <osdname>Haali Media Splitter</osdname>
</filter>

We named this filter haali. Now, we just need to find the mkv rule tag, and change

 <source filter="mkvsource" />
 <splitter filter="mkvsplitter" />

to

 <source filter="haali" />
 <splitter filter="haali" />

Finaly, you should have that :

    <rule filetypes="mkv">
	  <source filter="haali" />
          <splitter filter="haali" />
	  <video filter="mpcvideodec" />
	  <audio filter="mpaaudiodec" />
    </rule>

Troubleshooting

"Failed to load external filter"

If your debug log shows "Failed to load external filter", please do the following :

  • Please check if the file exists (use the path in the log)
  • If you are using ffdshow, you need to make sure XBMC is in the white list. See here for more details. You'll need to make the change in the three ffdshow filters (dxva, video and audio)

How-to: Retrieve a filter's guid

This section works only if the filter is registered on your system. If not, look on the internet for the guid.

You'll need GraphStudio.

First, launch GraphStudio. Go to Graph, Insert Filter (shortcut Ctrl+F)

GraphStudio1.png

You should see a list of all the filters registered on your system. Just look for the filter you want, select it, and informations for that filters appears on the right. The GUID is labeled as CLSID

GraphStudio2.png


Complete XML files (updated 2010/06/04)

filtersconfig.xml

<filtersconfig>
  <filters>
    <filter name="mpcvideodec" type="videodec">
      <path>MPCVideoDec.ax</path>
      <guid>{008BAC12-FBAF-497B-9670-BC6F6FBAE2C4}</guid>
      <osdname>MPC Video Decoder</osdname>
    </filter>
    <filter name="ffdvideodec" type="videodec">
      <guid>{04FE9017-F873-410E-871E-AB91661A4EF7}</guid>
      <osdname>ffdshow Video Decoder</osdname>
    </filter>
    <filter name="ffdvideodxvadec" type="videodec">
      <guid>{0B0EFF97-C750-462C-9488-B10E7D87F1A6}</guid>
      <osdname>ffdshow DXVA Decoder</osdname>
    </filter>
    <filter name="coreavcvideodec" type="videodec">
      <guid>{09571A4B-F1FE-4C60-9760-DE6D310C7C31}</guid>
      <osdname>CoreAVC Video Decoder</osdname>
    </filter>
    <filter name="cyberlinkvideodec" type="videodec">
      <guid>{BEF49ADB-9EC1-4AF2-8E50-90F226CC4843}</guid>
      <osdname>CyberLink Video Decoder</osdname>
    </filter>
    <filter name="wmvideodecoder" type="videodec">
      <guid>{82D353DF-90BD-4382-8BC2-3F6192B76E34}</guid>
      <osdname>WMVideo Decoder</osdname>
      <isdmo>true</isdmo>
      <guid_category_dmo>{4a69b442-28be-4991-969c-b500adf5d8a8}</guid_category_dmo>
    </filter>
    <filter name="mpeg2videodec" type="videodec">
      <path>Mpeg2DecFilter.ax</path>
      <guid>{39F498AF-1A09-4275-B193-673B0BA3D478}</guid>
      <osdname>mpeg2 Video Decoder</osdname>
    </filter>
    <filter name="realvideodec" type="videodec">
      <guid>{238D0F23-5DC9-45A6-9BE2-666160C324DD}</guid>
      <osdname>RealAlternative Video Decoder</osdname>
    </filter>
    <filter name="broadcomvideodecoder" type="videodec">
      <guid>{2DE1D17E-46B1-42A8-9AEC-E20E80D9B1A9}</guid>
      <osdname>Broadcom VideoDecoder</osdname>
    </filter>
    <filter name="mpaaudiodec" type="audiodec">
      <path>MpaDecFilter.ax</path>
      <guid>{3D446B6F-71DE-4437-BE15-8CE47174340F}</guid>
      <osdname>Mpa Decoder</osdname>
    </filter>
    <filter name="ffdaudiodec" type="audiodec">
      <guid>{0F40E1E5-4F79-4988-B1A9-CC98794E6B55}</guid>
      <osdname>ffdshow audio decoder</osdname>
    </filter>
    <filter name="wmaudiodecoder" type="audiodec">
      <guid>{2EEB4ADF-4578-4D10-BCA7-BB955F56320A}</guid>
      <osdname>WMAudio Decoder</osdname>
      <isdmo>true</isdmo>
      <guid_category_dmo>{57f2db8b-e6bb-4513-9d43-dcd2a6593125}</guid_category_dmo>
    </filter>
    <filter name="realaudiodec" type="audiodec">
      <guid>{941A4793-A705-4312-8DFC-C11CA05F397E}</guid>
      <osdname>RealAlternative Audio Decoder</osdname>
    </filter>
    <filter name="audioswitcher" type="audioswitch">
      <path>audioswitcher.ax</path>
      <guid>{18C16B08-6497-420E-AD14-22D21C2CEAB7}</guid>
      <alwaysload>1</alwaysload>
    </filter>
    <filter name="dcgraphiceq" type="extra">
      <path>DCGraphicEQ.ax</path>
      <guid>{E4DCD60C-F449-4C78-895B-1FE9F85C7EDD}</guid>
      <osdname>DC-GraphicEQ</osdname>
    </filter>
    <filter name="ac3filter" type="extra">
      <guid>{A753A1EC-973E-4718-AF8E-A3F554D45C44}</guid>
      <osdname>AC3Filter</osdname>
    </filter>
    <filter name="dvdnavigator" type="source">
      <guid>{9B8C4620-2C1A-11D0-8493-00A02438AD48}</guid>
      <osdname>DVD Navigator</osdname>
    </filter>
    <filter name="wmasfreader" type="source">
      <guid>{187463A0-5BB7-11D3-ACBE-0080C75E246E}</guid>
      <osdname>WM ASF Reader</osdname>
    </filter>
    <filter name="avisource" type="source">
      <path>AviSplitter.ax</path>
      <guid>{CEA8DEFF-0AF7-4DB9-9A38-FB3C3AEFC0DE}</guid>
      <osdname>AVI Source</osdname>
    </filter>
    <filter name="flvsource" type="source">
      <path>FLVSplitter.ax</path>
      <guid>{C9ECE7B3-1D8E-41F5-9F24-B255DF16C087}</guid>
      <osdname>FLV Source</osdname>
    </filter>
    <filter name="mp4source" type="source">
      <path>MP4Splitter.ax</path>
      <guid>{3CCC052E-BDEE-408A-BEA7-90914EF2964B}</guid>
      <osdname>MP4 Source</osdname>
    </filter>
    <filter name="mkvsource" type="source">
      <path>MatroskaSplitter.ax</path>
      <guid>{0A68C3B5-9164-4A54-AFAF-995B2FF0E0D4}</guid>
      <osdname>MKV Source</osdname>
    </filter>
    <filter name="mpegsource" type="source">
      <path>MpegSplitter.ax</path>
      <guid>{1365BE7A-C86A-473C-9A41-C0A6E82C9FA3}</guid>
      <osdname>Mpeg Source</osdname>
    </filter>
    <filter name="oggsource" type="source">
      <path>OggSplitter.ax</path>
      <guid>{6D3688CE-3E9D-42F4-92CA-8A11119D25CD}</guid>
      <osdname>Ogg Source</osdname>
    </filter>
    <filter name="realsource" type="source">
      <guid>{765035B3-5944-4A94-806B-20EE3415F26F}</guid>
      <osdname>RealAlternative Source</osdname>
    </filter>
    <filter name="tsfilesource" type="source">
      <guid>{4F8BF30C-3BEB-43A3-8BF2-10096FD28CF2}</guid>
      <osdname>TS File Source</osdname>
    </filter>
    <filter name="haali" type="source">
      <guid>{55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}</guid>
      <osdname>Haali Media Splitter</osdname>
    </filter>
    <filter name="avisplitter" type="splitter">
      <path>AviSplitter.ax</path>
      <guid>{9736D831-9D6C-4E72-B6E7-560EF9181001}</guid>
      <osdname>AVI Splitter</osdname>
    </filter>
    <filter name="flvsplitter" type="splitter">
      <path>FLVSplitter.ax</path>
      <guid>{47E792CF-0BBE-4F7A-859C-194B0768650A}</guid>
      <osdname>FLV Splitter</osdname>
    </filter>
    <filter name="mp4splitter" type="splitter">
      <path>MP4Splitter.ax</path>
      <guid>{61F47056-E400-43D3-AF1E-AB7DFFD4C4AD}</guid>
      <osdname>MP4 Splitter</osdname>
    </filter>
    <filter name="mkvsplitter" type="splitter">
      <path>MatroskaSplitter.ax</path>
      <guid>{149D2E01-C32E-4939-80F6-C07B81015A7A}</guid>
      <osdname>MKV Splitter</osdname>
    </filter>
    <filter name="mpegsplitter" type="splitter">
      <path>MpegSplitter.ax</path>
      <guid>{DC257063-045F-4BE2-BD5B-E12279C464F0}</guid>
      <osdname>Mpeg Splitter</osdname>
    </filter>
    <filter name="oggsplitter" type="splitter">
      <path>OggSplitter.ax</path>
      <guid>{9FF48807-E133-40AA-826F-9B2959E5232D}</guid>
      <osdname>Ogg Splitter</osdname>
    </filter>
    <filter name="realsplitter" type="splitter">
      <guid>{E21BE468-5C18-43EB-B0CC-DB93A847D769}</guid>
      <osdname>RealAlternative Splitter</osdname>
    </filter>
    <filter name="mpeg2demultiplexer" type="splitter">
      <guid>{AFB6C280-2C41-11D3-8A60-0000F81E0E4A}</guid>
      <osdname>MPEG-2 Demultiplexer</osdname>
    </filter>
  </filters>
</filtersconfig>

mediasconfig.xml

<mediasconfig>
  <rules>
    <rule filetypes="iso">
      <source filter="tsfilesource" />
      <splitter filter="mpeg2demultiplexer" />
      <video filter="ffdvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="ifo">
      <source filter="dvdnavigator" />
      <splitter filter="dvdnavigator" />
      <video filter="mpeg2videodec" />
      <audio filter="mpaaudiodec" />
    </rule>
    <rule filetypes="avi|divx">
      <source filter="avisource" />
      <splitter filter="avisplitter" />
      <video filter="mpcvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="ogm">
      <source filter="oggsource" />
      <splitter filter="oggsplitter" />
      <video filter="mpcvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>  
      <rule filetypes="flv">
      <source filter="flvsource" />
      <splitter filter="flvsplitter" />
      <video filter="mpcvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="mp4">
      <source filter="mp4source" />
      <splitter filter="mp4splitter" />
      <video filter="mpcvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="mov|m4v">
      <source filter="mp4source" />
      <splitter filter="mp4splitter" />
      <video filter="ffdvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="m2v">
      <source filter="mpegsource" />
      <splitter filter="mpegsplitter" />
      <video filter="mpeg2videodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="ts|mpeg|mpg|m2ts">
      <source filter="mpegsource" />
      <splitter filter="mpegsplitter" />
      <video filter="ffdvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="mkv">
      <source filter="mkvsource" />
      <splitter filter="mkvsplitter" />
      <video filter="mpcvideodec" />
      <audio filter="ffdaudiodec" />
    </rule>
    <rule filetypes="wmv">
      <source filter="wmasfreader" />
      <splitter filter="wmasfreader" />
      <video filter="wmvideodecoder" />
      <audio filter="wmaudiodecoder" />
    </rule>
 
    <rule filetypes="rmvb">
      <source filter="realsource" />
      <splitter filter="realsplitter" />
      <video filter="realvideodec" />
      <audio filter="realaudiodec" />
    </rule>
  </rules>
</mediasconfig>