Mac OS X - No 5.1 sound from AAC or DTS when transcoding to AC3

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jm928 Offline
Junior Member
Posts: 7
Joined: Dec 2012
Reputation: 0
Post: #1
I have a surround receiver that can handle AC3 sound, but not DTS through optical. I understand that XBMC (release candidate 2 frodo) should be able to transcode these files to AC3 without a problem, however, depending on settings, things don't work.
With audio output set to Optical/Coax, And AC3 capable receiver ticked, I get 2.0 sound from files in other codecs. This is the same if the output is set to HDMI.
However if i tick LPCM capable receiver with HDMI selected as well, i get the two surround channels coming from the front speakers and no other sound.
Everything works fine for AC3 files.
Is there a setting in mac os that could change this. The optical cable is connected to the mac using a 3.5 mm toslink adapter if that makes a difference.
Thanks
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #2
transcoding from dts/aac to ac3 is broken currently in the new audio engine. We are not able to quick fix this for frodo - we aim 12.1 for this.

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #3
@Memphiz - I recall a commit from Davilla some time ago forcing 2.0 if device is optical. This is likely the cause of the 2.0 sound when transcoding from AAC/DTS > AC3

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
davilla Online
Team-XBMC Developer
Posts: 11,388
Joined: Feb 2008
Reputation: 64
Post: #4
I'm unaware that optical can officially handle anything but two channels of audio which includes the fake that allows passthrough of ac3/dts.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #5
And you're correct - they issue would be that DTS/AAC can be decoded to 5.1 pcm before transcoding, and it's there that the optical 2,0 force can kill the surround & LFE channels - while we're pcm.

PS - I copied that commit over to SoftAE and borked it the same way by doing so Tongue

http://forum.xbmc.org/showthread.php?tid=149369

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
(This post was last modified: 2013-01-23 04:38 by DDDamian.)
find quote
davilla Online
Team-XBMC Developer
Posts: 11,388
Joined: Feb 2008
Reputation: 64
Post: #6
eh ? optical cannot support 6 channels of pcm. I still don't get what you are saying/


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #7
It's during the intermediate stage between the decoding to PCM (gets forced to 2.0) and then re-encoding to AC3. Ends up as AC3 2.0 final output.

5b62277ae34a8ae9e11d24a677881f6a3254ee05 <- CA

c3bc136c2f6981fb36f4a5d824ee6d8d6e81d3c3 <- added to SoftAE just after

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
(This post was last modified: 2013-01-23 05:35 by DDDamian.)
find quote
davilla Online
Team-XBMC Developer
Posts: 11,388
Joined: Feb 2008
Reputation: 64
Post: #8
so how should this get fixed ?


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #9
Both can be safely reverted IMHO.

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
davilla Online
Team-XBMC Developer
Posts: 11,388
Joined: Feb 2008
Reputation: 64
Post: #10
Both were added to fix the issue that users would select 5.1 and digital then the channels would be borked because it tried to do 6 channels over optical. So fix one problem but caused another. So they can't be safely reverted Smile


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
(This post was last modified: 2013-01-23 07:26 by davilla.)
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #11
If this fixes the 1h02min slowdown effect i'd get a laugh flash...

The real fix would be that we need to know if we are ending up in an 2.0 encoded format or not. If not - we need to clamp to 2.0 - if we do - no clamp needed and we would allow the intermediate lpcm state with > 2 channels.

DDDamian - any clue how this detection could be done? (basically we would need to detect the transcoding use case).

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
(This post was last modified: 2013-01-23 11:34 by Memphiz.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #12
@Memphiz - bingo. In master's OpenSink():

Code:
if (!m_transcode)
        newFormat.m_channelLayout.ResolveChannels(m_stdChLayout);
      else
      {
        if (m_masterStream->m_initChannelLayout == AE_CH_LAYOUT_2_0)
          m_transcode = false;
        m_encoderInitFrameSizeMul  = 1.0 / (newFormat.m_channelLayout.Count() *
                                           (CAEUtil::DataFormatToBits(newFormat.m_dataFormat) >> 3));
        m_encoderInitSampleRateMul = 1.0 / newFormat.m_sampleRate;
      }
    }

I still think the analog/optical/HDMI setting should go and just be replaced with the more accurate / descriptive radio buttons + a few additions like:
- force transcode
- force 16 bit
- force 44.1 lpcm

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
davilla Online
Team-XBMC Developer
Posts: 11,388
Joined: Feb 2008
Reputation: 64
Post: #13
yea, let's fill that audio section with more settings so we can get even more confused users Smile


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Martijn Offline
Team-XBMC
Posts: 10,306
Joined: Jul 2011
Reputation: 154
Location: Dawn of time
Post: #14
I vote less settings

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #15
well the hdmi/analog/optical setting is more then confusing indeed - i think you will +1 that statement too...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
Post Reply