Archive:DSPlayer

From Official Kodi Wiki
Revision as of 20:42, 11 February 2010 by >Blinkseb (→‎Filters declaration)
Jump to navigation Jump to search

DSPlayer is a DirectShow based player for XBMC. It's still in developement, and currently supported in the forum in the thread http://forum.xbmc.org/showthread.php?t=61355. DSPlayer support DXVA hardware acceleration (works in Windows XP, Vista and 7), as well as any custom directshow filters (ffdshow, ac3filter, haali media splitter ...). Lastest builds can be found on here (thanks to XBMC-Passion for the mirors)

In this article, when we refer to dsplayer, we mean XBMC with dsplayer built-in.

WARNING: Du to recent change to the wiki, we can't use the tag </source> anymore. In all the HOW-TO, you'll need to replace <//source> to </source>

Installing

Installing dsplayer is the same thing that installing XBMC. Grab the installer on our mirror XBMC-Passion (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.

Configuring

In order to use dsplayer, you need to edit a configuration file to tell dsplayer which filters using when playing your files. The configuration file, named dsfilterconfig.xml, is currently located on \system\players\dsplayer\ in the xbmc install folder (ie c:\Program Files\xbmc\system\players\dsplayer\dsfilterconfig.xml). This location is temporary. Later, dsfilterconfig.xml will be stored in the UserData folder.

Let's see how the dsfilterconfig.xml file looks like. There're two sections. The first one lists the filters dsplayer will be able to use. The second associate filters with a specific media extension.

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

Filters declaration

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>

The type attribute isn't currently used, so you can ignore it, but 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 dsfilterconfig.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

Associate media files with filters

To render a file, dsplayer need 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 differents.

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 filetype="my_extension">
  <source>my_source_filter<//source>
  <splitter>my_splitter_filter</splitter>
  <video>my_video_decoder_filter</video>
  <audio>my_audio_decoder_filter</audio>
 </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 you've added before (there's the complete dsfilterconfig.xml 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

Using DSPlayer with XBMC

Three ways for using DSPlayer :

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

Examples

Using ffdshow instead of mpcvideodec for mkv

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

<video>mpcvideodec</video>

to

<video>ffdvideodec</video>

Finaly, you should have that :

    <rule filetype="mkv">
	  <source>mkvsource<//source>
	  <splitter>mkvsplitter</splitter>
	  <video>ffdvideodec</video>
	  <audio>mpaaudiodec</audio>
	  <!--<extra>dcgraphiceq</extra>-->
    </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>mkvsource<//source>
 <splitter>mkvsplitter</splitter>

to

 <source>haali<//source>
 <splitter>haali</splitter>

Finaly, you should have that :

    <rule filetype="mkv">
	  <source>haali<//source>
	  <splitter>haali</splitter>
	  <video>mpcvideodec</video>
	  <audio>mpaaudiodec</audio>
	  <!--<extra>dcgraphiceq</extra>-->
    </rule>

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

<dsfilterconfig>
  <filters>

    <!-- Source filters --> 
    <filter name="wmasfreader" type="source">
      <guid>{187463A0-5BB7-11D3-ACBE-0080C75E246E}</guid>
      <osdname></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>

  <!-- Splitter filters -->
    <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>

    <!-- Video decoder 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">
      <path>ffdshow.ax</path>
      <guid>{04FE9017-F873-410E-871E-AB91661A4EF7}</guid>
      <osdname>ffdshow Video Decoder</osdname>
    </filter>
    <filter name="mpeg2videodec" type="videodec">
      <path>Mpeg2DecFilter.ax</path>
      <guid>{39F498AF-1A09-4275-B193-673B0BA3D478}</guid>
      <osdname>mpeg2 Video Decoder</osdname>
    </filter>

    <!-- Audio decoder filters -->
    <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">
      <path>ffdshow.ax</path>
      <guid>{0F40E1E5-4F79-4988-B1A9-CC98794E6B55}</guid>
      <osdname>ffdshow audio decoder</osdname>
    </filter>
    <filter name="wmaudiodecoder" type="audiodec">
      <guid>{94297043-BD82-4DFD-B0DE-8177739C6D20}</guid>
      <osdname>WMAudio Decoder</osdname>
    </filter>
    <filter name="broadcomvideodecoder" type="videodec">
      <guid>{2DE1D17E-46B1-42A8-9AEC-E20E80D9B1A9}</guid>
      <osdname>Broadcom VideoDecoder</osdname>
    </filter>
    <filter name="haali" type="source">
      <guid>{55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}</guid>
      <osdname>Haali Media Splitter</osdname>
    </filter>

    <!-- Audio Stream Switcher-->
    <filter name="audioswitcher" type="audioswitch">
      <path>audioswitcher.ax</path>
      <guid>{18C16B08-6497-420E-AD14-22D21C2CEAB7}</guid>
      <alwaysload>1</alwaysload>
    </filter>
	
    <!-- Extra filters -->
    <filter name="dcgraphiceq" type="extra">
      <path>DCGraphicEQ.ax</path>
      <guid>{E4DCD60C-F449-4C78-895B-1FE9F85C7EDD}</guid>
      <osdname>DC-GraphicEQ</osdname>
    </filter>

  </filters>

  <rules>

    <rule filetype="avi">
	  <source>avisource

<splitter>avisplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>	
   <rule filetype="ogm">
oggsource

<splitter>oggsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>	
   <rule filetype="flv">
flvsource

<splitter>flvsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="mp4">
mp4source

<splitter>mp4splitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="mov">
mp4source

<splitter>mp4splitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="m4v">
mp4source

<splitter>mp4splitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="m2v">
mpegsource

<splitter>mpegsplitter</splitter> <video>mpeg2videodec</video> <audio>ffdaudiodec</audio>

   </rule>
   <rule filetype="ts">
mpegsource

<splitter>mpegsplitter</splitter> <video>mpeg2videodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="mpeg">
mpegsource

<splitter>mpegsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="mpg">
mpegsource

<splitter>mpegsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="m2ts">
mpegsource

<splitter>mpegsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="mkv">
mkvsource

<splitter>mkvsplitter</splitter> <video>mpcvideodec</video> <audio>mpaaudiodec</audio>

   </rule>
   <rule filetype="wmv">
wmasfreader

<splitter>wmasfreader</splitter> <video>ffdvideodec</video> <audio>wmaudiodecoder</audio>

   </rule>
 </rules>

</dsfilterconfig> </source>