XBMC Audio goes HD

May 30th, 2012 dddamian

It’s been long-awaited, oft-discussed and it’s finally here – AudioEngine for XBMC!

What is AudioEngine? A complete re-write of the core audio sub-system of XBMC, and a two-year project comprising some 22,000 lines of code.

Spear-headed by lead-developer gnif, with contributions from many other team developers (dddamian, gimli, fneufneu, anssi, memphiz and others!), AudioEngine brings high-definition audio to the already amazing XBMC. No matter the audio source, AE handles the decoding, resampling, transcoding, encoding and streaming of your media, including for the first time DTS-MA, TrueHD and 24-bit audio. XBMC has never sounded better!

With full floating-point audio pipes, even mp3’s sound audibly better, with dithering built-in to further reduce quantization noise.

After a herculean effort and many lost evenings, the team is happy to announce that AudioEngine has been merged with the master branch as of May 15th 2012.  As such, it is now possible for the team as a whole to participate in it’s further development and for users to enjoy via the nightlies or your own builds.

Features of AE include:

support for DTS-MA / Dolby TrueHD Bluray formats (OSX pending)
support for 24-bit and floating-point audio at up to 384,000hz
mixing of all streams including GUI sounds even when transcoding audio
start-up enumeration of hardware audio devices and their capablities with log output
bitstreaming support in PAPlayer (XBMC’s music player)
upmixing of stereo to full channel layout
tighter syncing of A/V streams
floating-point processing of audio
24-bit and floating-point decoding/handling of mp3
full support for ReplayGain
built-in sample-rate conversion and transcoding

Planned Features for upcoming AE releases:

rules-based decisions for output formats based on hardware capabilites
a range of DSP’s (digital signal processors) including headphone head-related transfer function processing, DRC (dynamic range compression), low-pass filtering for subs and an equalizer function
custom channel-mixing/mapping for up and downmixing

It’s still early days for AE. Bugs will be found, and new and exciting features added. It’s stability and feature-set will develop as it matures and grows in the amazing open-source environment of XBMC.  We’d especially like to thank all the testers who helped make it possible to bring this merge about.

If you want to give it a try just grab one of the nightly versions on one of XBMC’s mirrors. For further details and support links please visit the AudioEngine page in our Wiki where you will also find links to the support threads in our forum, if you have additional questions.  From the development team, enjoy!

  1. Bob
    May 31st, 2012 at 13:47 | #1

    dddamian :
    @JustinSane <- nice nic :)

    Stolen from David Bowie mind u ;-)

  2. thomthom
    May 31st, 2012 at 14:06 | #2

    Is it possible to get this up and running on XBMCbuntu?

  3. Anonymous
    May 31st, 2012 at 14:06 | #3

    This is really cool news, great work! Any idea when this will be available in a stable build?

  4. May 31st, 2012 at 14:14 | #4

    @JustinSane

    I would recommend using the headphone port on the reciever anyway as these usually have a better DAC than what you find on a PC motherboard.

    Most recievers do not take much power to operate when the main amplifier is not in use.
    If your reveiver acts like mine and draws a huge amount of power and dims the lights in the room when you turn it on,
    Its only charging the capacitors up. You can check this with a Kill-A-Watt meter or similar device. If you really are worried about power usage, you will want one of these anyway for real power usage numbers on your devices. Maybe a friend has one?

  5. Hrynio
    May 31st, 2012 at 14:58 | #5

    Nightly builds 20120531 presents really good. Sound seriously its better than regular eden. I have only one problem, when i play song and visualization got start then my processor go to 100% and everything slowing down, the same situation is when i play mkv 720p or 1080p. In Eden i don’t have that issue. (work on win7)

  6. Mark
    May 31st, 2012 at 15:33 | #6

    AWESOME guys!!! It would be amazing if you could look into DSD, and SACD format playback…..another hi-res audio kind (about the same resoution-wise as 24-bit 96kHz, just different), SACD has now been cracked fully and the format now opening up on the computer platform:

    PS3 SACD ripper: http://code.google.com/p/sacd-ripper/

    foobar sacd plugin: https://sourceforge.net/projects/sacddecoder/

    And it’s all open-source.

    there’s Mytek USB DSD sound cards, DSD ASIO drivers, and maybe even some HDMI/iLink DSD digital driver could be created. Most decent receivers accept DSD over HDMI or firewire!

  7. dddamian
    May 31st, 2012 at 15:43 | #7

    Kristian :

    dddamian :

    jajo :
    Great work with AE!
    One question though… Can DTS HDMA and TrueHD be decoded and sent to my 24bit capable sound card, or does it only work through HDMI bitstreaming?
    / Jacob

    TrueHD can be decoded losslessly to PCM and streamed to your card – DTS-MA cannot, it must be passed thru or you can play the DTS core.

    Hi ddamian,

    Can you elaberate a bit on TrueHD decoding to PCM. Is it possible to decode TrueHD into PCM and then output it via 5.1/7.1 analog connectors into to an amplifier? Ie. an amplifier that does not support hdmi/hd audio, but has 5.1 or 7.1 analog inputs? Or is it only for outputting LPCM via HDMI to an amplifier that does not support decoding HD formats itself?

    Either way, absolutely fantastic work on this new audio engine!

    Yes, that is possible. Keep in mind your DAC must support 8ch @ 192khz though – that’s what a TrueHD stream is comprised of once decoded. You *could* resample but now it starts to defeat the purpose.

    For the question of the next stable build the only answer is Frodo 12.0 ;)

  8. BigJRM
    May 31st, 2012 at 15:48 | #8

    How can you just keep making the BEST MEDIA PLAYER BETTER? It just BLOWS MY MIND! So, CONGRATULATIONS to the DEVELOPERS/PROGRAMERS and all the other folks who work on this OPEN SOURCE software to make it what it is today and will be tomorrow. You folks ROCK!

  9. João
    May 31st, 2012 at 15:56 | #9

    GREAT!!

    Thank you guys for the awesome work :D

  10. Gabriel
    May 31st, 2012 at 18:45 | #10

    Nothing about DTS to AC3 on the fly?

  11. June 1st, 2012 at 04:24 | #11

    Awesome news guys

    Thanks to all the dev`s that helped

  12. Nick.G
    June 1st, 2012 at 09:41 | #12

    Awesome news guys! You are the best!

    Thanks to all the developers that contributed!

  13. Fernando rato
    June 1st, 2012 at 09:44 | #13

    Many thanks for this.
    The Hdaudio is working beautifuly, the only gripe is with movies with LPCM.
    They start to struggle to play.
    I know that you guys are going to solve that

    Many cheers

  14. June 1st, 2012 at 11:07 | #14

    Thank you, thank you, thank you!!!!!!! I have a custom install coming up where I am designing a bluray iso streaming video system. Thanks to this inclusion and the news announcement my Meridian Audio owning customer is at ease. Gnif and the rest of the team: YOU ROCK!

  15. Henrik
    June 1st, 2012 at 11:17 | #15

    Will this fix the 24p audio sync problems?

  16. dddamian
    June 1st, 2012 at 14:10 | #16

    Henrik :

    Will this fix the 24p audio sync problems?

    Reports are positive regarding that, but it does depend on your hardware too – many gpu’s do not clock 23.976hz well.

  17. Henrik
    June 2nd, 2012 at 05:07 | #17

    dddamian :
    Reports are positive regarding that, but it does depend on your hardware too – many gpu’s do not clock 23.976hz well.

    That’s great news! Wonder if my Mac Mini with Nvidia GeForce 9400M is supported…

  18. June 2nd, 2012 at 07:45 | #18

    Excellent. Great work guys. One step closer to move from bdlite to full BD playback. Tested our 24bit 96k audio and was blown away by the quality. Keep up the good work.

  19. June 2nd, 2012 at 08:13 | #19

    for those wanting to test out the HD-Audio Codecs i have found some demo’s for download below. TrueHD, DTS-HD MA / HR samples

    http://www.demo-world.eu/trailers/high-definition-trailers.php

  20. Seb.26
    June 2nd, 2012 at 10:51 | #20

    O M G 8-O

    I dreams every nights about low pass filter functions ( got 5.1 with : sub + FL/FR = large + C/SL/SR = small )

    Pulseaudio is too hard for me and you are about to resolve my last problem with XBMCbuntu …

    Pretty hard now to wait a release !!!

    Many thanks guys.

  21. subcell
    June 2nd, 2012 at 11:29 | #21

    Not only to we get HD Audio with these new nightly builds but also… my 10-bits videos are now working!!! GREAT!!!!

  22. Joelslaw
    June 2nd, 2012 at 14:18 | #22

    Thank you guys sooooo much!!! I have been waiting on this feature for a while and am so excited to try it! Thank you for all the hard work!

  23. Workstation
    June 2nd, 2012 at 16:35 | #23

    @thomthom

    I also would like to know if this will be added into or can be added to xbmc Ubuntu .
    Currently running this because windows 7 was crashing with xbmc and now doesn’t with Ubuntu only problem is my audio doesn’t work on 5.1 streams through HDMI… any comments on this

  24. Roy Barret
    June 2nd, 2012 at 16:59 | #24

    wonderfull!!
    i need now.
    congratulation from Bogota,Colombia–
    Exelent for competition

  25. Goku
    June 2nd, 2012 at 17:01 | #25

    Thank you!!!!!!

  26. June 2nd, 2012 at 19:13 | #26

    subcell :
    Not only to we get HD Audio with these new nightly builds but also… my 10-bits videos are now working!!! GREAT!!!!

    no way 10 bit is working now better now? gotta check this out.

  27. Jean-Yves Avenard
    June 3rd, 2012 at 07:27 | #27

    Cool…

    XBMC has almost finally caught up with MythTV when it comes to audio features…. almost :)

  28. erik
    June 3rd, 2012 at 12:30 | #28

    It’s a pity the linux version is way behind..
    any timetable there?

  29. jajo
    June 3rd, 2012 at 13:05 | #29

    dddamian :
    Keep in mind your DAC must support 8ch @ 192khz though – that’s what a TrueHD stream is comprised of once decoded. You *could* resample but now it starts to defeat the purpose.

    This is making me a little confused. Most movies with TrueHD is encoded at 24bit/48khz. Some are even encoded at 16bit/48khz (in all channels). My USB sound card can handle 24bit/96khz maximum. Will XBMC reject the lossless data and send a lossy stream to my sound card just because it doesn’t handle 192khz? (Even though it does handle the actual encoded bitdepth and sample frequency of the lossless PCM)

  30. Robert
    June 3rd, 2012 at 18:32 | #30

    Great RE: HD Audio, now we need VIDEO levels (16-235) as an option for the entire XBMC experience, meaning even the home menu navigation etc… not just in a player via relative guidance of brightness/contrast which is far from specific. As is there is no distinct toggle, and though I’m glad to see the XBMC team taking HD seriously with the audio support, the video itself is lacking in a huge way both with the renderer and it’s lack of video levels for home theater enthusiasts.

  31. Player 1
    June 3rd, 2012 at 23:59 | #31

    dddamian :

    Henrik :
    Will this fix the 24p audio sync problems?

    Reports are positive regarding that, but it does depend on your hardware too – many gpu’s do not clock 23.976hz well.

    Might try this one out then.
    10.1 did not have sync issues for me on ASRock ION 330 so fingers crossed.

  32. atlind01
    June 4th, 2012 at 11:25 | #32

    Eagerly waiting for the Monthly release, any idea when it will be available?

  33. Zebraitis
    June 4th, 2012 at 15:40 | #33

    atlind01 :Eagerly waiting for the Monthly release, any idea when it will be available?

    DITTO !!! Inquiring minds want to know !!!

  34. dddamian
    June 4th, 2012 at 16:11 | #34

    jajo :

    dddamian :
    Keep in mind your DAC must support 8ch @ 192khz though – that’s what a TrueHD stream is comprised of once decoded. You *could* resample but now it starts to defeat the purpose.

    This is making me a little confused. Most movies with TrueHD is encoded at 24bit/48khz. Some are even encoded at 16bit/48khz (in all channels). My USB sound card can handle 24bit/96khz maximum. Will XBMC reject the lossless data and send a lossy stream to my sound card just because it doesn’t handle 192khz? (Even though it does handle the actual encoded bitdepth and sample frequency of the lossless PCM)

    DTS-MA and TrueHD are both transmitted over a 192khz link – you need HDMI to bitstream these formats – there is no way around that. For TrueHD we can decode losslessly to PCM over your 24/96khz link. Easy answer is grab a cheap GPU with HDMI. Their is *no* software solution to bitstreaming these without HDMI.

  35. Nick
    June 4th, 2012 at 17:41 | #35

    @Zebraitis Its out already ;)

  36. Derek
    June 4th, 2012 at 17:45 | #36

    You guys are amazing! This was the one feature I was waiting for more than anything. Thanks for making my home theater futuristic!

  37. jajo
    June 4th, 2012 at 17:59 | #37

    dddamian :

    jajo :

    dddamian :Keep in mind your DAC must support 8ch @ 192khz though – that’s what a TrueHD stream is comprised of once decoded. You *could* resample but now it starts to defeat the purpose.

    This is making me a little confused. Most movies with TrueHD is encoded at 24bit/48khz. Some are even encoded at 16bit/48khz (in all channels). My USB sound card can handle 24bit/96khz maximum. Will XBMC reject the lossless data and send a lossy stream to my sound card just because it doesn’t handle 192khz? (Even though it does handle the actual encoded bitdepth and sample frequency of the lossless PCM)

    DTS-MA and TrueHD are both transmitted over a 192khz link – you need HDMI to bitstream these formats – there is no way around that. For TrueHD we can decode losslessly to PCM over your 24/96khz link. Easy answer is grab a cheap GPU with HDMI. Their is *no* software solution to bitstreaming these without HDMI.

    So, if I understand you correctly – if I play a TrueHD movie today with AudioEngine I will get the lossless soundtrack as long as my soundcard is able to play the actual bitdepth and sampling frequency of the soundtrack?

    I completely understand that DTS HD-MA cannot be used since there is no open source decoder. But TrueHD should work, and also movies with pure PCM soundtracks, right?

    MPC-HC decodes TrueHD and DTS HDMA to normal PCM which is sent to my sound card. It works just fine. I just want to know that XBMC will do the same, except for DTS HDMA.

    Regarding HDMI. I am not very fond of bitstreaming. Mainly because it always ends with some minor A/V sync glitches. With analogue audio, it is possible to have audio and video synced perfectly during the entire movie, even if there is a frame drop.

    / j

  38. dddamian
    June 4th, 2012 at 18:04 | #38

    Hrynio :

    Nightly builds 20120531 presents really good. Sound seriously its better than regular eden. I have only one problem, when i play song and visualization got start then my processor go to 100% and everything slowing down, the same situation is when i play mkv 720p or 1080p. In Eden i don’t have that issue. (work on win7)

    @Hrynio – found a deadlock issue in PAPlayer – fix coming in the next day or so. For issues with anything else just get a debug log together and hit the forums :)

  39. dddamian
    June 4th, 2012 at 18:12 | #39

    jajo :

    dddamian :

    jajo :

    dddamian :Keep in mind your DAC must support 8ch @ 192khz though – that’s what a TrueHD stream is comprised of once decoded. You *could* resample but now it starts to defeat the purpose.

    This is making me a little confused. Most movies with TrueHD is encoded at 24bit/48khz. Some are even encoded at 16bit/48khz (in all channels). My USB sound card can handle 24bit/96khz maximum. Will XBMC reject the lossless data and send a lossy stream to my sound card just because it doesn’t handle 192khz? (Even though it does handle the actual encoded bitdepth and sample frequency of the lossless PCM)

    DTS-MA and TrueHD are both transmitted over a 192khz link – you need HDMI to bitstream these formats – there is no way around that. For TrueHD we can decode losslessly to PCM over your 24/96khz link. Easy answer is grab a cheap GPU with HDMI. Their is *no* software solution to bitstreaming these without HDMI.

    So, if I understand you correctly – if I play a TrueHD movie today with AudioEngine I will get the lossless soundtrack as long as my soundcard is able to play the actual bitdepth and sampling frequency of the soundtrack?

    I completely understand that DTS HD-MA cannot be used since there is no open source decoder. But TrueHD should work, and also movies with pure PCM soundtracks, right?

    MPC-HC decodes TrueHD and DTS HDMA to normal PCM which is sent to my sound card. It works just fine. I just want to know that XBMC will do the same, except for DTS HDMA.

    Regarding HDMI. I am not very fond of bitstreaming. Mainly because it always ends with some minor A/V sync glitches. With analogue audio, it is possible to have audio and video synced perfectly during the entire movie, even if there is a frame drop.

    / j

    I certainly never get sync issues bitstreaming. But to answer your question – yes, TrueHD will decode to PCM and can be output to your device as with other PCM. So you will be able to play it without issue – whether it will be lossless depends on your device e.g. a 16bit device will still suffer quality degradation.

  40. dddamian
    June 4th, 2012 at 18:18 | #40

    Mark :

    AWESOME guys!!! It would be amazing if you could look into DSD, and SACD format playback…..another hi-res audio kind (about the same resoution-wise as 24-bit 96kHz, just different), SACD has now been cracked fully and the format now opening up on the computer platform:

    PS3 SACD ripper: http://code.google.com/p/sacd-ripper/

    foobar sacd plugin: https://sourceforge.net/projects/sacddecoder/

    And it’s all open-source.

    there’s Mytek USB DSD sound cards, DSD ASIO drivers, and maybe even some HDMI/iLink DSD digital driver could be created. Most decent receivers accept DSD over HDMI or firewire!

    Yes, I’ve spoken with Max and received his blessing on porting. The issue is the code is NOT GPL-compatible – see the DST-unpacking code copyrighted and licensed by Philips Ltd. It is not free to distribute, modify, publish without license.

  41. Anonymous
    June 4th, 2012 at 20:19 | #41

    @Nick
    I installed it but I don’t see the audio settings for HD. Is there any additional flags that needs to be turned on in “ADVACNED SETTINGS”?

  42. atlind01
    June 4th, 2012 at 20:33 | #42

    Nick :
    @Zebraitis Its out already ;)

    I did download the May release, but I don’t see the HD audio options under system menu? Is there any additional flags that I need to turn on in advanced settings?

  43. Anonymous
    June 4th, 2012 at 21:19 | #43

    atlind01 :

    Nick :@Zebraitis Its out already ;)

    I did download the May release, but I don’t see the HD audio options under system menu? Is there any additional flags that I need to turn on in advanced settings?

    You need either June’s XBMC Frodo Alpha3 or any nightly after May 15th – there are no advanced settings required to enable it – the new options will be there already.

  44. Mark Harper
    June 4th, 2012 at 22:52 | #44

    wooooooooooooowwwwww!!!!! it’s awesoomeeee!!! thank u so very much dudes! i love the audio in HD!! DTS =)

  45. Mics
    June 5th, 2012 at 03:46 | #45

    Hi there, very nice with the new audio formats, however the release is stille pretty unstable, it crashed a couple of times for me. Another issue is all my HD DVD movies i have they all, or most of them, have Dolby Digital Plus. This format is simply not recongnized by xbmc and the sound stutters and movie cannot play, it simply freezes. Will this older format be included?

  46. Jean-Yves Avenard
    June 5th, 2012 at 03:51 | #46

    @jajo

    While TrueHD / DTS-HD is a usually 24bits, 48kHz sampled stream, it is carried over a 8 channels , 16 bits, 192kHz audio link. Hence why you have such requirements. Having said that, it’s not really a proper requirements. Your audio card could handle 8 channels @ 192kHz yet not do TrueHD and DTS-HD. You need HD passhtrough support, this means you need a nvidia GT4xx or later.

  47. Jean-Yves Avenard
    June 5th, 2012 at 03:53 | #47

    So, if I understand you correctly – if I play a TrueHD movie today with AudioEngine I will get the lossless soundtrack as long as my soundcard is able to play the actual bitdepth and sampling frequency of the soundtrack?
    I completely understand that DTS HD-MA cannot be used since there is no open source decoder. But TrueHD should work, and also movies with pure PCM soundtracks, right?
    MPC-HC decodes TrueHD and DTS HDMA to normal PCM which is sent to my sound card. It works just fine. I just want to know that XBMC will do the same, except for DTS HDMA.
    Regarding HDMI. I am not very fond of bitstreaming. Mainly because it always ends with some minor A/V sync glitches. With analogue audio, it is possible to have audio and video synced perfectly during the entire movie, even if there is a frame drop.
    / j

    There is no decoder for DTS-HD MA, so you either bitstream DTS-HD MA, or you decode the DTS-core stream only (5.1 max)

  48. Joey
    June 5th, 2012 at 04:53 | #48

    @dddamian Software patents applies to more than half the codecs in FFmpeg so one more software patent should not stop you now ;)

  49. Nick
    June 5th, 2012 at 04:56 | #49
  50. atlind01
    June 5th, 2012 at 08:01 | #50

    @Nick
    thanks, got it, when I pulled obviously the build was going on I believe I saw only alpha1, but the win 32 directory showed a time stamp of June 4th, so I assumed I had the latest version.

Comment pages
Comments are closed.