DSPlayer

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: mysql x.x.x.x  3306 xbmc xbmc 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 : 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 :

Note: this is no longer necessary, as DSplayer can be enabled via XBMC GUI.
 * You can also use the 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 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   and ends with  

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

 MatroskaSplitter.ax    {0A68C3B5-9164-4A54-AFAF-995B2FF0E0D4} MKV Source 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 :  he type attribute must be one of the following, depending of what type of filter you want to add: 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.
 * source
 * splitter
 * videodec
 * audiodec
 * extra

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 : You can find guid on the internet, or on the website of the filter.
 * ffdshow video decoder : {04FE9017-F873-410E-871E-AB91661A4EF7}
 * ffdshow audio decoder : {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
 * haali media splitter : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}

Now, we have our filter guid :  {00000000-0000-0000-0000-000000000000} 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 :  {00000000-0000-0000-0000-000000000000}   My Filter Name Ok, now, two choices :  C:\MyFilter.ax   {00000000-0000-0000-0000-000000000000} My Filter Name The path tag can be relative to the filtersconfig.xml directory or absolute.
 * 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 :

Note: All filter tags must be surrounded by 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   and ends with  

To render a file, DSPlayer needs four filters : 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.
 * 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)

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

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 :     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 :   <video filter="ffdvideodec" /> <audio filter="ffdaudiodec" /> 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 : <shader id="6" videocodec="h264" /> <shader id="11" videoresolution="720" /> 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 : Each setting has the following structure : <settings_name>settings_value</settings_name> And here is a list of all possible settings :

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 : <splitter filter="mkvsplitter" /> <video filter="ffdvideodec" /> <audio filter="mpaaudiodec" />

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"> {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D} Haali Media Splitter We named this filter haali. Now, we just need to find the mkv rule tag, and change <splitter filter="mkvsplitter" /> to Finaly, you should have that : <video filter="mpcvideodec" /> <audio filter="mpaaudiodec" />

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



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



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

mediasconfig.xml
<source filter="tsfilesource" /> <splitter filter="mpeg2demultiplexer" /> <video filter="ffdvideodec" /> <audio filter="ffdaudiodec" /> <source filter="dvdnavigator" /> <splitter filter="dvdnavigator" /> <video filter="mpeg2videodec" /> <audio filter="mpaaudiodec" /> <rule filetypes="avi|divx"> <splitter filter="avisplitter" /> <video filter="mpcvideodec" /> <audio filter="ffdaudiodec" /> <splitter filter="oggsplitter" /> <video filter="mpcvideodec" /> <audio filter="ffdaudiodec" /> <splitter filter="flvsplitter" /> <video filter="mpcvideodec" /> <audio filter="ffdaudiodec" /> <splitter filter="mp4splitter" /> <video filter="mpcvideodec" /> <audio filter="ffdaudiodec" /> <rule filetypes="mov|m4v"> <splitter filter="mp4splitter" /> <video filter="ffdvideodec" /> <audio filter="ffdaudiodec" /> <source filter="mpegsource" /> <splitter filter="mpegsplitter" /> <video filter="mpeg2videodec" /> <audio filter="ffdaudiodec" /> <rule filetypes="ts|mpeg|mpg|m2ts"> <source filter="mpegsource" /> <splitter filter="mpegsplitter" /> <video filter="ffdvideodec" /> <audio filter="ffdaudiodec" /> <splitter filter="mkvsplitter" /> <video filter="mpcvideodec" /> <audio filter="ffdaudiodec" /> <source filter="wmasfreader" /> <splitter filter="wmasfreader" /> <video filter="wmvideodecoder" /> <audio filter="wmaudiodecoder" /> <source filter="realsource" /> <splitter filter="realsplitter" /> <video filter="realvideodec" /> <audio filter="realaudiodec" />