Author Topic: XBMC Eden 11 with support audio Dolby true HD and DTS HD  (Read 128987 times)

0 Members and 2 Guests are viewing this topic.

stevos

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #60 on: January 30, 2012, 07:03:23 AM »
Wanilton you are an absolute star

I tried to build one myself over the weekend and failed

Can't wait to try this out.

The biggest feature improvement of the latest version of Eden to the original build is it includes more network drive options, one of which works a lot more smoothly with my QNAP

Fingers crossed it all works

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #61 on: February 01, 2012, 02:41:57 AM »
Hi all, it's DDDamian here from the XBMC forums. Just an update for those waiting for an integrated HD-audio solution in XBMC with the new AudioEngine.

Gnif, the developer of the AudioEngine branch, has resumed coding work and done a tremendous amount in the last two weeks. I've been fortunate enough to help him out on the WASAPI (Windows) side so he can concentrate on the ALSA (Linux) side and the core itself.

We've been coding, testing and tweaking including performance testing core parts of the code to try find the right balance between low latency and some tolerance for other events like python threads and other CPU activity. Some audio dropouts are happening as we're setup for extremely low latency on higher-end machines, but we'll be adding advancedsettings options for buffer sizing to reduce those occurances on lower-powered machines.

The latest code still has a few issues (largely breaking things as features get added and code reworked) but there's very definite progress. I think for every attempt to just focus on stability a new little feature get's thrown in, as dithering of 16-bit sources (a good thing) did just this past weekend.

There is still enough to do that gnif doesn't want to release binaries yet, but folks can feel free to follow the thread and compile versions of their own if they are capable of doing so independently.

There's a build just done by Wanilton on the 29th, and he picked a lucky date to grab the source, because it was a very stable build, but hard-coded with very low latency buffers, so most users will find drops in the audio, as mentioned above. I haven't testing his build, but mine from that day was probably the best yet, if the compiler is set to full optimisation.

Anyways, development has been going full-tilt, and ppl can watch the progress in the thread or on the main repository at GitHub. I'm now using it as my primary player, but I also have access to and knowledge of the various tweaks, so I wouldn't recommend it for eveyone now. But it's *this* close  ;D
« Last Edit: February 01, 2012, 02:45:44 AM by DDDamian »

mdhd

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #62 on: February 01, 2012, 05:32:26 AM »
@DDDamian,

I'm using since yesterday the compiled version from wanilton. i can say, this version is very good. truehd working without problems dd and dts also no problem, but there is only a problem with DTS HD Master there are discontinues sometimes. If you could fix this for now, would be great., so we can have a version without discontinues on dts hd. the most of us would be happy.

i'm using ati radeon 6850 with onkyo 609. CPU on true hd or dts hd master is the same as on DD or dts. something like 10-15%. so no problems.

MDHD

stevos

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #63 on: February 01, 2012, 09:33:33 AM »
All sounds very promising.

Hopefully we can have a build with a better buffer before long and then i think most of us will be very happy  ;D

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #64 on: February 01, 2012, 09:46:35 AM »

There's a build just done by Wanilton on the 29th, and he picked a lucky date to grab the source, because it was a very stable build, but hard-coded with very low latency buffers, so most users will find drops in the audio, as mentioned above. I haven't testing his build, but mine from that day was probably the best yet, if the compiler is set to full optimisation.

Thanks for the info and for your hard work on this project DDDamian.  It sounds like maybe you would be able to direct Wanilton to the correct line of code to change in the build that he chose on the 29th, so that he could change the hard coded buffer size to a safer value and rebuild.  Just a thought, for those who don't want to wait.  I don't personally use this build yet, but I'm happy to know it is in development.

Since you are "in the know" I wonder if I can pick your brain a bit.  We have a problem with this and the regular build, any time we are playing 5.1 content with a direct stream (sorry I don't know the exact, correct terminology) where we are unable to use our TTS (text to speech) because the hardware is in some kind of "exclusive mode".  I understand that there is no solution to this and maybe there never will be.  I'm just wondering if you know if there is a way to inject sound into this stream, or if there could be some other solution.  I believe that interface sounds are also disabled when running in this exclusive mode.

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #65 on: February 01, 2012, 01:52:30 PM »
Thx guys - I knew there was a lot of interest here so I wanted to update you. In fact it was playing with Wanilton's build of last July that got me excited about the project and involved. Just want to note that this is gnif's baby and I'm just a user that is helping where I can (and where he allows lol).

If Wanilton still has the source from that build there are two places in AESinkWASAPI that define the buffer. After that date a bug was introduced in TrueHD playback, so I wouldn't recommend a current pull.  One is under InitializeShared the other under InitializeExclusive, and both will read something similar to:
Code: [Select]
if(hnsPeriodicity < 500000) hnsPeriodicity = 500000;The number represents the buffer length in 10nanosecond units, so divide by 10,000 to get milliseconds. In this case its 50msec long. Depending on your hardware and other running threads/applications, safe values might be 100msec for Shared mode and 70msec for Exclusive.
I note that 50msec works fine on my rig, but it's fairly fast.  In all cases the compiler must be set to optimize the code - without optimization turned on I wouldn't guarentee anything.

@jitterjames - AE will now mix in GUI sounds in Exclusive mode, but any external sounds (Windows sounds, etc) are silenced in this mode. That is because AE locks the driver which prevents other applications from producing sound. Only other XBMC sounds like GUI sounds are mixed in, and only if set on the settings page. So no, there never will be a solution to that - it's just the very nature of Exclusive mode. An application which requests Exclusive mode gets exactly that - sole access to the audio driver.  That said, when I have my music cranked the last thing I want is a 98db Windows alert  :biglaugh  Should work fine in Shared mode though.

I'll try to remember to flag it in this forum when I think there's a suitable time for a new build. And hat's off to Wanilton for making his builds available - it's what got me hooked on AE to begin with!
« Last Edit: February 01, 2012, 02:05:36 PM by DDDamian »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #66 on: February 01, 2012, 03:10:54 PM »
@jitterjames - AE will now mix in GUI sounds in Exclusive mode, but any external sounds (Windows sounds, etc) are silenced in this mode. That is because AE locks the driver which prevents other applications from producing sound. Only other XBMC sounds like GUI sounds are mixed in, and only if set on the settings page. So no, there never will be a solution to that - it's just the very nature of Exclusive mode. An application which requests Exclusive mode gets exactly that - sole access to the audio driver.  That said, when I have my music cranked the last thing I want is a 98db Windows alert  :biglaugh  Should work fine in Shared mode though.
yes, the problem is that it seems to operate in exclusive mode with all 5.1 content even though "Use Exclusive Mode" has not been selected.  This is the case with this build and with Eden vanilla.  Maybe it is just the way it has to be with 5.1 digital content.  It makes sense since the data is basically being passed to the amp unmolested (which is good), but I thought you might have some ideas.

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #67 on: February 01, 2012, 03:35:51 PM »
@jitterjames - That's true, as the audio device drivers are recognizing the stream as DD5.1 or DTS or whichever and thus passing through the data. Calls to Windows to open new streams will result in an error stating the playback device is in use.

There is a workaround: in the audio settings page un-check "Use Exclusive mode". Also uncheck "Dolby Digital capable receiver" and "DTS capable receiver". If you're using the AE build uncheck all except "Multichannel LPCM capable receiver".

Now XBMC decodes AC3 and DTS audio to LPCM, the native format for Windows mixing. Other applications like VC can now have their streams mixed. Your receiver will no longer read the stream as AC3 or DTS, but as LPCM. And the Windows mixer will be able to mix other PCM sources like your TTS into the stream.

Basically you're disabling passthrough of those two formats, but transcoding them natively within XBMC, and other applications can join in the fun.

Note that DTS-HD cannot be transcoded internally, but TrueHD can. With the workaround above you would get TTS on all formats except DTS-HD.

Wanilton

  • Moderator
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #68 on: February 01, 2012, 03:43:48 PM »
DDDamian,

Thanks for info, i replace actual code Gnif, in two places for 100 msec, and i compiling now new xbmc version with this new parameters in AESinkWASAPI,
I don´t have old codes, sorry.

When ok, i send post here, with results.

Wanilton
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #69 on: February 01, 2012, 03:57:55 PM »
There is a workaround: in the audio settings page un-check "Use Exclusive mode". Also uncheck "Dolby Digital capable receiver" and "DTS capable receiver". If you're using the AE build uncheck all except "Multichannel LPCM capable receiver"...
Sounds promising.  Thanks very much for the suggestion.  It is just the kind of thing I was looking for.  Do you have any idea how this will affect sound quality, lip sync, cpu usage?  I will try and judge for myself anyway but I thought you might have a technical answer for us.

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #70 on: February 01, 2012, 04:04:17 PM »
There are increased overheads involved in the software decoding, but not enough to effect the accurate buffering in Eden, and in AE once those buffer sizes are sorted out. So I wouldn't expect any change in the end-user experience except the receiver won't light up those pretty lights and it effectively eliminates DTS-HD playback in that mode until (or unless) DTS-HD transcoding is added. You would still get core-DTS in that case though.

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #71 on: February 01, 2012, 04:08:43 PM »
DDDamian,

Thanks for info, i replace actual code Gnif, in two places for 100 msec, and i compiling now new xbmc version with this new parameters in AESinkWASAPI,
I don´t have old codes, sorry.

When ok, i send post here, with results.

Wanilton

Hi Wanilton - thx for making this available to eveyone. If you are using a git tool you can revert the commits *after* f573a9681cd2a793962d9958bcf7165a3921132a and you'll be at the most stable build for Windows users. Pls make sure you compile with optimization set to prefer faster over size and you should have a pretty stable build.  ;)

stevos

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #72 on: February 01, 2012, 04:16:59 PM »
Could of curiosity, what do you define as a very high end system?

DDDamian

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #73 on: February 01, 2012, 04:40:11 PM »
Could of curiosity, what do you define as a very high end system?

That's a *very* difficult question. Here's a go at what will playback well:

CPU - At least 1.8Ghz - as XBMC is not multiprocessor capable the number of cores is largely irrelevant
GPU - A dedicated GPU by nVidia or ATI with HDMI passthrough. DXVA2 acceleration for Windows.
RAM - 4GB - again, any more is not used by XBMC as it is 32bit

Combo boards - ppl have reported issues with I3, depends on video and audio throughput. 1080p and 8channel TrueHD is gonna be tough. I5+ is reported fine.

My test rig is a 1.8Ghz quad-core, 8GB RAM, ATI 6450 video card, Win 7 x64. With it (and using a stable build) I get 1080p + DTS-MA/TrueHD hw-accelerated without video or audio glitches. I can't recommend even a cheap recent GPU enough!

Wanilton

  • Moderator
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: XBMC Eden 11 with support audio Dolby true HD and DTS HD
« Reply #74 on: February 01, 2012, 04:57:51 PM »
Well, my test, with changes in parameters, have positive results for me, when set off exclusive mode,  running mkv DTS-HD file, I turn OFF  DTS and AC3 compatible receiver too, and SET ON for DTS-HD, Dolby True HD and LPCM settings, the video and audio run fine, not problems, but when set ON to exclusive mode, same others settings, happens failed to initialize Audio Device, only when set ON DTS support again in audiosettings , work fine again, i need more tests.
For other videos and music, all fine for me. I noticed loss in sound volume when running video when turned off by setting to support for Dolby and DTS, LPCM leaving only the active.
Running flac, my volume is normal.

When I press the arrow to move the video forward, I lost the audio before, now is ok, this new version I'm not losing the audio.
I changed these values​​, for the purpose of which was the reference 500000 to 1000000 and 2000000 to 3000000.

My test using voxcommando send TTS sounds and audio 5.1 together for my receiver, work fine, thanks again for tip DDDamian,

New version, download new xbmc.exe, for me improve my results.

http://dl.dropbox.com/u/25170804/XBMCHD.zip

Wanilton

Using win7 32 bits, 4 mb ram, 8 tb hd, intel i5 750 @ 2,67GHz, Graphics Card Radeon HD 5450 with hdmi passthrough, receiver Onkyo TX-SR705, Optoma HD80 projector DLP Full HD.
« Last Edit: February 01, 2012, 05:52:06 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me