How to get DTS 44khz / DTS CD wav playback in XBMC!
#1
Thumbs Up 
This took me quite a while to figure out but I've successfully accomplished playback of DTS wav (44.1khz) files in XBMC on Linux (Ubuntu-Jaunty).
However, upgrading to v.10 of XBMC seemed to break the fix. Thru browsing the forum I found an updated fix. Because there are so many different threads addressing this issue I thought it would be nice to have a central location to contribute solutions to DTS playback woes.

Here is what I have done:
(I have written a Linux shell script to automate the process and posted a link at the bottom of this post)

Create playercorefactory.xml file in ~/.xbmc/userdata
Then add the following into it:
Code:
<!-- dvdplayer can play DTS and wav multichannel tracks -->
    <rule filetypes="(dts|wav)"  player="DVDPlayer" />
My complete playercorefactory.xml file looks like:
Code:
<playercorefactory>
  <players>
    <!-- These are compiled-in as re-ordering them would break scripts
    The following aliases may also be used:
      audiodefaultplayer, videodefaultplayer, videodefaultdvdplayer
    <player name="DVDPlayer" audio="true" video="true" />
    <player name="DVDPlayer" /> placeholder for MPlayer
    <player name="PAPlayer" audio="true" />
    -->
  </players>

  <rules>
    <rule protocols="rtv" player="DVDPlayer" />
    <rule protocols="hdhomerun|myth|cmyth|rtmp" player="DVDPlayer" />
    <rule protocols="lastfm|shout" player="PAPlayer" />

    <!-- dvdplayer can play standard rtsp streams -->
    <rule protocols="rtsp" filetypes="!(rm|ra)"  player="PAPlayer" />
    
    <!-- dvdplayer can play DTS and wav multichannel tracks -->
    <rule filetypes="(dts|wav)"  player="DVDPlayer" />

    <!-- Internet streams -->
    <rule internetstream="true">
      <rule mimetypes="video/x-flv|video-flv|audio/aacp|application/sdp" player="DVDPlayer" />
      <rule mimetypes="application/octet-stream" filetypes="mp2" player="PAPlayer" />
    </rule>

    <!-- DVDs -->
    <rule dvd="true" player="videodefaultdvdplayer" />
    <rule dvdfile="true" player="videodefaultdvdplayer" />
    <rule dvdimage="true" player="videodefaultdvdplayer" />

    <!-- Only dvdplayer can handle these normally -->
    <rule filetypes="sdp|asf" player="DVDPlayer" />
  </rules>
</playercorefactory>


Then, I found that removing pulseaudio alleviated alot of headaches and allowed proper playback of DTS-wav's:
(in shell)
Code:
sudo apt-get purge pulseaudio

Next, make sure alsa is configured right:
(In shell)
Code:
alsamixer
...make sure all pertainant sliders are set maximum! And make sure iec958 output is set to on! Then save the setting
Code:
alsactl store 0

Start up XBMC and press the volume UP button on your remote while attempting to playback a DTS wav file - make sure the volume is at maximum!

If you still don't have playback of DTS-wav or are using a newer version of XBMC ( 10+ ), do the following:
Create a file called advancedsettings.xml in ~/.xbmc/userdata
Then add the following into it:
Code:
<advancedsettings>
        <audio>
                <dvdplayerignoredtsinwav>true</dvdplayerignoredtsinwav>
        </audio>
</advancedsettings>


Now, you should have 44.1 khz DTS wav file playback!

I've written a Linux shell script to automate the process....no guarantees that it will work for everyone, but you can modify it to suit your distro!

http://rapidshare.com/files/449037390/xb...config.zip

Use at your own risk! ;-)
Reply
#2
Hola,

Thanks for your help.

I did the "advancesettings.xml" to change the default player to DVDplayer in Windows 7 and it work for DTS-WAV and DTS-FLAC.

But, what about DTS-CD and ape files (monkey audio)? Anybody knows how to make it work? Maybe DVDplayer doesn't support those formats.

Thanks in advance.

Adios.
Reply
#3
watanave Wrote:Hola,

Thanks for your help.

I did the "advancesettings.xml" to change the default player to DVDplayer in Windows 7 and it work for DTS-WAV and DTS-FLAC.

But, what about DTS-CD and ape files (monkey audio)? Anybody knows how to make it work? Maybe DVDplayer doesn't support those formats.

Thanks in advance.

Adios.

Well, DTS CD if we are speaking of the same thing, should be the same as DTS wav files in that both are 44.1khz instead of 48. In which case, the above mentioned setup should work - though I've not had much success with Windows (on many levels ;-) ); in linux/Ubuntu it works very well!
Reply
#4
Tidan,

I' ve tryed to play any CD and it doesn't play, same thing with ape's files. Maybe I did something wrong...

Gracias
Reply
#5
watanave Wrote:Tidan,

I' ve tryed to play any CD and it doesn't play, same thing with ape's files. Maybe I did something wrong...

Gracias

Have you tried playing a DTS-wav file directly from the harddrive and NOT from a CD disk?
I keep my DTS music collection on the harddrive(s) and have never tried playing a CD that is DTS thru the HTPC....for those I simply pop them into my regular home theater system CD/DVD player.

If you need some DTS music to test I can help you....or if you have some music you want a DTS conversion done to, I can do that too! ;-)
Reply
#6
Tidan,

Have you tried playing a DTS-wav file directly from the harddrive and NOT from a CD disk?

Yes and it works OK. And the DTS-Flacs are OK, too. Thanks to change the audio player to "DVDplayer"

The problem is that it doesn't play CD's (Not only DTS-CD but normal music CD´s) and neither APE files (DTS encoded and normal music files). Maybe is something wrong with DVDplayer.

I know I can rip them to the Hark Disk and solve the problem. I just want to know if the problems with CD's and APE files is a problem with my configuration.

Gracias. (Sorry about my English)
Reply
#7
watanave Wrote:Tidan,

Have you tried playing a DTS-wav file directly from the harddrive and NOT from a CD disk?

Yes and it works OK. And the DTS-Flacs are OK, too. Thanks to change the audio player to "DVDplayer"

The problem is that it doesn't play CD's (Not only DTS-CD but normal music CD´s) and neither APE files (DTS encoded and normal music files). Maybe is something wrong with DVDplayer.

I know I can rip them to the Hark Disk and solve the problem. I just want to know if the problems with CD's and APE files is a problem with my configuration.

Gracias. (Sorry about my English)


De nada! Mi espanol is mas malo entunces tus english! ;-)
I am not sure what you can do regarding playback of the actual CD/disc. I personally have everything on the HDD on my system and have little to no need for the CD discs.

Lo siento!
Reply
#8
Tidan,

Thanks for your help, anyway. Funny spanish...

Adiós.
Reply
#9
This hack unfortunately does not work with some sound cards (soundblaster is good example)
Additionally some multichannel flac files also does not work.

But I was told that new XBMC will have complete rewrite of music engine.
Branch was called masteraudio if I remember correctly.

Thx for taking time and putting it all together in one place.
Reply
#10
This didn't help me at all, i'm afraid. I still cannot get some DTS albums or wav or flac files to passthrough and be decoded by the receiver.

When i removed pulseaudio i couldn't play any non passthrough audio at all. The output device had some error and wouldn't play, despite being set correctly in the system audio output settings. The DTS albums I did have passed through as usual though.

From what I gather then, the problem is no doubt that 48khz streams are being passed through correctly but anything with 44khz is sent as PCM data.
Reply
#11
@Reptilean:
Did you follow the above intructions precisely? Very important to note, you must make sure the volume sliders are all the way up to 100% volume, otherwise the PCM signal results. This means you need to make sure the alsa mixer is up and the XBMC volume control is up.
I found that after removing pulseaudio I had to go back and reset my volume levels to max.

You may also want to double check your mixer settings in ubuntu: SYSTEM/PREFERENCES/SOUND/DEVICES

Which version of Ubuntu are you using and which version of XBMC?
Reply
#12
Yes i paid attention to the volume sliders and stuff and it was set up as specified.

I have another problem now....some ac3 surround files don't work properly in passthrough...i get some glitching issues.

It's a bit annoying....i was using the onboard analog surround and have trouble with the audio only dts playback so i bought a card with a digital out thinking it would lessen many of the problems but in actual fact the problems are even worse.
Reply
#13
Reptilian Wrote:Yes i paid attention to the volume sliders and stuff and it was set up as specified.

I have another problem now....some ac3 surround files don't work properly in passthrough...i get some glitching issues.

It's a bit annoying....i was using the onboard analog surround and have trouble with the audio only dts playback so i bought a card with a digital out thinking it would lessen many of the problems but in actual fact the problems are even worse.

The method I layed out is for SPDIF passthru, i.e. digital passthru only. Since my HT equipment is far superior to my computer, I want to only pass the digital signal, untouched, to my HT processor. But if you're converting to analog before your home theater, then I'm guessing the problems will be focused around your linux distro/alsa config and will require some good quality/top shelf sound card to get really good sound.
Reply
#14
It's SPDIF passthrough I am talking about. I only mentioned the analog in comparison.

I am using the Coax spdif out (not the optical one).

Here's a breakdown of what works with the digital passthrough to the decoder...

1. Some but not all DTS audio albums (even when forcing dvdplayer)
2. All DTS video
3. DD5 video works but is very glitchy...if i downmix to 2.0 in xbmc there are no audible problem
4. Flac, wav surround files do not passthrough
Reply
#15
Reptilian Wrote:It's SPDIF passthrough I am talking about. I only mentioned the analog in comparison.

I am using the Coax spdif out (not the optical one).

Here's a breakdown of what works with the digital passthrough to the decoder...

1. Some but not all DTS audio albums (even when forcing dvdplayer)
2. All DTS video
3. DD5 video works but is very glitchy...if i downmix to 2.0 in xbmc there are no audible problem
4. Flac, wav surround files do not passthrough


Its a long shot, but have you tried the toslink out (optical) for your audio?
I went with the optical to avoid any ground loop buzz since the digital coax connects your HT to the computers ground.

Is your video jerky too?
Reply

Logout Mark Read Team Forum Stats Members Help
How to get DTS 44khz / DTS CD wav playback in XBMC!0